[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

when i using "rubyscript2exe", occur error

Cool Wong

6/26/2007 1:50:00 AM

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???

--
Posted via http://www.ruby-....

4 Answers

David Mullet

6/26/2007 11:43:00 AM

0

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....

David

http://rubyonwindows.bl...


--
Posted via http://www.ruby-....

Erik Veenstra

6/26/2007 1:46:00 PM

0

> > 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.erikve...


Erik Veenstra

6/26/2007 1:58:00 PM

0

> 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.erikve...

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

# 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!

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


Erik Veenstra

6/26/2007 4:00:00 PM

0

> Do you have windows xp or vista?

Both.

gegroet,
Erik V.