Thursday, September 18, 2008


You might have heard me complaining about that issue already, but it is still an issue.
Every once in a while I come around checking the dependencies of a KDE package and then I find out that they are 1) either available, 2) available but not buildable (a lot of foss software on windows is hacked together, a.k.a. patched heavily) or 3) not even available. Availability means available for both of our compiler flavors (we currently use mingw 3.4.5 and Microsoft Visual Studio 2003/2005/2008). If the library builds and if it is not to much messed up we normally fix this case by finding a CMake patch for it. The latest library that took this way is exiv2 and I am glad to say that this patch will go upstreams for version 0.18. This is the good side.

Another dependency I have come across was mysql. It is used in several places throughout KDE, on of its use cases is as an embedded database for amarok. As a nice packager I made myself on the way to find this stuff. If you look at the MySQL page and you search for embedded, you will find "Thinking about using MySQL as an Embedded Database? Contact us online." with a link to the sales department. Ok, no money for that over here, so maybe they provide it somewhere else. Searching through the download section I found the rpms for red hat for the embedded db but the windows packages don't contain anything resembling the embedded library. And after searching a bit more I found the confirmation: Mysql doesn't provide the embedded library.
Hm, since it would benefit multiple packages, I thought, why not try to compile it myself. Ok, I downloaded the package and on the Build Instructions page they spoke about cmake which made me happy at that point. Even though I need to build the stuff myself, I just need to run
cmake && nmake && nmake install
and then I have my library. But it should get even more painful:
Before running cmake you need to run a javascript configure file.
Then you get a batch script which copies the CMakeCache.txt and then runs cmake for you - nothing more.
Then you have a Visual Studio project file.
Going through all available targets I couldn't find libmysqld.
There was no libmysqld. Ok, searching through CMakeLists.txt files gave me - nothing.
Their CMake build system doesn't contain that library. Only the autotools stuff as I found out - so autotools for Linux, a crippled CMake for Windows.

Is it really so hard to find somebody which knows enough cmake (or can read enough to understand the cmake help) to get a decent CMake buildsystem for mysql? Or is this simply a way to sell even if mysql is GPL?
I am pretty sure I will fix this in the future, but this is the point where I definitely will not contribute to GPL licensed code without a paycheck.

What this means:
- Gwenview will be hopefully enabled in the next windows packages for trunk and 4.1
- Amarok's mysql collection plugin will have to wait.
- All other users of mysql embedded will simply have to use the client with a server.

Monday, September 8, 2008

MarbleTalk: The result of my summer of code

I have never really written about my Google Summer of Code project, but now that I got the first really cool and visible feature in, I can't wait anymore.

As you might know Marble is not only a Qt/KDE application but also a widget that you can use in your application to provide the user with geographical data.
You can simply generate a KML document with QDomDocument and then use the addPlaceMarkData to load this file into the widget. You can check the implementation of digikam which has been the first application using this.

This part is not new, it was possible to load and display Placemarks (simple Points which contain a name and a location) before. But in my Summer of Code I reworked the KML parsing so that any KML file could be parsed and saved in an internal data structure and at the very end I made a model and a view for that. This view now went into a plugin (the geodata plugin), the model is now integrated into the structure and thus if you go within Marble to File->Open Map and you choose kdeedu/marble/src/plugins/marble/geodata/Marble writing.kml it will show you this now:

You can of course do a lot more with this, I am pretty sure. Here is a small draft of how to use the marbleWidget:

#include "marble/MarbleWidget.h"

using namespace Marble;
MarbleWidget *marble = new MarbleWidget( parent );
QString yourKmlData;
marble->addPlaceMarkData( yourKmlData );
delete marble;

But, you might ask, what has this todo with Vector Tiles for Marble? The basic idea of vector tiles is to render the data at the client rather than at the server side as it is done now. With the above said, we are ready to do this - rendering basically works and we now need to generate the data, implement some caching algorithms, etc. So you might not see this for 4.2's version of marble, but there is a good chance that this will be ready for 4.3.
p.s.: This all wouldn't have been possible without my mentor Torsten Rahn (tackat), so I want to thank him for this too at this point.