Friday, July 1, 2016

The folks over at KDE for Windows have done a tremendous job providing support for Qt5 and KDE Frameworks 5 builds under Windows using the emerge tool. Just a couple of months ago, building a KDE application on Windows was quite challenging with emerge failing to build the necessary frameworks needed for development.

But a lot has changed in the last few months leading to a relatively stable and consistent build experience. Furthermore, in the process of migrating KStars to Windows, I ran across a few bugs in KF5 multi-platform support, which is to be expected given the complexity of KStars as it leverages several KDE technologies simultaneously.

The largest obstacle to KStars windows port was Ekos/INDI support. INDI is a framework for astronomical device control and is available primarily on POSIX systems. It is based on a server/client architecture whereas the server manages the drivers controlling the devices while the clients communicate with the server.

Ekos is one such client and it is KStars flagship product for observatory control and automation. Hence, its support under Windows was paramount. Since most of the Ekos client code is written using Qt5/KF5 frameworks, porting it to Windows only took a couple of days. While Ekos under Linux can start INDI servers locally, this is disabled under Windows and only remote INDI control is available.

Nevertheless, Windows users could still use Ekos locally on Windows but using INDI Server for Windows which is an ASCOM to INDI bridge. That is, you can establish an INDI server that runs ASCOM drivers and present them as INDI-compatible devices.

Over the last few days, a lot of under-the-hood changes took place in KStars code base to enable it to work correctly under multiple platforms, including utilizing Qt resource system. The next obstacle was INDI Client library which KStars uses to communicate INDI server. It is only available for POSIX systems and cannot be used under Windows. Therefore, I developed a Qt5 backend for INDI Client library while making only minimal changes to the API. The new Qt5 backend worked quite well after working out all the quirks, and now KStars supports both the POSIX and Qt5 INDI client backends.

So after a lot of effort, I present you with KStars on Windows with Ekos/INDI support!

A 64bit 72MB Windows alpha release is now available for testing. There are still a few bugs that needs to be squashed and optimizations to be made, but it is overall stable. Report any bugs on KDE bug tracking site.