From: Hidetoshi NAGAI Date: 2006-10-24T09:24:33+09:00 Subject: Re: ruby & activeTcl run solely from a usb flash drive From: Sari Connard Subject: ruby & activeTcl run solely from a usb flash drive Date: Tue, 24 Oct 2006 03:37:54 +0900 Message-ID: <8aeb4732622a32ff4373d0fbb96aa435@ruby-forum.com> > My goal is to run a ruby (gui/tk) from a usb flash drive. When I created a CD-R for running Ruby (One-Click Ruby) + ActiveTcl on the CD-R, I used the following batch file to initialize environment of a command-prompt. --------------------------------------- @echo off rem *** initialize *** set ENVROOT=%~dp0 set RUBYVER=182 set TCLVER=8.4 :arg_check if "%1"=="" goto setup if not "%1"=="8.5" goto check_85 set TCLVER=8.5 shift goto arg_check :check_85 if not "%1"=="85" goto check_8.4 set TCLVER=8.5 shift goto arg_check :check_8.4 if not "%1"=="8.4" goto check_84 set TCLVER=8.4 shift goto arg_check :check_84 if not "%1"=="84" goto check_root set TCLVER=8.4 shift goto arg_check :check_root set ENVROOT=%~f1 shift goto arg_check :setup echo env_root is %ENVROOT% echo add %ENVROOT%ruby%RUBYVER%\bin and %ENVROOT%ActiveTcl%TCLVER%\bin to PATH set PATH=%ENVROOT%ruby%RUBYVER%\bin;%ENVROOT%ActiveTcl%TCLVER%\bin;%PATH% set RUBYBINPATH=%ENVROOT%ruby%RUBYVER%\bin rem set RUBYOPT=rubygems set ENVROOT= set RUBYVER= set TCLVER= --------------------------------------------------------- On the CD-R, extracted Ruby and ActiveTcl files were placed like as the next. --------------------------------------------------------- ./Windows/rubytk-setup.bat ./Windows/ActiveTcl8.4: MANIFEST README.txt bin/ demos/ doc/ include/ lib/ license.terms ./Windows/ActiveTcl8.5: MANIFEST README.txt bin/ demos/ doc/ include/ lib/ license.terms ./Windows/ruby182: ProgrammingRuby.chm doc/ installer/ readme.txt share/ ReleaseNotes.txt freeride/ lib/ samples/ uninst.exe bin/ include/ man/ scite/ --------------------------------------------------------- -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)