I’ve developed a WxRuby app that only runs under Windows. I’ve been
using
RubyScript2exe to build an executable for distribution, but it stopped
working one day and I haven’t been able to figure out why. I’m also not
very confident that it will work when I go to Ruby 1.9.
What other options do I have? I could use InstallShield, or something
like
it to install ruby.exe along with my .rb files and any DLLs, etc. that I
may
need. Someone suggested that I switch to IronRuby and run my app with
.NET’s DLR. Does WxRuby work with IronRuby?
How are other people distributing WxRuby app on Windows?
I’ve developed a WxRuby app that only runs under Windows. I’ve been
using RubyScript2exe to build an executable for distribution, but it
stopped working one day and I haven’t been able to figure out why.
Try packaging it so that error messages are put to the console and run
it from the terminal. It should show what’s wrong.
I could use InstallShield, or something like it to install ruby.exe
along with my .rb files and any DLLs, etc. that I may need. Someone
suggested that I switch to IronRuby and run my app with .NET’s DLR.
Does WxRuby work with IronRuby?
Not AFAIK.
How are other people distributing WxRuby app on Windows?
How long before you figure there will be a bytecode compiler deal (a
la kava for perl) for 1.9? I would imagine this is one of the big
giant reasons to use 1.9.
How long before you figure there will be a bytecode compiler deal (a
la kava for perl) for 1.9? I would imagine this is one of the big
giant reasons to use 1.9.
You can already save and load compiled instructions for the Ruby 1.9
virtual machine, using the VM::InstructionSequence class in Ruby core.
However in the ruby distribution the method VM::InstructionSequence.load
is disabled, but if you uncomment the relevant line (in iseq.c, near the
end) and compile ruby, you can run ruby from saved VM instructions. I’ve
tried it (to a limited extent) and it works.
The reason it’s disabled is ‘there is no verifier’ - which I believe in
part reflects concern about cross-version compatibility of VM
instructions - but if you’re distributing your own Ruby with your GUI
app, this may not matter.
You can already save and load compiled instructions for the Ruby 1.9 virtual
machine, using the VM::InstructionSequence class in Ruby core. However in
the ruby distribution the method VM::InstructionSequence.load is disabled,
but if you uncomment the relevant line (in iseq.c, near the end) and compile
ruby, you can run ruby from saved VM instructions. I’ve tried it (to a
limited extent) and it works.
That’s very interesting, but not totally what I’m looking for. Kava
for Perl is a total packager into an exe. Perhaps it compiles the
bytecode and compresses the interpreter into an exe, I’m not sure.
RubyScript2Exe is unacceptably slow, so if “extract exe and all
libraries every time” is still the way to go, I can’t use that. The
users of my GUI apps have no admin rights on their computers so I
can’t install Ruby (or anything else). They only thing they can write
to is a home directory on a network share. Right now I just have a
version of Ruby shared on the network and we use that to run things,
but it sucks.
That’s very interesting, but not totally what I’m looking for. Kava
for Perl is a total packager into an exe. Perhaps it compiles the
bytecode and compresses the interpreter into an exe, I’m not sure.
RubyScript2Exe is unacceptably slow, so if “extract exe and all
libraries every time” is still the way to go, I can’t use that. The
users of my GUI apps have no admin rights on their computers so I
can’t install Ruby (or anything else). They only thing they can write
to is a home directory on a network share.
To get round this - esp the time taken to unzip the ruby interpreter
plus the (not small) wxruby libs plus everything else, I create a
Windows installer using NSIS which installs a custom ruby, the ruby .dll
and all the ruby library files needed. There’s some more details and
links to the implementation code here:
I saw, but I can’t install anything on these machines.
Eric W. wrote:
They only thing they can write
to is a home directory on a network share.
Write permission to somewhere is enough to install with this approach.
It uses a self-contained Ruby, so nothing needs to go in any system
directory, and no changes to PATH are needed. I don’t have admin rights
on my work machine but this don’t prevent me installing this way.
Try using the Weft QDA 1.9 installer and setting the target directory to
X:/MyStuff/Weft (or whatever your networked home dir is called):
I wish to point out another option, that I’ve come across dealing with
something of other sorts. PortableApps. http://www.portableapps.com,
They
use a NSIS Script, that doesn’t actually install anything, but creates
an
Environment to execute a program, to keep it portable. If you look at
the
contents of one of their programs, you’ll see that the actual
application is
stored into a folder named apps, while the actual executable used to
launch
the application, is just an NullSoft Installer executable.
Specifically look at this page, at Step 4:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.