From: Jonathan P. <jp...@dc...> - 2005-05-26 09:14:37
|
On 25 May 2005, at 23:14, Dave Howell wrote: > Oo! Once you're framework is done, then I can compile a Ruby > application and it will actually be a Ruby application, and not 1/3 > of a program that breaks on anybody's system that doesn't have > necessary (but invisible!!) Ruby files? > I posted a script to this list about a month ago called 'standaloneify.rb'. I'm reposting it again now. It takes a RubyCocoa application you've built with Xcode and removes any external dependencies. I didn't hear back from anyone about it, so as far as I know it just "works for me". Excerpt from the header: # standaloneify.rb # Takes a built RubyCocoa app bundle (as produced by the # Xcode/ProjectBuilder template) and copies it into a new # app bundle that has all dependencies resolved. # # usage: # ruby standaloneify.rb -d mystandaloneprog.app mybuiltprog.app # # This creates a new application that should have dependencies resolved. # # The script attempts to identify dependencies by running the program # without OSX.NSApplicationMain, then grabbing the list of loaded # ruby scripts and extensions. This means that only the libraries that # you 'require' are bundled. # # NOTES: # # Your ruby installation MUST NOT be the standard Panther install - # the script depends on ruby libraries being in non-standard paths to # work. # # I've only tested it with a DarwinPorts install of ruby 1.8.2. # # Extension modules should be copied over correctly. # # Ruby gems that are used are copied over in their entirety (thanks to some # ideas borrowed from rubyscript2exe) # # install_name_tool is used to rewrite dyld load paths - this may not work # depending on how your libraries have been compiled. I've not had any # issues with it yet though. |