Hi everyone. This is my first blog post since the Google Summer of Code official coding period began. GSoC coding period started this week, on Monday, 23th May.

As a short reminder, I will underline progress I’ve made and presented in the previous posts:

Using emerge tool, I started to build KStars on Windows. Since this process could be very troublesome, I used a Windows 7 32-bit virtual machine. Actually, for building KDE sources, the KDE developers recommend the 32-bit version of Windows 7.

At the beginning I was needed to build the environment required by KStars. Basically, the environment means Qt and KDE Frameworks. After some errors I encountered, I managed to build them successfully.

After I built the environment, I went further, trying to build KStars. The initial attempt stopped at 89 percent. That was a great starting point, especially because that was the very first time when KStars was being built using emerge tool. After this partial success, I started to investigate what determined the building process to fail. Thus, I found that the compiler I had been using (Visual C++ Compiler) was having problems with a dynamically allocated array. I modified the code, keeping the functionality untouched, and after that, KStars has been successfully built. I was very happy when I finally managed to build it and at the same time I was deeply impressed by KStars’ performance on Windows.

After I tested KStars’ functionality, I went further and included its icons. Therefore, now it really looks like a veritable Windows software. I still have a small issue to fix: the main window icon is missing, the icon from the left of the top bar. I need to find out why this happens, solve and include it in the final KStars version.

Having KStars successfully built, including its icons, I kept it up-to-date with origin/master using “emerge – update kstars” command and at the same time, I began to work on developing an installer. The installer should include KStars sources along with all dependencies needed. Thus, the next challenge began.

Since the beginning, I knew that some KDE applications, as KDevelop, already have such an installer. After I have done some research, I decided to use the emerge tool again. It has its own method for generating the installer, based on NSIS tool. Therefore, I initially tried to follow the KDevelop example. I created the icon for the installer and I wrote the piece of code used by emerge to package KStars. Even though the code was identical with the code used for KDevelop, the command “emerge –package kstars” was not working. The error I was getting is the following:

“[WinError 3] The system cannot find the path specified: ‘C:\\K\\build\\kde\\kstars\\archive\\…’”

The first thing I looked at was the “kstars.py” file used by emerge tool for packaging. I looked at each line, one by one, but everything looked good. Also, I tried to build the dependencies folders’ hierarchy manually, but this didn’t help at all.As a final solution, I thought that CMakeLists.txt could actually be involved in the packaging process, so I tried to replicate its content in KStars with some necessary changes, then run “emerge kstars” and “emerge –package kstars” again. So I modified KStars’ CMakeLists.txt following KDevelop example, creating additional files as well (i.e.  KDevelopConfig.cmake.in => KStarsConfig.cmake.in). This proved to be unsuccessfully again. Finally, after me and my mentor, Jasem, spent lots of hours on debugging and tried several solutions, we found out why the packaging process did not succeed. It was a small bug in the Portage system: https://bugs.kde.org/show_bug.cgi?id=363467

After the installer has been successfully generated, I used a ‘blacklist.txt’ file in order to shrink the installer’s size. Currently, KStars installer has around 60 MB but I will continue this effort, trying to develop an installer as small as possible. My goal is to develop an installer with a total size smaller than 35 MB.

Next, on my ToDo list are:

  • shrinking the size of the installer
  • migrating INDILib client library to Windows
  • migrating Ekos to windows

To summarize, I am proud to present the alpha version of the KStars on Windows:

KStars installer – alpha version

Best regards,

Raphael

Advertisements