From: Luis Lavena Date: 2007-10-24T02:35:03+09:00 Subject: Re: Stripping down One-Click Ruby Installer folder for deployment On Oct 23, 10:55 am, "Philippe Lang" wrote: > Luis Lavena wrote: > > On Oct 22, 9:35 am, "Philippe Lang" > > wrote: > >> Hi, > > >> I'd like to deploy an client ruby application by copying the > >> "c:\ruby" folder to the target computers. > > >> It works fine, except that c:\ruby is 177 MB big, and full of things > >> that are not necessary at all on client computers. > > >> I have tried keeping the following folders: > > >> - "c:\ruby\." > >> - "c:\ruby\bin" > >> - "c:\ruby\lib" > > >> It works, but I'd like to know if anyone has a more "scientific" > >> approach to that problem. What folders are absolutely needed? > > >> Note that I know about rubyscript2exe.rb; it works just fine for > >> small applications, but it's not an option in this case. > > >> Thanks! > > >> Philippe > > > Phillipe, most of the used space is wasted on documentation (in the > > form of yaml for RI and .html for Rdoc). > > > Those are located in lib\ruby\gems\1.8\doc and the share\ri > > \1.8\system > > > Also, try removing gems that you don't need for it. > > > I know, isn't "scientific" nor bulletproof, but will work :-) > > Hi Luis, > > This is the script I use. It strips down the c:\ruby directory from 179 > MB to 51 MB on my computer, and apparently, everything works. It is > still very big, but acceptable, especially when compressed in RAR: 14.3 > MB. > > ------------------------------------------------------------ > $OLD_PATH = 'c:\\ruby' > $NEW_PATH = 'c:\\ruby_stripped' > > require 'fileutils' > > FileUtils.rm_rf($NEW_PATH) > FileUtils.mkdir($NEW_PATH) > FileUtils.cp_r($OLD_PATH + '\\bin', $NEW_PATH + '\\bin') > FileUtils.cp_r($OLD_PATH + '\\lib', $NEW_PATH + '\\lib') > FileUtils.rm_rf($NEW_PATH + '\\lib\\ruby\\gems\\1.8\\doc') > ------------------------------------------------------------ > > If anyone is able to strip down the c:\ruby directory for deployment > even more, your help is welcome! > Yeah, it's possible. The thing is that Ruby (and One-Click) ship with a lot of things that you rarely will use (or you aren't aware they are present). Part of the idea for next releases of One-Click cover this topic, but still no plan on how that will be achieved. One of things will be Installer merge modules (MSM) to modularize the whole installer. I'm collecting a few questions for a survey [1] to focus on what users want/need for the next release. Please jump in to rubyinstaller- devel@rubyforge.org and provide feedback of what you will love it to have (or better/more questions for the survey). Regards, [1] http://rubyforge.org/pipermail/rubyinstaller-devel/2007-October/000202.html Luis