[futurebasic] Re: [FB] Re: Private Frameworks with FB5

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2009 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Wed, 2 Dec 2009 21:11:29 +1300
Dave Warker wrote:

> I've been doing some experimenting and discovered that I don't have to manually fetch the function pointers from the bundle. It is possible to link directly against the framework in FB5 and include it in the application bundle. Here's what worked for me:

[elegant and simple steps snipped]

> One restriction though: the framework *must* be explicitly built to run from the Resources folder. You'd normally build a private framework in Xcode with an Installation Directory setting of "@executable_path/../Frameworks" so it runs from the app's Frameworks folder. That must be changed to "@executable_path/../Resources" so the OS knows where to find it when the app launches. This would be a problem if you can't build your own copy of the framework but in my case that's not an issue.

For the sake of completeness, I want to mention that install_name_tool (with the -rpath option) can be used to change the executable_path of a framework even if you don't have its Xcode project and source. To learn more, in Terminal.app, enter
man install_name_tool

> This approach has worked out well for my current needs. If private frameworks are something more people want to use I think proper support could be added with just a few minor changes to FB5:


Your suggested changes are very reasonable. We won't be in a hurry to make them, though, until more users express a wish to include private frameworks. You might arouse interest by outlining the nature of your framework and the reasons for using it.

Robert P.