Bejegyzések

Enable localization for KStars on Android

As a first KDE application, KStars got localization working on Android. KStars has the traditional gettext translations in the KDE system and these translations had to be downloaded, converted and packaged inside the apk. The basic steps were to enable localization on Android: 1. Set CMake variable KDE_L10N_AUTO_TRANSLATIONS to ON. This step will automatically download the translations during the build with a custom build target "fetch-translations". 2. Convert the translations from .po extension into .mo format. This step was done with a custom build target in CMake: IF (ANDROID)     ADD_CUSTOM_TARGET(convert_translations_to_android ${CMAKE_SOURCE_DIR}/tools/convert_translations.sh ${CMAKE_BINARY_DIR}/android/export/share/kstars                         WORKING_DIRECTORY ${CMAKE_BINARY_DIR})     ADD_DEPENDENCIES(convert_translations_to_android fetch-translations) ENDIF () The convert_translations.sh script can be found here: https://github.com/KDE/kstars/blob/m

Improving the reliability and usability of KStars

The goal of my GSOC project to continue the improvements over the codebase what was started previous year. Improving the reliability and bring modern C++ features. I have the following goals for the first period to make KStars better: - Fix additional findings by the tools developed previous year. - Refactor codes to modern C++11/C++14 what I get in touch while fixing bugs. I fixed all finding by several static code analyzers like Coverity, Clang Static Analyser, Clang Tidy, Clazy, Krazy and cppcheck. I kept refactoring the include files with nullptr, #pragma once guard and in-class initalization of variables. There will be significant improvements in the Android build process of KStars Lite by removing multiple hacks left from previous year and using the latest Android NDK/SDK versions. My mentor: Jasem Mutlaq

Finalizing the GSoC project for KStars

I worked on the KStars during this summer to improve the codebase with C++11 features with Google Summer of Code. I spent the last month to write the first GUI tests for KStars and KStars Lite. KStars Lite can be built and run also on Linux host now although it was developed for Android by a previous GSoC student in 2016. Additional contributions include fixing some bugs found by Clang Sanitizers, usability improvements and templeted FITS decoding. The GSoC period was successful, the goals were reached, but if I would have still more time...

The achievements during the second GSoC period in KStars

In this month, I have been working on fixing bugs found by static code analyzers in KStars. All of the tools are open-source or they can be used for free by open-source projects: - cppcheck : C++ source code analyzer. - Clazy :  Qt-oriented static code analyzer by KDE for C++ based on Clang. -  Clang Static Analyzer : Clang Static Analyzer is a Clang-based static code analyzer for C++. - Krazy : Code analyzer by KDE. - Coverity :  Coverity is a commercial C++ static code analyzer from Synopsys, but it is free for open-source projects. If you want to give these analyzers a try, you can pick the build scripts from the tools directory of KStars Git repository and try in your project following our wiki page on the bottom. Meanwhile I keep fixing memory handling bugs what I find when I test KStars built with runtime sanitizers  and adding C++ smart pointers to certain places to make pointer-handling more safe. I also try to minimize the unnecessary includes over the codebase to c

The achievements during the first GSoC period in KStars

I was able to do major improvements to the build system of KStars. I think more and more open-source projects should pick up these low-hanging fruits with CMake and Clang: - CCache: Speed-up the development time and working with git branches by caching the compiled object files. - Unity Build: This simple "hack" can reduce the build time dramatically by compiling temporary C++ meta files in which the normal C++ files are included. The build time can be speeded up to 2x-3x for bigger projects. - Clang Sanitizers: Use undefined behavior and address sanitizers to hunt down memory handling errors. Although the executable must be recompiled with Clang and special compiler flags, the resulted binary will run with minimal slowdown. It is not a complete replacement, but these sanitizers can catch most of the problems found by Valgrind during normal runtime. - Clang Format: Format the source code with a real compiler engine. More details are on our wiki page: https://techbase

Modernizing KStars codebase during GSOC

KStars has a long history and many developers touched the >136000 lines of C++ codes . The goal of my GSOC project to do a major overall improvement and bring the modern C++ features to improve the stability as well as fix the memory handling errors. I have the following goals in June to make KStars better: May 30th to June 26th:  ● Add ccache support  ● Add hardening support to the CMake build system (improve security)  ● Add Clang specific improvements to the CMake build system  ● Add Clang sanitizers to the CMake build system  ● Run the KStars application with the sanitizers enabled and fix all memory error found by these tools  ● Add Unity build to the CMake build system to cut the build time  ● Refactor codes to modern C++11/C++14 what I get in touch while fixing bugs.  ● Add documentation about the improvements and the sanitizers to the wiki pages. My mentor: Jasem Mutlaq