[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

RubyScript2Exe 0.2.1

Erik Veenstra

12/18/2004 5:28:00 PM


Just released RubyScript2Exe 0.2.1 [1].

* Added (experimental) support for detecting and embedding Ruby
gems. I don't claim that it works flawlessly under all
circumstances, but it worked on my installation (Linux). Did
a couple of tests, simple situations. Is somebody able and
willing to help? Any RubyGems hackers?

* Added --eee-list .

gegroet,
Erik V.

[1] http://www.erikveen.dds.nl/rubyscript2exe/...

2 Answers

Muir af Elfhjelm

12/20/2004 2:52:00 PM

0

Erik Veenstra wrote:
> Just released RubyScript2Exe 0.2.1 [1].
> ...
> [1] http://www.erikveen.dds.nl/rubyscript2exe/...

From the page:
> Well, RubyScript2Exe includes an application (your script)
> and only parts of the rubylib tree (it's stripped specifically
> for that application).
> ...
> RubyScript2Exe monitors the execution of your script.

Is there a risk that a interactive or otherwise sporadically
executing application might not get all of its dependencies
included in the bundle, or am I reading too much into that
statement?

Good job in either case.

M



Erik Veenstra

12/23/2004 11:53:00 PM

0

> From the page:
>
> > Well, RubyScript2Exe includes an application (your script)
> > and only parts of the rubylib tree (it's stripped
> > specifically for that application).
> >
> > RubyScript2Exe monitors the execution of your script.
>
> Is there a risk that a interactive or otherwise sporadically
> executing application might not get all of its dependencies
> included in the bundle, or am I reading too much into that
> statement?

True. "RubyScript2Exe monitors the execution of your script."
In other words: If a particular "require" isn't executed, it
isn't copied into the executable either. If you know that some
"require" might fall through and still want to load it only
under special circumstances, you might want to use the
following lines at the beginning of your script:

require "always"
if ENV.include?("--exit")
require "somewhereintheapplicationbutnotnow"
exit 1
end

Pack it with:

$ ruby rubyscript2exe.rb app.rb --exit

This loads the files which might otherwise fall through and
prevents executing of (the rest of) the script.

That's what I do when I know a script is going to be packed
with RubyScript2Exe.

gegroet,
Erik V.