Re: "rubyscript2exe", cannot put picture in the project??? - RUBY

This is a discussion on Re: "rubyscript2exe", cannot put picture in the project??? - RUBY ; I have the same problem somebody know how to add picture please -- Posted via http://www.ruby-forum.com/ ....

+ Reply to Thread
Results 1 to 9 of 9

Re: "rubyscript2exe", cannot put picture in the project???

  1. Default Re: "rubyscript2exe", cannot put picture in the project???

    I have the same problem somebody know how to add picture please
    --
    Posted via http://www.ruby-forum.com/.


  2. Default Re: "rubyscript2exe", cannot put picture in the project???

    I can't do it, I use

    require 'rubyscript2exe'
    $pic = RUBYSCRIPT2EXE.appdir + '/t.jpg'
    picturebox2_img = Image.new($pic)

    where t.jpg is in the same directory with .rb file and when I run with
    ruby It works but when I convert to exe, and move to different directory
    it doesn't work :'(
    --
    Posted via http://www.ruby-forum.com/.


  3. Default Re: "rubyscript2exe", cannot put picture in the project???

    Pat Kiatchaipipat wrote:
    > I can't do it, I use
    >
    > require 'rubyscript2exe'
    > $pic = RUBYSCRIPT2EXE.appdir + '/t.jpg'
    > picturebox2_img = Image.new($pic)


    Why do you use $ in front of a local variable? AFAIK, that's reserved
    for system use.

    > where t.jpg is in the same directory with .rb file and when I run with
    > ruby It works but when I convert to exe, and move to different directory
    > it doesn't work :'(


    Try to include the jpg file by setting RUBYSCRIPT2EXE.lib, as explained
    by the docs.


    Best regards,

    Jari Williamsson


  4. Default Re: "rubyscript2exe", cannot put picture in the project???

    I still struggle with it :'(
    here's my code

    require 'wx'
    require 'rubyscript2exe'

    include Wx
    include RUBYSCRIPT2EXE

    RUBYSCRIPT2EXE.lib = ["t.jpg"]

    .....

    picturebox2_img = Image.new('t.jpg')

    .....

    I think when I convert to exe and delete file 't.jpg' application won't
    work because picturebox2_img is make from directory and when I restore
    't.jpg' from recycle bin it's work

    how can I add jpg to lib?? I do something wrong
    --
    Posted via http://www.ruby-forum.com/.


  5. Default Re: "rubyscript2exe", cannot put picture in the project???

    > I can't do it, I use
    >
    > require 'rubyscript2exe'
    > $pic = RUBYSCRIPT2EXE.appdir + '/t.jpg'
    > picturebox2_img = Image.new($pic)
    >
    > where t.jpg is in the same directory with .rb file and when I
    > run with ruby It works but when I convert to exe, and move to
    > different directory it doesn't work :'(


    Which command do you use to "compile" the application?

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


  6. Default Re: "rubyscript2exe", cannot put picture in the project???

    I install rubyscript2exe.gem
    and use

    rubyscript2exe calculator.rb

    in cmd and it create calculator.exe in the same directory
    what's wrong
    --
    Posted via http://www.ruby-forum.com/.


  7. Default Re: "rubyscript2exe", cannot put picture in the project???

    > I install rubyscript2exe.gem and use
    >
    > rubyscript2exe calculator.rb
    >
    > what's wrong


    Compiling a script, just, uh, compiles your script. It doesn't
    include the other application files.

    However, compiling a directory does include other files.

    Create the directory calculator, move calculator.rb to
    calculator/init.rb, move t.jpg to calculator/t.jpg and run the
    following command:

    rubyscript2exe calculator/

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


  8. Default Re: "rubyscript2exe", cannot put picture in the project???

    finally I can make .exe with picture!
    thank you very much )
    --
    Posted via http://www.ruby-forum.com/.


  9. Default Re: "rubyscript2exe", cannot put picture in the project???

    On Nov 19, 2007 3:36 AM, Jari Williamsson
    <jari.williamsson@mailbox.swipnet.se> wrote:
    > Pat Kiatchaipipat wrote:
    > > I can't do it, I use
    > >
    > > require 'rubyscript2exe'
    > > $pic = RUBYSCRIPT2EXE.appdir + '/t.jpg'
    > > picturebox2_img = Image.new($pic)

    >
    > Why do you use $ in front of a local variable? AFAIK, that's reserved
    > for system use.


    Variable names that begin with ($) aren't reserved for system use,
    they're global variables.

    Daniel Brumbaugh Keeney


+ Reply to Thread

Similar Threads

  1. Replies: 10
    Last Post: 09-26-2007, 05:14 PM
  2. Does anyone know if premiere has a "picture in picture" feature?
    By Application Development in forum Adobe Premiere
    Replies: 4
    Last Post: 06-15-2007, 11:47 PM
  3. Replies: 0
    Last Post: 03-21-2007, 01:26 PM
  4. """""""""""""""""""""Visual C++ 2005 Express"""""""""""""""""
    By Application Development in forum DOTNET
    Replies: 0
    Last Post: 03-12-2006, 03:55 AM
  5. Replies: 3
    Last Post: 09-27-2004, 06:37 PM