[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Rubyscript2exe windows executables, on Linux.

K.

4/13/2008 3:22:00 AM

I've downloaded rubyscript2exe, and:

$ ruby rubyscript2exe.rb HelloWorld.rb

will create a file called HelloWorld_linux which runs on linux.

The problem is that I'm trying to make a single .exe for windows
users.

I rm -rf'd the script, and then used ruby gems to install
rubyscript2exe (although it was stored only on my /var partition and
had to be moved to my /usr/local/bin) and it produced the same result.
7 Answers

Kyle Hunter

4/13/2008 5:28:00 AM

0

I don't think you can do that. Try running it under Wine.

It bundles ruby.exe and friends into an executable package. Obviously
Linux systems do not contains ruby.exe. There are probably other issues
as well.
--
Posted via http://www.ruby-....

Phillip Gawlowski

4/13/2008 5:44:00 AM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

K. wrote:
| I've downloaded rubyscript2exe, and:
|
| $ ruby rubyscript2exe.rb HelloWorld.rb
|
| will create a file called HelloWorld_linux which runs on linux.
|
| The problem is that I'm trying to make a single .exe for windows
| users.
|
| I rm -rf'd the script, and then used ruby gems to install
| rubyscript2exe (although it was stored only on my /var partition and
| had to be moved to my /usr/local/bin) and it produced the same result.


Compile Ruby with the MinGW32 cross compiler tools. AS to how to obtain
it, check your distro (`yum install mingw32-tools`, or some such thing).

The wxWidgets (*not* the wxRuby folks!) have an entry on how to use
MinGW32 to compile a windows binary:

See http://wiki.wxwidgets.org/Cross-Compiling_U...

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

~ The purpose of writing is to inflate weak ideas, obscure pure
reasoning, and
inhibit clarity. With a little practice, writing can be an intimidating and
impenetrable fog! -- Calvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail....

iEYEARECAAYFAkgBnY0ACgkQbtAgaoJTgL9VGQCgm/zKbRrtqB8dT5gXUaKJhCQo
0C0An1UBwn6YoYq6G2jswiyS6QCphjgd
=M/qF
-----END PGP SIGNATURE-----

James Tucker

4/13/2008 11:57:00 AM

0



On 13 Apr 2008, at 04:25, K. wrote:
> I've downloaded rubyscript2exe, and:
>
> $ ruby rubyscript2exe.rb HelloWorld.rb
>
> will create a file called HelloWorld_linux which runs on linux.
>
> The problem is that I'm trying to make a single .exe for windows
> users.
>
> I rm -rf'd the script, and then used ruby gems to install
> rubyscript2exe (although it was stored only on my /var partition and
> had to be moved to my /usr/local/bin) and it produced the same result.
>


If you alternately pack the executable using 7za.exe (from the extras
distribution) and p7zip, you can easily achieve this by compressing
and then:

cp 7za.exe myapp.exe
cat archive.7z >> myapp.exe

or on windows, use copy /b.

Marc Heiler

4/13/2008 6:34:00 PM

0

> I don't think you can do that. Try running it under Wine.

I actually *think* it is possible but I never tried it on my own.

After all, one can cross-compile on Linux, for a windows system.

So I am pretty confident that all this *should* work, but I never tried,
and would probably not manage anyway - but someone out there would
definitely manage :)
--
Posted via http://www.ruby-....

K.

4/14/2008 7:14:00 AM

0

Sorry, I meant to post:

god@box:~$ ruby -v
ruby 1.8.5 (2006-08-25) [i486-linux]

Running Debian Etch.

I only have an 8GB HDD, so installing wine was a last resort, but
thanks for the help.

Jano Svitok

4/14/2008 9:52:00 AM

0

On Mon, Apr 14, 2008 at 9:15 AM, K. <SxKorean@gmail.com> wrote:
> Sorry, I meant to post:
>
> god@box:~$ ruby -v
> ruby 1.8.5 (2006-08-25) [i486-linux]
>
> Running Debian Etch.
>
> I only have an 8GB HDD, so installing wine was a last resort, but
> thanks for the help.

I think it is possible to generate rubyscript2exe files on unix, BUT:
you'll need to rewrite dependency collecting.
It works by running the program and collecting all required files
(including the dll files). Since most probably you cannot
run the script under windows, you have to collect the files manually.
[1] show the generated file structure.

If you solve this problem, please let Erik know about it. He might be
interested.

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

Erik Veenstra

4/14/2008 11:44:00 AM

0

RubyScript2Exe can't cross compile directly. However...

It's possible to run Ruby for Windows on top of Wine on top of
Linux. And it's possible to run Ruby for Windows on Windows in
a virtual machine (e.g. VirtualBox) on top of Linux. In both
cases (depending on which virtual machine you're using), you
can access your native file system with your Ruby scripts.

RubyScript2Exe works in both cases.

I used to use the Wine option, but nowadays, I use the
VirtualBox option.

gegroet,
Erik V. - http://www.erikve...