Lately I've been dedicating some of my time trying to work with
MONO, the free .NET Framework project.
The effort began when I first tryed to compile
Another Block in Mono for Linux, just for fun, to see how much work I would have to put on it to make it compile successfully. Of course I knew that the first problem would be the access to the registry that I make, to keep configs and high score. Linux has no registry, so I removed everything related to the registry from the source code, and made a note to myself to change everything to XML (which by the way I still haven't done). After that, I had some problem with the audio library I use (
nBASS), but I was interested in playing the game, so I removed that too, to check later, and compiled it. It compiled and ran, but the game itself didn't work.
So I went to check it out, and see why it didn't work. If it was something related to the graphics, and so on. The problem was the graphic components. MONO doesn't implement the namespace System.Windows.Forms completly yet, and this part is still under heavy development.
That made me give up porting Another Block for Linux for a while, but I started studying other possibilities of implementing graphical interfaces with MONO. The most obvious way is to use GTK+. There is a package called
GTK# that integrates GTK+ with MONO, and it works both in Windows and Linux. I think that GTK applications are not very beautiful, and QT would be much better, but the
QT# project is "dead" because of "lack of interest", they said. There are several GUI possibilities for MONO listed
here, but GTK# is the best implemented until now.
So, I'm wondering how would I design an interface for GTK#... Glade# is the answer.
Glade is a GUI designer for GTK+, and Glade# is its biding for GTK#. Another disapointment: it's not at all easy to draw the simplest interface using Glade, inspite of its usability being similar to any GUI designer application I've used. The positioning of the components is somehow complex. Anyway... That wouldn't stop me, so I design my "Hello World" window, and following
this tutorial, I make it work.
Note: I'm using
SharpDevelop, compiling everything with MONO, but still in Windows.
Well, it worked very nicely, and now all I have to do is try to design things a little better using Glade, and then try to compile all this in Linux to see if it works. I suppose it will. It's easy to port MS .NET Framework to MONO, since MONO is a very well done project (at least the current version is). Still, one would have to program every aspect of the interface, like making the references to the GTK objects, creating the events, and all, manually. That bothered me, since when you program using Windows.Forms, the IDE (VS.NET or SharpDevelop) does everything for you. I searched the net for a solution, but I couldn't find one, so I began doing my own. Now I have an application that gets a glade file and generates a SharpDevelop project with the class that will use the glade file as a resource for creating the GUI. It's getting pretty nice, and I'll post it soon.
Well, that it! I'm getting really excited about this... Finally, a way of easily making good software for Linux that really works (or so I think). I'm posting all this to basically tell people the way of searching how to use MONO, I guess. As soon as I polish the application that generates the class to use the Glade interface, I'll post it! Bye!