• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Shared frameworks, not in an app wrapper (Was: Frameworks in the app wrapper)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Shared frameworks, not in an app wrapper (Was: Frameworks in the app wrapper)
      • From: Bill Bumgarner <email@hidden>
References: 
 >Frameworks in the app wrapper (Was: Re: "First Run" installation of Application support stuff?) (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: ANN: Class diagrams of frameworks (free)
  • Next by Date: Re: Get the text from a NSTextView?
  • Previous by thread: Frameworks in the app wrapper (Was: Re: "First Run" installation of Application support stuff?)
  • Next by thread: Re: Shared frameworks, not in an app wrapper (Was: Frameworks in the app wrapper)
  • Index(es):
    • Date
    • Thread