From: Jim I. <ji...@ap...> - 2002-01-21 22:37:27
|
Jack, I think what he is trying to do is have a structure like: Application.app Contents Frameworks Tcl.framework Tk.framework And have it work so that the user could drag around Application.app in the Finder, and put it wherever he/she wanted, and double-clicking would find all the libraries. This is what the @executable_path is for. You set up the dyld link string for the App to be: @executable_path/../Frameworks/Tcl.framework (this is the bit that I don't remember how you do)... And ditto for Tk.framework, and then the Application.app will do the right thing. Among other things, the ability to do this, so that an app could transparently ship with its own complete copy of Tcl, Tk and all the support files, if it wanted to, was a strong argument in my mind for using the Framework structure in the first place... I know this works, 'cause I have seen traffic about it on the PB list. But I don't think that PB supports it yet (should be another bit in the Framework dependency entry for bundled Frameworks, and PB would do all the requisite magic. I also know that they intend to support this at some point, but it is not as high on their list as some other things right now... Jim > > On Monday, January 21, 2002, at 07:32 PM, Jim Ingham wrote: > >> On 1/21/02 7:54 AM, "Ashley Ward" <ash...@nt...> wrote: >> >>> Any hints would be appreciated! >> >> If you want to package Frameworks in your app, you are supposed >> to put the >> cookie: @executable_path in the name of the framework you are >> linking to, >> and dyld will resolve the reference relative to where the >> executable lives >> in your App bundle. > > Do you mean that your private frameworks aren't on the search > path by default? I haven't tried this yet, but I was assuming > that if you link with "-framework Foo" and you then copy this > Foo framework from /Library/Frameworks/Foo.framework to > /Applications/MyApp.app/Contents/Frameworks/Foo.framework it > would find it automatically. > > I know that dyld *does* find frameworks in the current directory > if you add "-Wl,-F." to your link command line. When I'm > building Python I link against Python.framework. At build time > this is simply a subdirectory of the current directory, and the > resulting executable works fine with that. Later, when > everything has been installed, the same executable runs just as > fine with the framework in /Library/Frameworks/Python.framework. > > Hmmm, long paragraph, but what I wanted to suggest is try adding > "-Wl,-F../FrameWorks" to your link line. > -- > - Jack Jansen <Jac...@or...> > http://www.cwi.nl/~jack - > - If I can't dance I don't want to be part of your revolution -- > Emma Goldman - > > > _______________________________________________ > Tcl-mac mailing list > Tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > -- ++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++= Jim Ingham ji...@ap... Developer Tools - gdb |