Forum: Ruby when i using "rubyscript2exe", occur error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
645cd831f3b2eee7ba15fd8256796c57?d=identicon&s=25 Cool Wong (coolwong)
on 2007-06-26 03:49
When i using the "rubyscript2exe", there occur error. Because i cannot
use any picture in the project. How can i put picture in my project that
no error after built the .exe file???
Bfa670ef2303deb7dec5a8027367b30b?d=identicon&s=25 David Mullet (mully)
on 2007-06-26 13:41
Cool Wong wrote:
> When i using the "rubyscript2exe", there occur error. Because i cannot
> use any picture in the project. How can i put picture in my project that
> no error after built the .exe file???

Embed the image in your executable using:

  RUBYSCRIPT2EXE.bin = ['my_image.jpg']

For complete details, see:

  http://www.erikveen.dds.nl/rubyscript2exe/index.html#3.3.1

David

http://rubyonwindows.blogspot.com
6b0967f63d03e99b6c07a3f5ed224c77?d=identicon&s=25 Erik Veenstra (Guest)
on 2007-06-26 15:46
(Received via mailing list)
> > When i using the "rubyscript2exe", there occur error.
> > Because i cannot use any picture in the project. How can i
> > put picture in my project that no error after built the
> > .exe file???
>
> Embed the image in your executable using:
>
>  RUBYSCRIPT2EXE.bin = ['my_image.jpg']

Aagh!!!! Unless the image happens to be an executable as well...

gegroet,
Erik V. - http://www.erikveen.dds.nl/
6b0967f63d03e99b6c07a3f5ed224c77?d=identicon&s=25 Erik Veenstra (Guest)
on 2007-06-26 15:59
(Received via mailing list)
> When i using the "rubyscript2exe", there occur error. Because
> i cannot use any picture in the project. How can i put
> picture in my project that no error after built the .exe
> file???

Which error?

If you want to embed images and other files, see the example
below, and read the documentation on the site.

gegroet,
Erik V. - http://www.erikveen.dds.nl/

----------------------------------------------------------------

 # Example on Cygwin:

 $ ls -l hw/
 total 2
 -rw-r--r-- 1 erik mkgroup-l-d  13 Jun 26 14:58 README
 -rw-r--r-- 1 erik mkgroup-l-d 161 Jun 26 15:19 init.rb

 $ cat hw/init.rb
 require "rubyscript2exe"
 exit if RUBYSCRIPT2EXE.is_compiling?
 puts File.read(RUBYSCRIPT2EXE.appdir("README"))

 $ ruby rubyscript2exe.rb hw/
 Tracing hw ...
 Gathering files...
 Copying files...
 Creating hw.exe ...

 $ ./hw.exe
 Hello World!
E4e25f13d8f44743b9338bbae19ba808?d=identicon&s=25 juan pedro meriño (Guest)
on 2007-06-26 16:05
(Received via mailing list)
Do you have windows xp or vista?

2007/6/26, Erik Veenstra <erikveen@gmail.com>:
6b0967f63d03e99b6c07a3f5ed224c77?d=identicon&s=25 Erik Veenstra (Guest)
on 2007-06-26 18:00
(Received via mailing list)
> Do you have windows xp or vista?

Both.

gegroet,
Erik V.
This topic is locked and can not be replied to.