[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Native cross-compiling (-packing) with GUI

Meillo r e t u r n s

12/23/2005 7:44:00 PM

Hi community,

i'm brand new to Ruby, but i like what i've seen by now.


After some time with Lazarus ( http://lazarus.free... ) and gcj (
http://gcc.gn... ) i unfortunately haven't found what i am really
looking for. I hope i'll find it in Ruby.


I want:

1) coding on a GNU/Linux-machine
2) creating GUI-programs (if possible with the luxus of a GUI-designer)
3) compiling (or packing) against linux _and_ win32 (=cross-compiling)
( 4) the compiled executable should fit on one 1.44-floppy ... if
possible )

my aim:
I want to share my programs to friends of mine (mostly windows-user),
and i dont want any installation-routine - i just want one executable
(or a folder with exe, dll/so, textfiles, etc) - so that i can explain
them: "download [file] from [url], unzip, and double-click on
[name].exe"



i searched the web for the last 3 days, but couldn't find really
anything that matches point 3) from above - i tried exerb (of course)
but couldn't create a working fox-gui-program (perhaps that was just a
fault of some miss-matching versions :-? ) ... but fox could be good - i
think
Then i tried RubyScript2Exe, but it's not possible to cross-compile with
it (will it ever be??) (does it run through wine? - haven't tried yet).
Another problem with it: i can't use UPX with a
RubyScript2Exe-OutputFile ... dont know why.



so, if someone of you does have any hints, ideas, links, experiences,
etc for me - please tell me about them.


... and dont try to convince me to give up my goals - you wouldn't
succed ;-)


so far
Meillo r e t u r n s


3 Answers

Florian Groß

12/23/2005 8:47:00 PM

0

Guillaume Marcais

12/24/2005 3:08:00 PM

0

Le 23 déc. 05, à 14:44, Meillo r e t u r n s a écrit :

> Hi community,
>
> i'm brand new to Ruby, but i like what i've seen by now.
>
>
> After some time with Lazarus ( http://lazarus.free... ) and gcj
> (
> http://gcc.gn... ) i unfortunately haven't found what i am
> really
> looking for. I hope i'll find it in Ruby.
>
>
> I want:
>
> 1) coding on a GNU/Linux-machine
> 2) creating GUI-programs (if possible with the luxus of a GUI-designer)
> 3) compiling (or packing) against linux _and_ win32 (=cross-compiling)
> ( 4) the compiled executable should fit on one 1.44-floppy ... if
> possible )
>
> my aim:
> I want to share my programs to friends of mine (mostly windows-user),
> and i dont want any installation-routine - i just want one executable
> (or a folder with exe, dll/so, textfiles, etc) - so that i can explain
> them: "download [file] from [url], unzip, and double-click on
> [name].exe"
>
>
>
> i searched the web for the last 3 days, but couldn't find really
> anything that matches point 3) from above - i tried exerb (of course)
> but couldn't create a working fox-gui-program (perhaps that was just a
> fault of some miss-matching versions :-? ) ... but fox could be good -
> i
> think
> Then i tried RubyScript2Exe, but it's not possible to cross-compile
> with
> it (will it ever be??) (does it run through wine? - haven't tried yet).

I don't think it will be possible to cross-compile with RubyScript2Exe.
My quick experiment of ruby with wine was not very successful.
Although, one thing that stopped me is that wine implementation is
based on win98 and the tools from win32-utils[1] works only on 2000/XP.
It might be possible to get wine to work as 2000/XP, not sure.

Maybe it is doable to use qemu or another hardware emulator to
test/package your script on windows without leaving your linux machine.

At this point, I also do all my development on Linux, but when the time
comes to package the app for windows, I run it on windows. At least to
see what it looks like and iron out the remaining cross-platform
wrinkles.

Guillaume.

[1] http://rubyforge.org/projects/w...



Erik Veenstra

12/24/2005 3:48:00 PM

0

> I don't think it will be possible to cross-compile with
> RubyScript2Exe.

Indeed, cross-compiling with RubyScript2Exe is not possible.
Because of the gathering of files from your own Ruby
installation, RubyScript2Exe creates an executable for the
platform it's being run on. In theory, you could trace the
application on Linux and gather the library files and gems it
uses from the Windows version of Ruby. I've investigated that
and it didn't make me happy. For me, personally, there was no
need for it either.

> Maybe it is doable to use qemu or another hardware emulator
> to test/package your script on windows without leaving your
> linux machine.

I run Linux on my laptop. On top of that, I installed Windows
98 in a virtual machine, using QEMU, and Windows 2000 in
another. Such a virtual machine is just one big file on the
native machine. When I have to boot a (not *the*) instance of
Windows 98, I simply run "win98clone abc", which copies the
original win98.img to win98-abc.img (if it doesn't already
exist...) and starts the virtual machine. In my win98-dev.img
(created with "win98clone dev") I installed Ruby+GEMS+LIBS,
FPC, RubyScript2Exe, Tar2RubyScript and other tools I need to
build an application. When it's time to test the executable, I
run "win98clone test", which results in win98-test.img, another
copy of the original win98.img. No Ruby, no tools, just Windows
98. (Both Windows 98 machines run concurrently on top of
Linux!) Hopefully, this machine is able to boot the
application.exe I created on the development machine...

There's one directory (/scratch) on my native machine that's
available as S:-drives in all Windows machines. Transferring
data from one machine to another is no problem at all.

Conclusion:

* Develop the application on Linux.
* Build application.exe on Windows98-dev.
* Test application.exe on Windows98-test.

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