SIL LSDev Linux Development

Language software for Linux and Mac OS X

Status of WorldPad on Linux

Our team’s main focus has been to port the SIL FieldWorks suite of translation and linguistic programs from Windows to Linux.

We’ve ported the core C++ parts which are the foundation of all the FieldWorks applications. A big part of the remaining work is in C# to get Translation Editor and Language Explorer to build and run in Linux.

But tackling Translation Editor would be quite a big step and open up a lot of difficulties all at once. So first we’re working to port WorldPad. Although WorldPad won’t be as widely used as Translation Editor, our work on WorldPad is a stepping stone on the way to completing the Translation Editor because many pieces of WorldPad are shared by Translation Editor. And completing the Translation Editor will be easier if we first work on WorldPad.

Read the rest of this post…

Updated code repository to latest from Dallas

As much of our porting work has been dealing with Windowsisms in the lower levels of the FieldWorks code, which wasn’t expected to change a lot in the Dallas VCS, the code in our local VCS had grown quite out of date. Two and a half years out of date!

Since we’re now using areas of the code that have had a lot of changes during that time, there was an increasing need to update our local VCS to reflect the latest from Dallas.

First I migrated our VCS from CVS to SVN – a welcome change. (I can rename directories now!)

Then we merged in the new code from Dallas, resolved the conflicting files (only 93), and made things still compile in Linux.

After having approached this with apprehension, I was thankful that it was easier than I had anticipated and only took two and a half weeks.

And now we’re up to date!

libcom 0.4.0 released

The libcom COM Support Library version 0.4.0 has been released. This is the first release of libcom. libcom is licensed under the LGPL.

libcom implements a subset of Microsoft COM (Component Object Model) and supports both C++ and C# (via Mono) COM clients and servers on Linux. libcom is similar to ole32.dll in Windows.

libcom can be downloaded from http://linux.lsdev.sil.org/wiki/index.php/Downloads.

Update: libcom now has its own web page at http://linux.lsdev.sil.org/wiki/index.php/Libcom.

C++ accessing C# COM objects through CCW in Mono on Linux

Recently we had a couple developers from other offices join us for LSDev Linux Brainstorming Week to learn from one another, talk about technology choices, and do some pair programming.

Recognizing that parts of our C++ code need to be able to access and work with C# objects through COM (Component Object Model), Eberhard and I set out to test this in Mono on Linux.

We were successful in making a C# application create a regular C# object and a C++ object (via libcom and RCW), pass the C# object to the C++ object, have the C++ object modify the C# object from native code, and then back in C# code observe that our C# object was indeed manipulated successfully from C++.

This capability to call back and forth between C# and C++ using COM is very important for porting several SIL programs to Linux, and we were concerned about whether it would even be possible with Mono. We found out several months ago that C# calling into C++ using libcom and Mono RCWs worked, and I was pleased to find that going the other direction, C++ calling C#, elegantly Just Works.

This new test works thanks to Jonathan Chambers‘s implementation of COM Callable Wrappers (CCWs) in Mono, which was announced here.

Eberhard and I largely reused existing libcom test code and just made some additions. The steps to perform this test and an explanation of what is happening can be found on our wiki here.

Packaging for multiple platforms on Hydra vserver

HydraThere are a number of SIL projects which would benefit from an organized way of being packaged for multiple Linux distributions. In addition to supporting several distributions, we would like to support the current and previous distribution releases as well as both 32- and 64-bit architectures.

The way we have chosen to do this is to host each kind of system as a vserver guest all on one physical machine. VServer is more like an advanced chroot than a virtual machine, and is faster and closer to the hardware than other kinds of virtualization. A script could build packages for each platform by invoking each guest’s package-building process.
Developers could also log in to experience and test their software on any of the supported platforms without having to set up such a machine themselves.

Hydra, our multi-headed monster, named for its many guests on one base machine, is being set up to host these guests.

For more information, see the wiki page for Packaging and testing.

COM in Linux

The core of SIL FieldWorks was written in C++. New development in FieldWorks is done in C#, and ties into the C++ core through COM.

After much looking all over the Internet in January 2005, I basically concluded that not only does no one use COM in Linux, but no one wanted to (outside of big enterprise application ports to UNIX).

When both porting FieldWorks to Linux and making it cross-platform, we lose access to Microsoft’s COM implementation in Windows. We were originally going to use SWIG to generate C# wrappers around the C++ core libraries. All C++ methods would then be P/Invoked, and COM would be bypassed.

Then I found that Jonathan Chambers had put a lot of good work into Mono‘s COM support. I was able to have a C# COM client access a C++ COM server in Windows using Mono.

Read the rest of this post…

Mono 1.2

Today I read the Mono 1.2 release notes. A few things stuck out to me:

  • full implementation of 1.0 and 2.0 APIs
  • full SWF 1.1 API
  • MONO_IOMAP setting may help with some potential crossplatform issues
  • Bundles. If our COM implementation ends up being rather Frankenstein (or really cutting-edge :) ), Bundles would let us distribute our own custom Mono along with the application. I don’t really see this as a desirable solution, but it’s nice to know it’s there.
  • “Support for the registry is now provided on Linux and Windows.”

Introducing Mark Strobert

Hey, I’m Mark Strobert. I’m the one from Delaware. Yay, Delaware.
We’re working on making our language software cross-platform. Right now I’m looking at how we can best connect a C# COM client to a C++ COM server in Linux.