From: Robert Feldt Date: 2001-12-18T19:04:09+09:00 Subject: [ruby-talk:28856] Re: [IDEA] creating stand-alone versions for easy distribution etc 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! > 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! > 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. Regards, Robert Feldt