Thursday, November 13, 2008

Mono 2.0.1 for Nokia devices

Last weeks lots of people contact me to ask about Mono 2.0 packages for Maemo, I have been working to get it done and I finished it some moments ago (03:02am now). So, instead of I big post what I did is updated the documentation on Mono's website.

For more information about how to get it working check:

you could be also interested to get more information about scratchbox:

And the mandatory screenshots:

Tomboy running on N810 (Mono 2.0.1)

PEditGtkSharp running on N810 (Mono 2.0.1)

Package Manager showing Mono 2.0.1 runtime package

Let me know if you found some problems.

Wednesday, June 18, 2008

Mono WinForms DataGrid progress

I have been working on our implementation of Winforms DataGrid last months, most of patches is not applied yet but last week some of then comes to our SVN.

Pictures say more than a thousand words, so:

And there is a Linux version:

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.

Monday, March 17, 2008


Ok, I promised several blog entries about GARMONO. However, for the last couple of weeks I've been busy fixing some issues with the WinForms DataGrid, which I will talk about in another entry. Today, let us talk about GARMONO and how it can help us automatically create Mono packages for Maemo.

One of the problems I ran into when I created the first set of Mono packages for Maemo was that it was a hard task with lots of procedures. A few weeks ago, during hack week, we decide to automate the process using GARMONO (when I say "we" I mean, Torello Querci, Jae Stutzman, and myself) and it has proven to be a very good idea. For those of you that may not understand what GARMONO is, think of it as a build-script that works within scratchbox to automate some of the more tedious tasks that would have to be done by hand or with other scripts. GARMONO provides a single "make" command that takes care of downloading mono src and creating deb files, etc. However GARMONO alone will not produce maemo packages, this is where Scratchbox comes in.

Maemo uses Scratchbox for cross-compilation. Scratchbox provides a build environment with all of the maemo provided dependencies so that developers can produce Maemo binaries. We need to use Scratchbox to create the platform (ARM) specific things that the mono runtime requires. Scratchbox uses QEMU for ARM emulation, the problem is that some ARM syscalls (242, 264, 299) are not yet implemented in QEMU. These missing syscalls can cause problems in MCS, making it impossible to compile assemblies for ARM. The solution is to create a Scratchbox devkit. It provides a set of tools that can be executed on the host instead of target device and thus reduces the time needed to build packages.

Instead of providing the instructions on how to build the devkit in this blog, I will just point you to the wiki entry that we created on the Mono Wiki:

Please know that in order for you to execute these instructions you must first to have Scratchbox and Maemo SDK installed, instructions can be found here.

Again, I would like to credit Jae Stutzman and Torello Querci for their support of the work in GARMONO and Maemo.

Monday, February 25, 2008


One of hard things of cross-platform development with WinForms is that you always need to test in both Linux and Windows. My second development environment is Cygwin running on Windows but when I need to travel somewhere, I also need to have this Cygwin environment available on my Windows Virtual Machine.

Andreia made a very good tutorial about how to create a Mono+Cygwin Installation and Compilation, and I've used it for years. However, sometimes I lose my environment or have problems when trying to compile a new Mono version and I need to install it over and over.

When I noticed that Gnome had GARNOME (a build tool that allows users to build the GNOME Desktop), I thought that it would be nice if we had one tool like this not only to build Mono but also to install some dependencies on environments like Cygwin. That is how GARMONO was born. GARMONO is based on GAR software and if you need moreinformation about it a good place is to check is this article in Linux Journal.

We can use GARMONO to build Mono on Cygwin, Linux, Maemo and also use it to generate packages (.deb for Nokia N810). So, I will start a series of blog entries about this, but today let us talk about Cygwin.

Compiling and installing Mono on Cygwin can be a hard task but I believe it is much easier using GARMONO. First, you must get your Cygwin environment installed and working. Also, make sure that you have installed automake, bison, gcc, gdb and libtool. These packages are necessary if you want to build anything.

So, now let us download and unpack GARMONO. For this, log into your Cygwin environment and type:

# wget
# tar -xzvf garmono.tar.gz
# cd garmono

Now we just need to build Mono:

# make cygwin/build

And that is all! GARMONO will download and install all dependencies and later will download and install Mono in your ~/mono. It will also create a bash script with all environment vars needed to use Mono. To call this script just type:

# source ~/mono/bin/monoenv

You could also put this line in your .profile or .bash_profile script.

Over the next several blog entries, I will give more tips about GARMONO and how use it in Maemo and Linux environments.