> > > Also while I'm writing to you, would it be possible to
> > > allow custom .DLLs and resources to be added? I have an
> > > application that uses a C++ extension which loads more
> > > .DLLs -- RubyScript2Exe does not automatically include
> > > those and I can't find a way of manually including them
> > > that works. (I can unpack and repackage, but then the
> > > .DLLs will still not get loaded from the temporary
> > > directory.)
> >
> > There's a link to Tar2RubyScript [4] on the page as well.
> > Tar2RubyScript generates a standalone Ruby script from an
> > existing directory, which contains a complete Ruby
> > application (scripts, DLL's and resources). This standalone
> > Ruby script can be converted to an executable with
> > RubyScript2Exe.
>
> But will the .DLLs really be found when I use Tar2RubyScript?
> I think I tried this without success.

I did it once. It was something like this:

 api = Win32API.new(newlocation("file.dll"), "proc", %w(P P P P), "V")

Newlocation the is path to "the internals of the package". (Of
course, it's a temp dir...)

But that only works when you directly access the DLL.
Otherwise, when you access the DLL indirectly, you have to
change the environment before starting the child process. Could
be done with:

 ENV["PATH"] = newlocation("bin/in/package").gsub(/\//, "\\\\") + ";" + ENV["PATH"]
 system("command")

You might have to combine them:

 ENV["PATH"] = newlocation("bin/in/package").gsub(/\//, "\\\\") + ";" + ENV["PATH"]
 api = Win32API.new(newlocation("file.dll"), "proc", %w(P P P P), "V")

Not tested. Just an idea.

gegroet,
Erik V.