[R-SIG-Mac] Cocoa gui with embedded R framework
Simon Urbanek
simon.urbanek at r-project.org
Wed Mar 23 21:05:26 CET 2005
On Mar 23, 2005, at 1:40 PM, stefano iacus wrote:
> Simon? Could this be done at run-time (for this specific version of
> R.app of Kjell) by setting it relative to R.app path before
> kickstarting R?
Yes, in fact the Cocoa GUI has that single setenv line commented out,
but still present :). The rationale now is to not hard-code it in the
code, although it is possible. There are still some issues with all
the R_HOME detection and linking behavior. There are two places where
the paths have to match, which still allows for inconsistency if
someone messes with the settings: One is the binary itself and the
other is the Info.plist. The binary is linked with a full path to
libR.dylib, so that is the R version that will get started, but then
if Info.plist contradicts, then its libraries and files will be used
as this is what R_HOME is set to. The most "clean" way would be to
determine on run-time which library is loaded and set R_HOME
correspondingly. To my shame I have to admit that I posted the
relevant code that does exactly this long time ago, but it was
actually never used. I should have a look at that.
> In any case, I would be pleased to know if is works after moving
> around R.app on the system or even after installing a package and
> move again R.app around.
It won't really solve the duality issue: linked path and R_HOME.
Technically it's the same as the current Info.plist solution. Both
allow relocation of R.app, but none of them allows relocation of the
framework.
Cheers,
Simon
More information about the R-SIG-Mac
mailing list