SIL LSDev Linux Development

Language software for Linux and Mac OS X

Translation Editor running on Linux!

TE Draft View of Jonah in Sena

Today was a milestone. We demonstrated the Linux version of FieldWorks TE to a group of people at the office chapel time. It worked well enough for the demo, in that it wasn’t slow and didn’t crash, and the people were impressed :-)

Progress has been very rapid in the past month or two, for several reasons, but today was the first time that we felt TE was ready to show to others. It was helpful to have the extra incentive of a scheduled demo for the final push to get things working on a non-developer machine.

Read the rest of this post…

Why Firebird? Why not a Different RDBMS?

David asked, “I’m curious to know why Firebird has been chosen as a database engine [for FieldWorks] out of the many other RDBMSs out there, such as MySQL.”

I get this question from time to time, especially when I go to our Computer Technical Conference (CTC), which comes around every two years.  It is a fair question, and since CTC is just a month away, I’m taking the opportunity to remember why we did what we did. I had to ask the people that made the decision, because I had a hard time remembering. It’s been a few years.

FieldWorks started out as a Smalltalk project. When the Smalltalk vendor went under (as I have heard), someone mapped the object data to SQL Server. This was SQL Server 7.0, I think, back before the turn of the century. (Literally.) We have since upgraded to SQL Server 2000, then 2005. (We don’t have any plans currently to move to 2008.) The application code was ported to C++, then newer code was done in C#. You’ve seen various entries from Mark and others about porting that.

I have made at least two studies over the years about which RDBMS to port to. I’m not sure MySQL even existed during the first study, but I know it wasn’t mature enough to do what we wanted at the second study. By the time MySQL had matured–how much may still be a matter for debate–we had already had work underway porting to Firebird.

At one time I had recommended we go with PostgreSQL, and we did head in that direction for a while. However, PostgreSQL needed Cygwin at the time, and Firebird already had a native Windows implementation. Also in Firebird’s favor was the fact that it could be embedded into the application, and this has always had a strong pull for some on the team. Also, it was thought that it would be easier to port the SQL that SQL Server uses to Firebird than it would be to port it to PostgreSQL. Finally, we had a volunteer who knew Firebird and was able to give a significant amount of time. We are in fact indebted to him for laying the foundation of the database port to Firebird.

So the team dropped PostrgeSQL in favor of Firebird.

We have looked at object-oriented datababses as well. None were open source during most of time we made our decisions. We have looked db4objects, but have decided to continue with Firebird for now. Perhaps the biggest reason is that the jump to another SQL RDBMS has already shown to be difficult. Jumping to an object-oriented database would be compound the difficulty.

We have tens of thousands of lines of SQL code for FieldWorks now. Most of it is now ported to Firebird. We still need to put it through unit tests and regression testing.

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.

Because WorldPad is older than Translation Editor, we’ve first changed some of the underlying technology to put us in a better position to transfer our work to Translation Editor. WorldPad in Windows is a C++ application wrapping views, a library in the FieldWorks code that allows fast display and editing of writing systems with complex scripts and other unique features required by minority language writing systems.

We’re writing another WorldPad, WorldPadGTK, using C# and embedded the view in a GTK window. WorldPad in Linux will be a C# GTK application wrapping views.
WorldPadGTK Screenshot 20080829

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!

A long-awaited breakthrough

Our porting work depends on having a link from C# to C++ using COM. This is a fundamental requirement, and without it we cannot proceed. Although we’ve had this working in small test programs for a long time, it would crash badly when we tried it with our application (WorldPad, part of FieldWorks). We were fairly sure it was something we were doing wrong, but could never pin it down. Well, now Tom and Brent have found the solution!

Read the rest of this post…

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.

Graphite and OLPC

It may not have been obvious from the last two posts, but we are taking steps towards getting Graphite working on the OLPC. Read the rest of this post…

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.

Our own OLPC

We’ve just received our own OLPC hardware, through the beta programme. It is an XO B2. The hardware is really nifty, although surprisingly heavy. The software is still a little rough in places, but continues to improve at an amazing rate.

We’ll be experimenting with it in all kinds of ways, but the real reason for having it is so that we can try porting various pieces of our software to it and see how well they work on it. In particular, we’d like to see how Graphite performs there.

« Previous Entries