From: Chris T. <cj...@cj...> - 2004-04-07 19:11:41
|
On Apr 7, 2004, at 11:33 AM, Phil Tomson wrote: > On Wed, 7 Apr 2004, John Platte wrote: > >> It looks like it's possible to create a completely self-contained .app >> bundle that contains Ruby on-board. These pages suggest that libruby >> and RubyCocoa could live in an app bundle's Contents/Frameworks >> directory: >> >> * http://www.imasy.or.jp/~hisa/mac/rubycocoa/changelog.html >> * http://cocoadevcentral.com/articles/000042.php >> * http://qin.laya.com/tech_coding_help/dylib_linking.html >> >> Can folks on this list contribute toward a recipe for building the >> Ruby >> and RubyCocoa dylibs appropriately? I will collect responses on Ruby >> Garden at >> >> http://www.rubygarden.org/ruby?BundleRubyExecutableInMacOSX >> > > I don't have anything to contribute yet, but I am very eager to learn > how > to do this. I would like to develop RubyCocoa apps and be able to > distribute them to others who may not have the RubyCocoa bindings (or > may > not have the latest version of Ruby installed). It goes something like this: Start by getting the dylibs linked correctly, then link the executable against them, and then copy them to the executable. Linking the libraries: Set the install name of RubyCocoa.framework to "@executable_path/../Frameworks". Set the install name of libruby.dylib to "@executable_path/". Copying: Copy the built libruby.dylib into /YourApp.app/Contents/MacOS/ And copy the built RubyCocoa.framework into /YourApp.app/Contents/Frameworks/ You can do this easily in Xcode by adding a couple of Copy Files build phases to your target. Chris |