rpminihan
9/22/2008 4:46:00 AM
On Sep 21, 2:03 am, Axel <a99.googlegroups....@dfgh.net> wrote:
> Hello,
>
> I had the same problem two weeks ago and managed to solve it with the
> following .bat file.
> (The bat file starts rubyscript2exe.)
>
> Short version:
>
> <snip>
> set rubyopt=
> :: begin long line
> ruby C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe diashow.rb --rubyscript2exe-verbose
> :: end long line
> set rubyopt=-rubygems
> pause
> </snip>
>
> Replace
> C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe
> by your absolute path to your rubyscript2exe
>
> Replace
> diashow.rb
> by the path to your ruby file you want to convert into an exe.
>
> Long version:
> <snip>
> @echo off
> cd
> :: Setting working dir to the dir of this .bat file:
> cd %0\..
>
> if "%OS%"=="Windows_NT" ((cd /d %~dp0)&(goto next))
> echo %0 | find.exe ":" >nul
> if not errorlevel 1 %0> cd %0\..
> :next
> echo Working dir:
> cd
>
> set rubyopt=
> :: begin long line
> ruby C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe diashow.rb --rubyscript2exe-verbose
> :: end long line
> set rubyopt=-rubygems
> pause
> </snip>
>
> Replace
> C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe
> by your absolute path to your rubyscript2exe
>
> Replace
> diashow.rb
> by the path to your ruby file you want to convert into an exe.
>
> I'm using:
> - gem 1.2.0
> - rubyscript2exe-0.5.3
> - ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
> - Windows XP Home, running with administratory rights (right English
> wording?)
>
> Please let me know if this works for you, too.
>
> Have a nice day,
>
> Axel
One little change. ruby C:\ruby\lib\ruby\gems\1.8\gems
\rubyscript2exe-0.5.3\bin\rubyscript2exe %1
--rubyscript2exe-verbose
%1 in the command line allows you to specify the path+filename of the
ruby program on the command line. Makes your script a little more
generic.
Ryan