I’m looking for a straightforward way to deploy a standalone Ruby-Tk
desktop app on MAc OS X. All existing options for deploying desktop Ruby
GUI apps on the Mac (e.g. standaloneify.rb) assume that you are using
RubyCocoa or MacRuby, and are tightly bound to Xcode/Interface Builder
project structure; or, alternatively, that you are wrapping a simple
script via Platypus (Platypus - Create Mac apps from command line scripts |) that does not
involve deploying the entire Ruby runtime. None of the other existing
options that I’ve found–rubyscript2exe, ocra, crate–support the Mac
and/or support Ruby 1.9.
I’m hoping that someone can point me to a shell script or Ruby script
that does the following:
- Tracks all dependencies/gems in an app.
- Copies the Ruby interpreter and dependencies into an application
bundle. - Runs install_name_tool on the Ruby interpreter and all dylibs to make
them portable.
The application bundle can either be something created by Platypus, use
a Cocoa stub launcher, or even a shell script–I know how to handle
those. The problem I’m having is getting the Ruby runtime wrapped in a
portable way.
There’s a rakefile at
http://weft-qda.rubyforge.org/svn/trunk/weft-qda/rake/rake_osx.rb that
encompasses the tasks that I’m looking to achieve, but this rakefile is
part of a larger build structure that I can’t get running on my Mac. I’m
not familiar enough with rakefile structure to refactor this into a
simple script that I can run, either via “ruby rake_osx.rb” or even
“rake”.
If someone can suggest to me how to modify this rakefile to run
independently, or point me to another example project, or even share
some code, I would be grateful. The project I am working on is better
suited for Ruby than Python (better library support in Ruby), but I am
not going to invest time in it if deployment won’t work. (Python has a
much richer tradition of deployment tools than Ruby, something I’ve
never quite understood.)
Thank you,
Kevin