Using macports dylibs without macports
Raphael Straub
raphael at ira.uka.de
Thu Sep 17 12:15:56 PDT 2009
Travis Griggs wrote:
> I have an application (.app). It makes use of CairoGrahics library
> (libcairo.dylib) provided by Macports. I have some users though, who
> are not going to install macports on their systems just so they can
> use my app. Can I just copy the appropriate dylibs to location of
> the executable down in the bowels of the .app and have it work
> correctly?
No, you have to adjust the paths to the libraries in your binary and
in all dependent libraries, see "man install_name_tool".
> Is there a way to achieve what I want?
There is a script in the python macholib package to achieve what you
want. Just install the py25-macholib port and use "macho_standalone
your.app". This will copy all dependent libraries into your.app/
Contents/Frameworks (Create this directory before calling
macho_standalone.) and adjust the install names with
install_name_tool. As Ryan already said, this is only guaranteed to
work if all users have the same major Mac OS X version as you.
Regards,
Raphael
More information about the macports-users
mailing list