From: Patrik Sundberg Date: 2001-12-18T22:13:08+09:00 Subject: [ruby-talk:28865] Re: [IDEA] creating stand-alone versions for easy distribution etc On Tue, Dec 18, 2001 at 08:46:20PM +0900, Robert Feldt wrote: > On Tue, 18 Dec 2001, Patrik Sundberg wrote: > > > 1. create a good tool for analyzing dependencies. must also be able to fall > > back on explicitly named dependencies. > > > Make this as stand-alone as possible since other projects will need > it. The recent rdoc discussion springs to mind. yes, to my mind also. > > 2. create an archive class for ruby. this would hold just about any file and > > have a table of contents to be able to find files. > > > > 3. create modified versions of require and load which can use a $ARCHIVEPATH > > and a $ARCHIVEARRAY for require/load. in $ARCHIVEPATH we list directories to > > search for arhivefiles (which are marshalled versions of archive objects) and > > in $ARCHIVEARRAY we put already created archive objects (like the one we will > > create from the data at the end of a executable). > > > Check out previous discussion on RubyGems. I posted some code that had a > simple Archive class; maybe you can build on it. Was back in > october/november or so. Search for Ryan Leavengood and RubyGems. I know Hurst also had something along these lines in mind WAY back, will look into this. > > 4. write a tool which finds dependencies, creates a archive, creates a exe > > which will: > > - create a ruby interpreter (link staticly with libruby and we get the > > version used by the packager?) passing any arguments etc. > > - apply the require/load mods > > - read the archive from end of file (using argv[0] to find filename?) > > - create ruby object from data and stuff it into the $ARCHIVEARRAY > > - load the main script using the modified load (i.e from the archive at the > > end of the file) > > > > to me this at a glance seems doable and quite straigt forward :) any > > reflections? > > > It should be very doable and useful. It was what I had in mind for rbwrap > but the alpha worked ok for what I needed back then and then I never > updated it. fine, then i know this seems like a sound idea and something that doesn't exist. I hope to get some time during the holidays now to actually implement it :) -- ---------------------------------------------------------------------------. 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 | `--------------------------------------------------------------------------'