Mission statement: Ruby application for Windows

  • Thread starter Victor \Zverok\ Shepelev
  • Start date
V

Victor \Zverok\ Shepelev

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

Michal Suchanek

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
 
V

Victor \Zverok\ Shepelev

From: (e-mail address removed) [mailto:[email protected]] On Behalf Of Michal
Suchanek
Sent: Friday, October 20, 2006 8:28 PM

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

V.
 
B

Brad Tilley

Victor said:

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top