Monday, May 19, 2008

Mono 1.9.1 and WinForms available for Maemo

During the last Novell HackWeek, me, Torello Querci and Jae Stutzman work a little on Mono packages for Maemo, we also worked a little on Tomboy port to Maemo. Last weekend I just released latest Mono for Maemo packages, the news include WinForms, ADO.NET, and Maemo-Sharp for Maemo 4 (OS2008).

If you want to play a little with the packages just add this repository to your N810:

deb chinook test

Sometimes pictures say more than a thousand words:

MonoCalendar (WinForms) running on N810

CSharpTetris (also WinForms) game running on my N810

And whoever wants to run Tomboy on N8xx devices, this is the one click install.

Packages are in test repositories for now because I am not sure about the way how we make packages available, looks a little hard to manage lots of small packages, we have now about 30 mono packages, we use the same package conventions of Mono for Debian/Ubuntu but maybe that is not the best way, as example, Python is distributed for Maemo in only one big package.

One big package looks bad for me so, my idea is to have only few packages and only Mono 2.0 (gmcs) stuff available:

  • mono-runtime
  • mono-system (including libralies, maemo-sharp and gtk-sharp)
  • mono-winforms
  • mono-data
If you have any idea about a better division of packages or some ideas, please send us a comment and we will check it for next version.

Friday, May 16, 2008

WebKit-Sharp and my FunnyBrowser

In my last article I blogged about how to create Mono bindings using GAPI, I used it to create WebKit-Sharp.

After a quick search in Google I found another implementation of WebKit bindings for Mono, you can find them there (, the problem is that those bindings were done by hand without using GAPI, probably because the author didn't use "gapi2-fixup" to customize and fix some information about webkit (You can find more information about it here).

Well, today I have just committed some of my local changes to webkit-sharp and the amazing "FunnyBrowser" sample, I have been using "FunnyBrowser" as my default browser now for one week and for basic navigation it works faster and uses less resources than Firefox.

Next weekend I am also planning to make packages available for Maemo if webkit works on it, I will keep you guys posted.

We haven't released webkit-sharp yet but you can found sources here:

OpenSUSE 10.3 packages are also available (including libwebkit) on my repository in the OpenSUSE Build Service:

I have plans to release FunnyBrowser as package when it works with GMail without problems.

Monday, May 12, 2008

Mono Bindings in 5 minutes

Last month at FISL 9 I met again with my good friend Henri Bergius, and he told me about Midgard news and showed me some changes on version 2 of Midgard Core. Midgard Core is a glib based library that could be used to persist glib objects on databases. Since it uses the GLib object model it is very easy to create binding for Mono, and that's what we did it at FISL days.

That was not the first time that I created Mono bindings for GLib libraries, I had done it before for Maemo libraries, and this weekend again for WebKit, but at this time I decide to create a project skeleton so everybody that is interested in creating Mono binding for Glib based libraries could use this skeleton for easy bindings creation.

The steps below describe how I easily created WebKit bindings without typing any lines of C# code.

First, download the skeleton file, unpack it and rename it to "webkit-sharp":

# wget
# tar -xzf monoskel-gapi.tar.gz
# mv monoskel-gapi webkit-sharp

Now, go into this new directory and run the script that will perform the magic:

# cd webkit-sharp
# chmod +x
# ./ webkit-sharp
# ./

We now have our source tree ready with autotools and makefiles. In the next step we must tell gapi where the C header files of the library that we want to make bindings for are. Open sources/webkit-sharp-sources.xml with your preferred text editor and type the following content:

<?xml version="1.0"?>
<api filename="webkit-sharp-api.raw">
<library name="webkit-1.0">
<namespace name="WebKit">

Here, the important information is "WebKit" that will be used as our namespace and "dir" that indicates the directory where our header (.h) files are.

And that is all, no changes needed anymore, you just need to run "make api" on the sources directory every time you change "webkit-sharp-sources.xml".

# cd sources
# make api

You can now follow the normal procedure to compile and install the linux package. On the package root directory, just type:

# ./configure
# make
# make install

If you are a developer, it should be easy to understand and create more samples in "samples" dir. There are also some "Package settings" that can be changed on top of "".

I did some other changes in my webkit-sharp like creation of webbrowser sample and checking for installed WebKit in On my next post I will show webkit-sharp in action.

More information about GAPI could be found here.