Shared frameworks, not in an app wrapper (Was: Frameworks in the app wrapper)
Shared frameworks, not in an app wrapper (Was: Frameworks in the app wrapper)
- Subject: Shared frameworks, not in an app wrapper (Was: Frameworks in the app wrapper)
- From: "Phil Barrett" <email@hidden>
- Date: Thu, 19 Dec 2002 17:08:40 -0000
>
It is a trick. I wrote a guide on doing so some time ago. Still
>
works in the July development tools, last I checked.
>
>
http://radio.weblogs.com/0100490/categories/code/2002/02/26.html#a120
>
>
b.bum
The @exectuable_path hack does indeed work - though since my frameworks are
shared by a number of applications and command-line tools, they can't live
in one app's folder, so I need to add an additional ../../SharedFrameworks
(or whatever) to the @executable_path, and hope the user doesn't move
anything.
If the user does move something, we can complain loudly, and try to recover
by running a fix-up script which finds the frameworks and runs
install_name_tool to modify the applications' link paths.
It's a pity that app linking can't take -F@executable_path/../... and
automatically set up the relative link for dyld. The use of "-install_name
@executable_path/../..." when creating the framework is just bizarre, and
useless unless all the apps/tools linked against the framework see it in the
same relative place.
The other hack, as pointed out by Kurt Revis, is the old Omni launcher (from
the days before @executable_path) which adds the shared framework directory
to DYLD_FRAMEWORK_PATH and then executes the real application. But this is
too fragile for command-line tools.
Maybe weak-linking is the answer - allow the app to start, discover
frameworks are missing, berate the user, find them, load them and continue.
Then again, maybe we need to return to the old NeXT way of static linking
everything. Great runtime performance, but it uses a lot of disk space,
takes an age to link, and means you can't ship small patches.
Phil
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.