Jan
20
2011

Porting Kompas to Symbian - is it actually possible?

IT

If Kompas is described as "multiplatform", it must deserve this label. So I'm trying to port it to mobile devices, where it would be far more useful than just on the desktop. I don't have any of those MeeGo, Maemo, iOS or Android-powered devices where application development is a breeze. My smartphone runs Symbian and developing something bigger than prefabricated Hello World is a huge pain.

Here are the main four problems: Kompas is an pure C++ application with Qt front-end, it's using CMake and I'm developing it on Linux.

Originally Symbian hadn't even proper C++ support and having another GUI library than Symbian own was practically impossible. Thankfully, Qt is successfully ported to Symbian, so these first two problems are already fixed. But it makes the second two even worse.

CMake on Symbian

Qt is using qmake as main buildsystem, so who wants to develop with Qt on Symbian, uses that. The problem is that Kompas core library doesn't depend on anything, so it cannot use qmake from Qt, it must use CMake. Also I don't really think that qmake is capable of doing such things as CMake (like running an previously built executable to compile resource files), so porting would probably be difficult.

CMake can produce many different makefiles (Unix makefiles, MSVC makefiles, ...), but not for Symbian. Some porting effort is already done, but it currently seems that it would involve using Windows-only Carbide-c++ IDE. Not anything that I would want to install or use.

Now there are two possible ways: use qmake for Symbian building (a lot of evil hacking, but maybe it would work) or make CMake Symbian generator working (nearly impossible, but that would be the clean and nice way).

Symbian development on Linux

One year and half ago, when I made my first attempt to bring Kompas to life, I wanted to have it multiplatform. So I started with Symbian development on Linux. Then on Windows. Then I had one week full of bloody nightmares.

Symbian has one major problem - it's overloaded with its 30 year history. First it was EPOC16, then EPOC32, then Symbian. And it carries all the weight of centuries with itself. The "kernel" is still called EPOC32, the main function is still E32Main(), proper C++ support is done via external library (wtf?) and the buildsystem is awesome awful: one strange Windows-only binary takes three weird undocumented files with strage syntax and uses some specific Perl installation (5.6.1 Build 635) to generate Perl script which then generates an makefile which is then processed by another strange binary. Or maybe the process is different, I don't know and I don't want to know.

In order to be able to develop on Symbian, you have one successful choice and many unsuccessful choices. You can compile the executable with CodeSourcery's free compiler or with some another paid compiler, probably Windows-only. The free compiler is, guess what, a few years dead and unmaintained, the compiled applications are slow and it mostly doesn't work at all. You could use Carbide-c++, the only IDE for Symbian development or you could do compilation by hand, but the make process wouldn't probably stop on first error. It's then pain-in-the-ass to look for the real cause of problems via cmd.exe's awesome interface.

As Nokia did some work with Qt for Symbian, these things are probably well hidden and average developer will barely notice the handful of strange ancient binaries being run after clicking "Compile" in Qt Creator. Windows-only, of course, Linux is officially unsupported. Some good people tried to make port to Linux (using Wine and gnupoc zombie): Qt 4.6.3 and Qt 4.7.0. There are also ArchLinux packages for that (gnupoc-s60-5.0 and qt-symbian), but I didn't manage to get it working, because the files from Nokia are either available after registration or deleted, moved or modified.


Is it even possible to make it actually working on Symbian? Or shouldn't it be easier to destroy all Symbian devices in the world and make all people forget about that it ever existed and focus on developping for better platforms?

If there is anyone who managed to get anything done with Symbian and Qt on Linux and/or CMake and can help, please let me know. Thanks in advance.

» Add comment

Discussion: 0 comments

No comments yet.