From: "Florian Groß" Date: 2005-12-24T05:47:09+09:00 Subject: Re: Native cross-compiling (-packing) with GUI Meillo r e t u r n s wrote: > I want: > > 1) coding on a GNU/Linux-machine No trouble. You just need to find yourself a decent GUI. I've had good experience with jEdit and its Ruby plug in on Win32. It might work for you as well. > 2) creating GUI-programs (if possible with the luxus of a GUI-designer) I'd definitely go with GTK2 here. It's portable and native looking (not 100% to OS X, but there's work on that) on lots of platforms. It's Ruby bindings are highly comfortable and will make you feel like you are coding in Ruby. And there's Glade which will let you drag&drop GUIs together and save them to an XML file. It's then very easy to load those XML files from Ruby and to actually make things happen when widgets are clicked etc. > 3) compiling (or packing) against linux _and_ win32 (=cross-compiling) > ( 4) the compiled executable should fit on one 1.44-floppy ... if > possible ) There's no compiling, but at least for Win32 and OS X there is RubyScript2Exe. I'm not sure if it is also available for Linux, but if everything else fails you will be able to pack all your files into a single Ruby file for all platforms. And to binaries for others. Ruby executables tend to be bigger than applications written in C and Pascal, but the situation is still quite good. A game I wrote used 385 KB after UPX packing it. That is without additional SDL DLLs and data, however. I'm not sure if a single floppy disk is possible when also including the GTK2 libraries. Also, GTK2 might need to be installed separately so that your application works. This is a very simple procedure, however. Basically you just have to click "Next" in the installer a few times. X-Chat and Freeciv seem to include GTK2 itself in their installers, lately. So that is probably easy to do as well. TK will probably work without any setup, but it does less for you, the programmer. > Then i tried RubyScript2Exe, but it's not possible to cross-compile with > it (will it ever be??) It sounds very possible. I'm pretty sure the developer would be able to make this work if you ask nicely. > (does it run through wine? - haven't tried yet). I think so. > Another problem with it: i can't use UPX with a > RubyScript2Exe-OutputFile ... dont know why. This worked fine for me. Tried contacting the developer yet? Here's a few links: * Ruby-GTK2 library: http://ruby-gnome2.sourceforge.jp/ * Glade: http://glade.gnome.org/ * JEdit: http://www.jedit.org/ * JEdit's Ruby Plug in: http://www.jedit.org/ruby/ * RubyScript2Exe: http://www.erikveen.dds.nl/rubyscript2exe/index.html -- http://flgr.0x42.net/