Again: Ruby program without ruby installation

Hi!

I’m still missing how can I send a program to my friend, who doesn’t
have and doesn’t want to install ruby.
So I need a mechanism to pack things into a single directory, which can
run on a windows NT/98/2k or linux.

ps: btw python can do it, eg. blender doesn’t need python, however it is
written in python.

Gergo

±[Kontra, Gergely @ Budapest University of Technology and Economics]-+

    Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |

URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
±------“Olyan langesz vagyok, hogy poroltoval kellene jarnom!”-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

Wouldn’t this work:

Put the executable(s) and required .dll/.so files into that directory.

Put your program and any Ruby modules into that directory (you could
use a subdirectory for the Ruby modules)

Have a:

.cmd file for WinNT/2K/XP
.bat file for Win9x
shell script marked as executable for Linux

that sets RUBYLIB appropriately (though it may be easier to modify $:
in your Ruby program) and launches Ruby on your program.

This could all be zipped up together using a Zip program that
maintains Unix file mode bits (like the Linux version of Info-Zip’s
Zip).

···

On Monday 08 July 2002 05:20 am, Kontra, Gergely wrote:

I’m still missing how can I send a program to my friend, who
doesn’t have and doesn’t want to install ruby.
So I need a mechanism to pack things into a single directory, which
can run on a windows NT/98/2k or linux.


Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE

ps: btw python can do it, eg. blender doesn’t need python, however it is
written in python.

I believe that Blender ships Python as a DLL. Nicer, I suppose, than a
full-blown Python installation, but it’s still there.

James

···

Gergo

±[Kontra, Gergely @ Budapest University of Technology and Economics]-+

    Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |

URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
±------“Olyan langesz vagyok, hogy poroltoval kellene jarnom!”-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

ps: btw python can do it, eg. blender doesn’t need python, however it is
written in python.

I believe that Blender ships Python as a DLL. Nicer, I suppose, than a
full-blown Python installation, but it’s still there.

Yes you are right. py2exe does this work. It scans your sources for module dependecies and builds
standalone ready to ship executable application launcher with all needed scripts embeded into
itself (bytecompiled). All the stuff alongside with python dll, other required libs and data files
is put into a specified folder.

I think it would be very nice if ruby has something similar to python distutils and py2exe.

Tom

···

james@rubyxml.com wrote:

James

Gergo

±[Kontra, Gergely @ Budapest University of Technology and Economics]-+

    Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |

URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
±------“Olyan langesz vagyok, hogy poroltoval kellene jarnom!”-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net


Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

Yes you are right. py2exe does this work. It scans your sources for
module dependecies and builds standalone ready to ship executable
application launcher with all needed scripts embeded into itself
(bytecompiled). All the stuff alongside with python dll, other
required libs and data files is put into a specified folder.

I think it would be very nice if ruby has something similar to python
distutils and py2exe.

Just a silent note, that you cannot do a require inside an eval.
But this couldn’t be such a big problem…

Also it would be nice, if it can work with the gtk libs…

±[Kontra, Gergely @ Budapest University of Technology and Economics]-+

    Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |

URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
±------“Olyan langesz vagyok, hogy poroltoval kellene jarnom!”-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

Just a silent note, that you cannot do a require inside an eval.
But this couldn’t be such a big problem…

Why do you say that? I just tried it in irb, and it seems to work just fine.

Thomas

I have been educated many times to try and avoid using eval, this is one case
where you can avoid it.

Object.send(:require, klass_filename)

Hope this helps somewhat.


Signed,
Holden Glova

···

On Wed, 10 Jul 2002 02:24, Kontra, Gergely wrote:

Yes you are right. py2exe does this work. It scans your sources for
module dependecies and builds standalone ready to ship executable
application launcher with all needed scripts embeded into itself
(bytecompiled). All the stuff alongside with python dll, other
required libs and data files is put into a specified folder.

I think it would be very nice if ruby has something similar to python
distutils and py2exe.

Just a silent note, that you cannot do a require inside an eval.
But this couldn’t be such a big problem…