Forum: wxRuby Distributing Windows WxRuby apps

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eric R. (Guest)
on 2009-03-19 17:44
(Received via mailing list)
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?



Eric R.
Alex F. (Guest)
on 2009-03-19 17:56
(Received via mailing list)
Hi Eric

Eric R. wrote:
>
> 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.

> What other options do I have?
>

http://rubyforge.org/pipermail/wxruby-users/2008-O...

> 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?
>

I described how I do it here.
http://rubyforge.org/pipermail/wxruby-users/2008-O...

cheers
alex
Eric W. (Guest)
on 2009-03-30 16:08
(Received via mailing list)
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.

-- Eric W.
Alex F. (Guest)
on 2009-03-30 17:12
(Received via mailing list)
Eric W. wrote:
> 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.

a
Eric W. (Guest)
on 2009-03-30 18:18
(Received via mailing list)
On Mon, Mar 30, 2009 at 9:06 AM, Alex F. <removed_email_address@domain.invalid> 
wrote:
> 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.

-- Eric W.
Alex F. (Guest)
on 2009-03-30 23:16
(Received via mailing list)
Eric W. wrote:
> 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:

http://rubyforge.org/pipermail/wxruby-users/2008-O...

a
Eric W. (Guest)
on 2009-03-31 02:26
(Received via mailing list)
I saw, but I can't install anything on these machines.

--
Eric W. / rakaur @ malkier
Mario S. (Guest)
on 2009-03-31 07:50
(Received via mailing list)
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:
http://portableapps.com/development
Alex F. (Guest)
on 2009-03-31 10:09
(Received via mailing list)
Eric W. wrote:
> 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):

http://rubyforge.org/frs/download.php/35715/weft-q...

it's only an alpha release but it should allow you to assess the
viability of this approach.

a
This topic is locked and can not be replied to.