Erik Veenstra
12/23/2004 11:53:00 PM
> 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.