Biz & IT —

KDE goes cross-platform with Windows, Mac OS X support

The KDE development community is working on porting the open-source desktop …

The open-source KDE desktop environment is making the jump across platforms with broad support for Windows and Mac OS X. The core KDE desktop programs, the KOffice suite, and the Amarok music player are actively being ported.

These efforts are largely made possible by the inherent portability of Trolltech's Qt development toolkit, the underlying framework used by KDE software. Qt is designed for cross-platform portability and even uses native widgets on both Windows and Mac OS X. Trolltech uses a multi-licensing model that makes Qt available under the GPL for open-source software development and requires programmers to buy a commercial license for proprietary development. Previously, only Mac OS X and Linux/X11 versions were available under the GPL, but Trolltech decided to make the Windows version available under the GPL too with the introduction of Qt 4. This finally opened the door for porting open-source KDE applications to the Windows operating system.

There are also several key technologies in the KDE 4 stack that make the desktop environment more conducive to porting. The most notable of these technologies are the Phonon multimedia abstraction layer and the Solid hardware wrapper library, which are both described in my recent review of KDE 4.0.

The KDE development community's adoption of CMake is another major factor that has contributed to the increased portability of the desktop environment. KDE's build system was previously based on Autotools, an intractably arcane and grotesquely anachronistic cesspool of ineffable complexity that makes even seasoned programmers nauseous. The migration to CMake instantly simplified portability issues because CMake has very robust built-in support for generating makefiles for widely-used compilers on all three major operating systems. CMake can even automatically generate project files for commonly-used IDEs like KDevelop, Visual Studio, and XCode.

After Alexander Neundorf performed the initial migration from Autotools to CMake for the core KDE libraries, it took developer Benjamin Reed only two days to get it to the point where it could compile on Mac OS X. This was seen as a major breakthrough for portability. Additional details about KDE's CMake adoption and the implications thereof can be found in an article written by Neundorf.

With the build system issues resolved, the last major hurdle was removing platform-specific code from the core libraries and major applications. This work was mostly done by Holger Schroder and the aforementioned Benjamin Reed. Schroder did much of the legwork for the Windows port and Reed worked on the Mac OS X port. Their efforts are beginning to pay off and many KDE applications currently work surprisingly well on alternate platforms.

Running KDE on Windows 

A new KDE snapshot release for Windows was issued yesterday, and the binaries are currently available from KDE mirrors. A simple installation program allows users to select desired KDE packages and will then automatically resolve the dependencies, download, and install the necessary pieces. I put it to the test on Windows XP in VMware to see how well it works.

My basic KDE installation on Windows used about 600MB and included the KDE games collection as well as the core applications and libraries. Major applications are mostly functional with only minor rendering glitches and a few remaining platform-related bugs. When I tested the Windows port of the Konqueror web browser, I noted many serious HTML rendering bugs, but the user interface worked flawlessly. I also tested the Dolphin file manager, which had a number of minor issues. For instance, the progress bar in the Dolphin status bar has some nasty rendering glitches and it can't figure out the path of the home directory. Some of the applications, like the Kate text editor and many of the KDE games, worked almost flawlessly.

I'm very impressed with the current progress of the Windows port and what I have seen of the Mac OS X port impresses me too. The Mac OS X port is approximately 1GB and consists of universal binaries, which means that the applications will run on both Intel and PPC Macs. For additional details about the Mac OS X port, check out this recent blog entry written by Reed. The binaries can be obtained via BitTorrent from the KDE TechBase page for the Mac OS X port.


The Konqueror web browser running on windows

The Kate text editor running on windows

The Dolphin file manager running on windows

The Kmahjongg tile game running on windows

Presentations about cross-platform KDE support were amongst the highlights of the recent KDE 4 release event, which I attended last week at Google headquarters in California. Reed is looking forward to engaging with the Mac OS X enthusiast community to help improve KDE support on Apple's operating system. He also expressed strong enthusiasm for CMake. "Things just worked that I thought we would have to spend a lot of time working on," said Reed at the event. "A lot of things work out of the box right now."

KDE developer Aaron Seigo also spoke about KDE's cross-platform ambitions and discussed some of the broader implications. Bringing popular KDE programs to Windows and Mac OS X is somewhat controversial in the open source software community, because doing so is seen by some as a means of eroding incentives for Linux adoption. Seigo and many in the KDE community contend that making KDE applications available on other platforms brings more freedom and choice to Windows users and gives them the ability to adopt open standards and establish an easier migration path to Linux.

Broad support for Windows and Mac OS X is an ambitious goal, but the KDE development community appears to have made a very good start in that direction. Many of the new abstraction layers in KDE 4 are geared towards increasing portability and reducing dependence on platform-specific mechanisms. KDE definitely enriches the Windows and Mac OS X software ecosystems and will likely be welcomed by many.

It is also worth noting that the manner in which these porting efforts are being undertaken—with a largely uniform code base for all major platforms and very few instances where divergent code paths are used to resolve platform-specific issues in individual applications—is very positive because it will ensure that portability doesn't detract from the quality of the applications or turn Linux into a second-class citizen. I look forward to seeing how a stronger commitment to cross-platform compatibility will influence the evolution of KDE on the desktop.

Channel Ars Technica