Distributing a application

Hi

I’m thinking about distributing a application (a game, to be more
specific) written in Ruby using the GTK+ library and ruby-gtk. Is
there a way that I could distribute my application without having to
distribute Ruby along? Or there’s any other option I do not know about?

My application is meant to be used in any OS, so any hints for any OS
would be helpful.

Thank you in advance,

André

···


© André Wagner - 2003 - All rights reserved

I’m thinking about distributing a application (a game, to be more
specific) written in Ruby using the GTK+ library and ruby-gtk. Is
there a way that I could distribute my application without having to
distribute Ruby along? Or there’s any other option I do not know about?

My application is meant to be used in any OS, so any hints for any OS
would be helpful.

Thank you in advance,

André

I’ve been thinking a lot about this myself. This is the best I’ve come up
with so far for Unix/Linux/Mac OS X:

  • Distribute a copy of ruby and all necessary libraries with your
    program.

$ cp your_app.rb your_app/
$ cp /usr/bin/ruby your_app/bin
$ cp -r /usr/lib/ruby your_app/lib/ruby

  • Include a shell script that will setup the appropriate environment and
    call your program:

$ cat >>your_app.sh
#!/bin/sh

export RUBYLIB=“/opt/your_app/lib”
./ruby your_app.rb
$
$ chmod 755 your_app.sh
$ cp your_app.sh your_app/

To install the program, just ‘cp your_app/ /opt/’. If the user runs
/opt/your_app/your_app.sh, your program gets run.

  • You might want to make a GUI installer. In that case:

$ cp setup.rb your_app/
$ cat >>setup.sh
#!/bin/sh

export RUBYLIB=“./lib”
./ruby setup.rb
$
$ chmod 755 setup.sh
$ cp setup.sh your_app/

  • To make the final distribution, make a zip or tar.gz file and get the
    user to unzip the file and run setup.sh

  • You might want to use ‘Makeself’ to creat a self-extracting archive
    which will run your setup.sh file after it’s been extracted.

http://www.megastep.org/makeself/

Hope that helps,

···


Daniel Carrera, Math PhD student at UMD. PGP KeyID: 9AF77A88
.-“~~~”-. On the menu of a Swiss restaurant:
/ O O \ “Our wines leave you nothing to hope for”
: s :
\ _/ / Sign outside a Hong Kong tailor shop:
`-.
_.-’ “Ladies may have a fit upstairs”

André Wagner wrote:

I’m thinking about distributing a application (a game, to be more
specific) written in Ruby using the GTK+ library and ruby-gtk. Is
there a way that I could distribute my application without having to
distribute Ruby along? Or there’s any other option I do not know about?

My application is meant to be used in any OS, so any hints for any OS
would be helpful.

Be sure to visit (and contribute, if you can):

···

Chris
http://clabs.org/blogki

André Wagner wrote:

Hi

I’m thinking about distributing a application (a game, to be more
specific) written in Ruby using the GTK+ library and ruby-gtk. Is
there a way that I could distribute my application without having to
distribute Ruby along? Or there’s any other option I do not know about?

My application is meant to be used in any OS, so any hints for any OS
would be helpful.

Thank you in advance,

André


© André Wagner - 2003 - All rights reserved

yes, I have the same problem. I try to use only the features that are
present in the standard ruby distribution,
that’s why I used Tk at first. But there is still people that have
difficulties with installing tk with ruby under linux.
And I still didn’t found someone able to run my application under
MacOsX.
jf

Have a look at Tar2RubyScript. You have to distribute Ruby
separately.

http://www.erikveen.dds.nl/tar2rubyscript/

gegroet,
Erik V.

···

On Tue, 19 Aug 2003 03:28:15 +0900, Andre Wagner wrote:

I’m thinking about distributing a application (a game, to be
more specific) written in Ruby using the GTK+ library and
ruby-gtk. Is there a way that I could distribute my
application without having to distribute Ruby along? Or
there’s any other option I do not know about?