Distributing Ruby applications

D

Daniel Carrera

Hello Rubyists,

I was hoping to hear some thoughts on the distribution of applications
made with Ruby. Say I make a GUI app with wxRuby. I am not guaranteed
that the user will have wxRuby, or even have Ruby at all. I want to make
it as easy as possible for other people to run it.

I thought that I could distribute my app as a zip file which would
contain a copy of ruby for the intended platform, as well as all the
libraries, and of course my Ruby program. The zip would also contain a
shell script which would set up the appropriate Ruby environment and run
the application. Something like this:

#/bin/sh
#
# myprogram -- This is the file that the user actually runs.

RUBYLIB="."
PATH="."

ruby my_ruby_prog.rb


I'm sure that it's possible to do something like that for Windows also.

The user would simply unzip the file and click on "myprogram", which is
the above shell script. So it would be a zero-install program.

Would this work the way I expect?

My distribution zip file could contain a directory for every platform that
is supported.

Thoughts?
--
Daniel Carrera | PGP: 6643 8C8B 3522 66CB D16C D779 2FDD 7DAC 9AF7 7A88
Math PhD. UMD | http://www.math.umd.edu/~dcarrera/pgp.html

Weekly Smile:
There are 10 types of people in the world...
Those who understand binary - and those who don't.
 
D

Daniel Carrera

For Windows, I would highly suggest the exerb package.

http://exerb.sourceforge.jp/index.en.html

Very, very nice.

Windows is not the only platform I would be interested in supporting. In
fact, Mac OS X and Linux would rank higher in my list. I guess I can use
exerb for the Windows version, but I'm still interested in what I can do
for most operating systems.

--
Daniel Carrera | PGP: 6643 8C8B 3522 66CB D16C D779 2FDD 7DAC 9AF7 7A88
Math PhD. UMD | http://www.math.umd.edu/~dcarrera/pgp.html

Weekly Smile:
There are 10 types of people in the world...
Those who understand binary - and those who don't.
 
D

Daniel Carrera

You know what would be cool? If one wrote an installer with wxRuby which
could get run from the configuration script.

#!/bin/sh
# installer.sh

RUBYLIB="."
PATH="."

ruby installer.rb


Then THAT could install Ruby togeter with all the appropriate libraries
and stuff.

I once saw a self-extracting Linux program that was essentially a bash
script with a pile of binary data packed at the end. If I could just
remember how they did that...

Well, I'll keep thinking.
--
Daniel Carrera | PGP: 6643 8C8B 3522 66CB D16C D779 2FDD 7DAC 9AF7 7A88
Math PhD. UMD | http://www.math.umd.edu/~dcarrera/pgp.html

Weekly Smile:
There are 10 types of people in the world...
Those who understand binary - and those who don't.
 
B

Brian Candler

I once saw a self-extracting Linux program that was essentially a bash
script with a pile of binary data packed at the end. If I could just
remember how they did that...

You might get some ideas from 'man shar'. shar only works with plain text,
but I guess you could have a uuencoded tar file or somesuch.

Regards,

Brian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top