In our application, the user should be able to change the version of a library 
that the application is linked to. Specifically, our application links to the 
Python library. However, some users want to use the Python at 
/System/Library/Frameworks/Python.framework/Versions/2.6, while others may want 
to use a custom Python installed in /Frameworks/Python.framework/Versions/...

A further requirement is that the library redirecting scheme should be 
implemented in such a manner that if there are several users on a single 
computer, each user can have his own settings for the Python he uses, e.g. one 
would use the Python under /System/Library..., whie an other would use the 
Python under /Library...

One way to do this would be to add an environment setting (LSEnvorinment) in 
the info.plist file of our app for  DYLD_LIBRARY_PATH, which sets 
DYLD_LIBRARY_PATH to ~/Library/Preferences/OurApp, with the OurApp directory 
containing a symlink file called Python that points to the user's desired 
version of the library.  Out application would provide a GUI to modify the 
symlink file to point it to another library, so that after restarting the 
application it would be linked to that other library.

However, this does not seem to work because the dynamic linker does not seem 
honor the "~" symbol in DYLD_LIBRARY_PATH. Obviously, we could use an absolute 
path instead, such as "/Users/Peter//Library/Preferences/OurApp" -- this does 
work but would thwart our goals since it would only work for user Peter, while 
user Paul would not be able to link to his desired version of the library.

I have also tried setting DYLD_LIBRARY_PATH to 
$HOME//Library/Preferences/OurApp, but again the dynamic linker does not seem 
to resolve the $HOME variable.

Does anyone out there have an idea how to solve this?

Any suggestions are appreciated.

Kurt Sutter

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to