For creating a linux compatible version of DelftShell/DelftTools the following steps were required:

  1. Setup a up to date mono environment.
  2. Get DelftTools/DelftShell compiled under mono
  3. Make sure all unit tests work
  4. Review non working parts of the software
  5. Setup a linux mono build agent

Setup a mono environment.

A seperate linux pc using the latest ubuntu version was installed. Unknown User (don) and Fedor Baart have administration rights. The system runs ubuntu 7.10, xgl, beryl, mono 1.2.3 and the latest monodevelop version. Several relevant libraries are installed. Most sources can be found under /home/baart_f/checkouts.
You can login using a local xserver and putty after you get an account from Fedor Baart.
Also available are a teamcity agent and a sourcecode browser webserver

Get DelftTools/DefltShell compiled.

This went pretty smoothly. DelftTools compiled without alteration, DelftShell had some references to the webbrowser. This wasnt implemented in 1.2.3 and only partially in 1.2.4. Currently someone from novell is working on getting libmozembed working as a system.windows.forms. webbrowser. Seems to be going well. I used precompile statements to filter out code not working in mono yet.

Make sure all unit tests work.

Some unit tests did not work at first. These were all errors which could easily be resolved. Most off them were due to some post build events with windows bat commands. One bug in log4net was found and not further examined. Code could be easily refactored to work.

//old
Log.InfoFormat("message {0}", "parameter");
//new
Log.Info(String.Format("message {0}", "parameter"));

Review not working parts.

The only part which is not working currently is the DotNetBar. I checked through the source code of DotNetBar and found it to be somewhat messy. It is not going to work on linux because it has P/Invoke calls and references to user32.dll all over the place. It is possible to send these calls to wine but that's probably to much of a hack.
Since linux users are not accustomed to using dockable windows my first approach will be to create a non docking version of the following files:

  • mainwindow.cs
  • tabviewmanager.cs
  • statusdisplay.cs
  • viewlist.cs
  • splashscreen.cs
    This is were all the references to the dotnetbar are located.

Another option we took into consideration was to use a GTK# docking frontend and to load the System.Windows.Forms control in there. There are three main reasons why this option is not the first choice:

  • We are trying to limit the number of windowing toolkits. Gtk+ is currently not used so we would increase the number of windowing toolkits if we did.
  • Using Gtk+ as the default windowing toolkit is not an option as it is not very native looking under windows.
  • Using two concurrent windowing toolkits requires two concurrent main event loops, not a good idea.

Setup a linux mono build agent.

The buildserver has DelftShell working under windows thanks to Unknown User (don). Im not sure how to build the linux version from the command line. I can build projects using the xbuild command. I couldnt yet find a way to build whole solutions. I'll check further next week.

what's next?

Next up is creating a nondocking mainwindow and finishing the mono build agent so people will get a message when they break things under linux.

  • No labels