Mission statement: Ruby application for Windows

Discussion in 'Ruby' started by Victor \Zverok\ Shepelev, Oct 12, 2006.

  1. Hi all.
    The following text is something like "what I'd want to see". I'm going to do
    this by myself... I'm going... some time.
    So, if somebody would be impressed enough to do this by himself, I would say
    no word against.

    Goal
    ----
    Obtain Windows executable (.exe) file from my Ruby script. I mean not to
    pack all-all-all files and libraries into one huge file, but something like:

    My-cool-app.exe
    Lib/
    *.so
    Doc/
    *.html
    ...and so on...

    Why?
    ----
    Not for obfuscation purposes.
    Just to deploy my application to other computers without Ruby installed.

    Why not .bat?
    -------------
    Of course, I can deploy ruby.exe, all *.so's, my-cool-app.rb and run.bat
    with command "ruby my-cool-app.rb".

    Bu I want .exe just for neatness. For Windows users only .exe programs are
    "first-class" ones, when batch scripts (.bat or .cmd) looks like
    "programmer's hack".

    Why not RubyScript2Exe?
    -----------------------
    As far as I undrestand, .exe files created by RubyScript2Exe, are
    dynamically unpacked to temporary folders, the way I personally dislike
    (there are many possible problems).

    OK, how?
    --------
    Suppose we have my-cool-app.rb, which uses some-library.rb and
    some-other-library.so
    Desired result would be:

    My-cool-app.exe
    Lib/
    msvcr71-ruby19.dll <-- or other DLL for other rubies
    some-other-library.so

    Here my-cool-app.exe is ruby interperter + all *.rb files IN RESOURCES.
    main() function inside my-cool-app.exe extracts my-cool-app.rb text from
    resources and gives it to interpreter; also Kernel.require modified so that
    libraries from exe resources can be require'd.

    That's all.

    Sounds reasonable, ha?

    Thanks. And sorry for my English.

    v.
     
    Victor \Zverok\ Shepelev, Oct 12, 2006
    #1
    1. Advertising

  2. On 10/12/06, Victor Zverok Shepelev <> wrote:

    > That's all.
    >
    > Sounds reasonable, ha?
    >

    So what you want is a hacked ruby interpreter that can read some stuff
    (like sources and command line arguments, possibly extra environment
    variables) from its resources. Once you get that you can pack your
    ruby script into the interpreter with a resource editor. Without
    packed arguments you could use it as a standard ruby interpreter.

    That should not be too hard. But for me it is not cool enough to
    bother installing development stuff on a Windows box.

    Thanks

    Michal
     
    Michal Suchanek, Oct 20, 2006
    #2
    1. Advertising

  3. >From: [mailto:] On Behalf Of Michal
    >Suchanek
    >Sent: Friday, October 20, 2006 8:28 PM
    >On 10/12/06, Victor Zverok Shepelev <> wrote:
    >
    >> That's all.
    >>
    >> Sounds reasonable, ha?
    >>

    >So what you want is a hacked ruby interpreter that can read some stuff
    >(like sources and command line arguments, possibly extra environment
    >variables) from its resources. Once you get that you can pack your
    >ruby script into the interpreter with a resource editor. Without
    >packed arguments you could use it as a standard ruby interpreter.


    Yeah, I know. I just have no time to do it now :(

    >That should not be too hard. But for me it is not cool enough to
    >bother installing development stuff on a Windows box.


    Question is: to bother WHO? I want to do some desktop utilities and put them
    onto my site (not for sale, but for fun). For typical Windows user it is a
    big difference between "just download and start the installer" and "for use
    this program, you must download and install Ruby (instructions) and those
    additional libraries (instructions)".

    >Michal


    V.
     
    Victor \Zverok\ Shepelev, Oct 21, 2006
    #3
  4. Victor \Zverok\ Shepelev

    Brad Tilley Guest

    Victor "Zverok" Shepelev wrote:

    > Goal
    > ----
    > Obtain Windows executable (.exe) file from my Ruby script. I mean not to
    > pack all-all-all files and libraries into one huge file...


    Rubyscript2exe is the best approach to this right now. One day, there
    will be more options in Ruby for Windows programmers. Personally, I like
    rubyscript2exe rather well, but you're right, like everything it is not
    perfect.

    IMHO, Ruby has four areas that will be improved soon:

    1. Performance => YARV will solve this.
    2. Better Threads => YARV will solve this.
    3. Unicode => m17n will solve this.
    4. Better Native Windows Apps => ???

    Once the Ruby Community addresses these issues, it'll be awesome! Not
    that it isn't awesome now. I will be happy when I can do everything in
    Ruby as easily as I can do them in Python. Personally, I enjoy using
    Ruby *much* more than Python (it's a much more user friendly language
    that isn't so restrictive), but in Python I can do more things today. I
    think this will change soon.

    Just my 2 cents.

    Brad

    --
    Posted via http://www.ruby-forum.com/.
     
    Brad Tilley, Oct 21, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank Buss

    Mars Rescue Mission Challenge

    Frank Buss, Nov 19, 2004, in forum: Java
    Replies:
    8
    Views:
    382
    Surendra Singhi
    Nov 20, 2004
  2. Frank Buss

    Mars Rescue Mission Challenge

    Frank Buss, Nov 19, 2004, in forum: C++
    Replies:
    1
    Views:
    327
    Howard
    Nov 19, 2004
  3. Ethan V
    Replies:
    2
    Views:
    430
    Ethan V
    Jun 23, 2006
  4. Replies:
    4
    Views:
    113
  5. Paolo

    Mission impossible?

    Paolo, Dec 5, 2008, in forum: Javascript
    Replies:
    4
    Views:
    101
Loading...

Share This Page