Skip to main content

Build from source

Temporary state of the master branch: prefer released version

Temporarily, branching, pull-requests, etc. are not used.
Only the master branch is present in github, and dev branches are managed locally.
Therefore The code in the master branch may contain bugs.
But it is normally possible to compile it.
To get started, it is advised to start on latest released source code, not the master branch:
https://github.com/StephaneCouturier/Katalog/releases

Summary

This page provides guidance to build Katalog from source.

Katalog now uses Qt6 and KF6 librairies, with cmake (and not qmake anymore).

Main steps to build Katalog:

  • Available on any platform (Linux, Windows, Apple)
  • Install Qt6 dev librairies (via your software manager, or https://www.qt.io/download, or Craft (Windows)
  • Install KF6 librairies via your software manager (via Craft on Windows)
  • Download the source code (latest released, or under development from the master branch)
  • Follow the command lines provided hereafter

Required librairies

Katalog is built from Qt6 and KDE KF6 librairies and so glibc >2.8, but it is also possible to build it on olders versions.

cmake Qt6 KF6 glibc 2.8 and after

Base

Based on instructions from: https://develop.kde.org/docs/getting-started/kirigami/setup-cpp/

For openSUSE: zypper install cmake kf6-extra-cmake-modules kf6-kirigami-devel kf6-ki18n-devel kf6-kcoreaddons-devel kf6-kiconthemes-devel qt6-base-devel qt6-declarative-devel qt6-quickcontrols2-devel kf6-qqc2-desktop-style

Additional devel packages for Katalog

For openSUSE: zypper install qt-charts-devel qt6-linguist-devel kf6-kxmlgui-devel

cmake Qt5 KF5 glibc before 2.8

Compiling the current state (v2.7 in preparation) with Qt5/KF5 with Kubuntu 22.04 has been done successfully once.

Base (might be incomplete)

build-essential cmake extra-cmake-modules qt5base-dev qt5-declarative-dev

Additional devel packages for Katalog

libqt5charts5-dev qttools5-dev-tools qttools5-dev -y qt6-l10n-tools

Build

set up new build dir

mkdir build

cd build

or for a distant build folder:
mkdir /home/user/developments/katalog/build

pre-compile

cmake -DCMAKE_BUILD_TYPE=Debug ..

or for a distant build folder:
cmake -DCMAKE_BUILD_TYPE=Debug /home/user/developments/katalog/build
cmake -DCMAKE_BUILD_TYPE=Release /home/user/developments/katalog/build

Typical output:

stephane@vbox:~/Documents/_Source_Katalog2> cmake -DCMAKE_BUILD_TYPE=Debug .
-- Building Katalog in Debug mode
-- Katalog Configuration Summary:
-- Version: 2.7
-- Qt6 Version: 6.9.0
-- Build Type: Debug
-- C++ Standard: 17
-- Configuring done (0.4s)
-- Generating done (0.2s)
-- Build files have been written to: /home/stephane/Documents/_Source_Katalog2

compile

make

QtCreator or other IDE

Once the first build is successful, Katalog build can usually be launch from your QtCreator or the IDE of your choice.

Translation build commands

Update .ts files (not needed to build)

cmake --build . --target translations_lupdate

Compile .qm files

cmake --build . --target translations_lrelease

Copy .qm files to source

cmake --build . --target translations_copy

Other

Memory check tool:

valgrind --tool=memcheck --leak-check=full --track-origins=yes ./Katalog

Run

Simple run from build directory

./Katalog

Run with debugs to a log file

./Katalog > debug_output.txt 2>&1

Generate portable

To be documented.