Question for those developing GUI apps with Ruby

This is a question for those of you who use Ruby to develop GUI-based
applications, using wxWidgets, or Qt, or GTK, etc. and the appropriate
Ruby bindings.

My question is, how do you actually package and distribute your
application to end users, and what do you distribute vs. require the
user to already install? For example, do you just distribute your .rb
files, and then tell the user:
“To run this app, you have to have Ruby installed on your machine,
PLUS wxWidgets, PLUS wxRuby.”?

Or is there a way to package and distribute the wxWidgets (or Qt or
GTK or Fox) library and the Ruby bindings along with your app’s Ruby
sources so that your only end user system requirement is Ruby? And if
you do redistribute the GUI library and the Ruby bindings, do you have
to install them into the System somehow, or modify paths and/or
environment variables to make sure they’re “installed” properly? Or
can you have everything in a single folder along side your app’s
sources, so everything is nicely self-contained without the user
needing to modify their system?

So far the only method of creating GUI apps with Ruby that I’ve played
around with at all is JRuby, because as I understand it I can make it
so that the only end user requirement is that they have Java
installed, by distributing jruby-complete.jar along with my app’s .rb
source files, plus maybe a .bat or shell script file to launch the
app. And on the Mac you could probably package that all up as a .app
bundle, so the user can just double click it and go, without having to
install anything else (since Macs come with Java installed).

Karl von Laudermann wrote:

This is a question for those of you who use Ruby to develop GUI-based
applications, using wxWidgets, or Qt, or GTK, etc. and the appropriate
Ruby bindings.

My question is, how do you actually package and distribute your
application to end users, and what do you distribute vs. require the
user to already install?

Have you looked at rubyscript2exe? That way, not even ruby is a
requirement.

Karl von Laudermann wrote:

Or is there a way to package and distribute the wxWidgets (or Qt or
GTK or Fox) library and the Ruby bindings along with your app’s Ruby
sources so that your only end user system requirement is Ruby? And if
you do redistribute the GUI library and the Ruby bindings, do you have
to install them into the System somehow, or modify paths and/or
environment variables to make sure they’re “installed” properly? Or
can you have everything in a single folder along side your app’s
sources, so everything is nicely self-contained without the user
needing to modify their system?

I heartily recommend Erik V.'s RubyScript2Exe:

http://www.erikveen.dds.nl/rubyscript2exe/index.html

It works well for me, and is well documented and supported. I use it on
Windows and distribute wxRuby apps for use on dozens of PCs without a
problem. It works for Mac and Linux, as well. As Joel said, Ruby doesn’t
need to be installed on the user’s machine.

David

http://rubyonwindows.blogspot.com

On May 17, 11:46 am, David M. [email protected] wrote:

need to be installed on the user’s machine.
Thanks for the reply. I had looked into RubyScript2Exe in the past. I
thought it was Windows only, though. Maybe it was back then, or maybe
I just assumed it was based on the name. I also didn’t know you could
use it to package up wxWidgets and wxRuby with your app.

The one thing that concerns me as I skim the web site is that they
keep saying “Darwin” when they talk about Mac OS X. Usually this is a
sign that the software in question runs on the Mac as just another
flavor of UNIX, from the terminal, rather than as a Mac-like double-
clickable application icon. Although once you’ve created your
executable, there’s probably a simple way to wrap it up into a .app
bundle using Apple’s developer tools.

…oops, I just saw this part:

“Don’t rely on shared libraries which are not part of the Ruby
environment. Unless you are absolutely sure your customer has
installed these libraries. For example: the Ruby bindings for TK are
considered to be part of your Ruby environment, TK itself isn’t. For
that reason, I like RubyWebDialogs (pure Ruby!) and WxRuby (native
widgets).”

It appears that wxRuby is a self-contained gem with no external
dependencies, and not just a binding separate from the wxWidgets
library. But is this true about the Ruby bindings for Qt and GTK as
well? If not, then apparently you can’t use them with RubyScript2Exe.
So if I decide to try playing with RubyScript2Exe, that means that I’m
forced to choose wxWidgets, correct?

So how do Ruby Qt and GTK developers distribute their apps?

Not trying to be a pain, just trying to get a broad understanding.
Thanks for any insight you can share.

So how do Ruby Qt and GTK developers distribute their apps?

QtRuby is generally available for most Linux distributions via the
package managers,
and should also be available through the various MacPorts/Fink/etc for
OSX. Making
sure the user has the package installed this way should work most of of
the time.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs