On Sep 21, 2:03=A0am, 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=3D
> :: begin long line
> ruby =A0C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe =A0diashow.rb --rubyscript2exe-verbose
> :: end long line
> set rubyopt=3D-rubygems
> pause
> </snip>
>
> Replace
> =A0 C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe
> by your absolute path to your rubyscript2exe
>
> Replace
> =A0 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%"=3D=3D"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=3D
> :: begin long line
> ruby =A0C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe =A0diashow.rb --rubyscript2exe-verbose
> :: end long line
> set rubyopt=3D-rubygems
> pause
> </snip>
>
> Replace
> =A0 C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe
> by your absolute path to your rubyscript2exe
>
> Replace
> =A0 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