From: Patrik Sundberg Date: 2001-12-18T19:22:58+09:00 Subject: [ruby-talk:28858] Re: [IDEA] creating stand-alone versions for easy distribution etc On Tue, Dec 18, 2001 at 07:04:09PM +0900, Robert Feldt wrote: > On Tue, 18 Dec 2001, Patrik Sundberg wrote: > > > hi list, > > > Hi Patrik, > > > I was looking around for a way to package a ruby-app of mine for easy > > distribution to some of my non-ruby/non-programmer friends. I didn't come > > across anything other than a program by Robert Feldt which was Windows only. I > > wasn't happy and searched further among other scrpting languages and came > > > I think better methods for this are needed so would be great if you have > the time to work on this! we'll have to see about the time left to work on this :) but i agree that this actually is quite an important task. > > across something from the Python community called 'Installer': > > http://www.mcmillan-inc.com/install5_ann.html > > > Could you summarize the method they use? I couldn't find a clear > description on the web page. The stuff about archives and appending to an > exe sounds very much like what rbwrap does. But it was a quick hack for a > specific need so may not be something you can use. If you can then feel > free to steal! i actually didn't look into your rbwrap since i recall it was windows only. at a closer look it might be a lot like what the python application does, in principle at least. a description of their approach is at: http://www.mcmillan-inc.com/standalones.html > > To me this seems very doable for ruby too, and a direct port not that hard. > > Anyone has any thoughts on this? I will probably start looking into this > > during the holidays if no one else does before. > > > Great, good luck! > > I'd be interested in hearing about any better ways to find dependencies of > a Ruby program you find. The approach used by rbwrap is a bit crude: run > the script to be wrapped and see what is added to '$.'. The user can also > explicitly name files that should be included. You might want to check out > the design document in rbwrap to see some ways to do (and not do!?) it. I > guess the main other approaches would be to parse all the source files and > analyze them (overkill) or hook into require/load. But there might be > other ways? > > Would be great if your solution would work together with the UPX > packer (there were some quirks when I tried to get it to work with > rbwrap but I don't remember the details). UPX works great and can often > reduce the size of executables to 25-40%. And start times can be faster > than without compression since CPU's are fast and discs may not be. And > the uncompress alg is coded in assembler and very fast. And UPX works with > ELF files also (in fact it works on very many platforms). See upx.sf.net. i'll look into UPX, never heard of it before. -- ---------------------------------------------------------------------------. Patrik Sundberg Address: Rydsv�gen 100C, 584 31 Link�ping, Sweden | Email: ps@raditex.se || ps@radiac.mine.nu | Phone: +46 13 178567 || +46 707 602240 | .---> Applied Physics and Electrical Engineering student | |-----> Master of Science in Business Administration and Economics student | |-------> UNIX/Programming consultant | `--------------------------------------------------------------------------'