From 60d9299d458aec2ebf22cb38593d38792076c3c4 Mon Sep 17 00:00:00 2001 From: Andre Rummler Date: Tue, 15 Sep 2026 23:23:32 +0200 Subject: [PATCH] New installation instructions for Qt6/CMake. Proposal: translations as INSTALL_XY.md --- INSTALL | 179 --------------------------- INSTALL.md | 349 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README | 30 ++--- README.md | 102 ++++++++-------- 4 files changed, 415 insertions(+), 245 deletions(-) delete mode 100644 INSTALL create mode 100644 INSTALL.md diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 04817c0cf..000000000 --- a/INSTALL +++ /dev/null @@ -1,179 +0,0 @@ -[Qt6 / CMake] -Building the Qt6 line with CMake additionally requires the private -development headers of QtGui. On Debian/Ubuntu these live in a separate -package that is NOT pulled in by qt6-base-dev: - - apt install qt6-base-private-dev - -(other distributions: install your Qt 6 "private headers" development -package, e.g. qt6-qtbase-private-devel on Fedora) - -QET needs the private QtGui API (QPdfEngine) for clickable hyperlinks in -the PDF export. Without the package, find_package(Qt6 ... GuiPrivate) -succeeds but CMake later fails at generate time with: -"Imported target Qt6::GuiPrivate includes non-existent path". - -[ca] -Dependències: -libQt5 (paquets libqt5*) -cupsys-bsd per imprimir - -Com compilar: -$ qmake (qmake-qt5 pels sistemes basats en Debian) -$ make -# umask 0022 -# make install - -[en] -Requirements : -libQt5 (see packages libqt5*) -cupsys-bsd for printing - -Howto compile : -$ qmake (qmake-qt5 for Debian-based systems) -$ make -# umask 0022 -# make install - -[fr] -Pré-requis : -libQt5 (paquets libqt5*) -cupsys-bsd pour l'impression - -Comment compiler : -$ qmake (qmake-qt5 pour les systèmes basés sur Debian) -$ make -# umask 0022 -# make install - -[de] -Abhängigkeiten: -libQt5 (Pakete libqt5*) -cupsys-bsd zum Drucken - -Kompilieren: -$ qmake (qmake-qt5 für Debian-basierende Systeme) -$ make -# umask 0022 -# make install - -[ru] -Зависимости: -libQt5 (пакет libqt5*) -cupsys-bsd для печати - -Как компилировать?: -$ qmake (qmake-qt5 для систем основанных на Debian) -$ make -# umask 0022 -# make install - -[pt] -Dependências: -libQt5 (ver pacotes libqt5*) -cupsys-bsd para impressão - -Como compilar: -$ qmake (qmake-qt5 para sistemas baseados em Debian) -$ make -# umask 0022 -# make install - -[es] -Dependencias: -libQt5 (paquetes libqt5*) -cupsys-bsd para imprimir - -Cómo compilar: -$ qmake (qmake-qt5 para los sistemas basados en Debian) -$ make -# umask 0022 -# make install - -[cs] -Požadavky : -libQt5 (viz balíček libqt5*) -cupsys-bsd kvůli tisku - -Jak program sestavit : -$ qmake (qmake-qt5 u systémů založených na Debianu) -$ make -# umask 0022 -# make install - -[pl] -Zależności: -libQt5 (pakiety libqt5 *) -cupsys-bsd do druku - -Sposób kompilacji: -$ qmake (qmake-qt5 dla systemów opartych na Debianie) -$ make -# umask 0022 -# make install - -[it] -Dipendenze: -libQt5 (vedi pacchetti libqt5*) -cupsys-bsd per la stampa - -Come compilare: -$ qmake (qmake-qt5 per sistemi basati su Debian) -$ make -# umask 0022 -# make install - -[el] -Απαιτήσεις: -libQt5 (δείτε για πακέτα libqt5*) -cupsys-bsd για εκτύπωση - -Πως να το μεταγλωττίσετε: -$ qmake (qmake-qt5 για συστήματα βασισμένα σε Debian) -$ make -# umask 0022 -# make install - -[nl] -vereisten: -libqt5 (zie pakketten libqt5 *) -cupsys-bsd om af te drukken - -Hoe te compileren: - $ Qmake (qmake-qt5 voor Debian-gebaseerde systemen) - $ make - # Umask 0022 - # Make install - -[be] -Vereisten: -libQt5 (pakketten libqt5*) -cupsys-bsd voor het afdrukken - -Hoe te compileren : -$ qmake (qmake-qt5 voor systemen op basis van Debian) -$ make -# umask 0022 -# make install - -[da] -Krav: -libQt5 (se pakke libqt5*) -cupsys-bsd til udskrivning - -Hvordan man kompilerer: -$ qmake (qmake-qt5 for Debian baserede systemer) -$ make -# umask 0022 -# make install - -[ja] -必要条件 : -libQt5 (パッケージ libqt5* を参照) -cupsys-bsd 印刷用 - -コンパイルの方法 : -$ qmake (Debian ベースのシステムでは qmake-qt5) -$ make -# umask 0022 -# make install diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 000000000..44d37d05a --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,349 @@ +# Building QElectroTech from source + +QElectroTech is built with **CMake** and requires the **current Qt6 only**; Qt5 and the +old `qmake`-based build described in earlier versions of this file have +been retired. + +## 1. Getting the source + +QET uses git submodules, so clone recursively: + +```sh +git clone --recursive https://github.com/qelectrotech/qelectrotech-source-mirror.git +cd qelectrotech-source-mirror +``` + +If you already have a non-recursive clone: + +```sh +git submodule update --init --recursive +``` + +## 2. Requirements + +| Component | Status | Notes | +|---|---|---| +| CMake ≥ 3.5 | required | CMake 4.3+ is also fine, see note below | +| C++17 compiler | required | GCC or Clang on Unix-like platforms; MSVC or MinGW-w64 g++ on Windows — see [Choosing a compiler](#3-choosing-a-compiler-unix) / [Building on Windows](#6-building-on-windows-msvc--mingw) | +| Qt6 base + widgets | required | | +| Qt6 **GuiPrivate** headers | required | needed for clickable PDF hyperlinks; **hard build failure** at CMake generate time if missing, see below | +| SQLite3 | required | used by the nomenclature/summary database | +| Qt Linguist tools (`lrelease`) | required | compiles the tracked `.ts` files into `.qm` as part of every normal build | +| pugixml | handled automatically | fetched and built via CMake FetchContent if not already present on the system — see [pugixml](#8-pugixml) below | +| Qt Test module | required if building tests | `PACKAGE_TESTS` is `ON` by default; QtTest ships as part of the base Qt6 dev packages listed below on every platform, no extra package needed | +| KDE Frameworks (KF6) | optional | see [Building without KDE Frameworks](#9-building-without-kde-frameworks) | +| QtPdf module | optional | see [PDF page import](#7-pdf-page-import-qtpdf) | + +A note on CMake versions: the project declares a minimum of 3.5 but is +routinely built with much newer releases; if your CMake is older than 4.3 it +simply won't have the newer `SQLite3::SQLite3` target name, which the build +script compensates for automatically. There is nothing you need to do either +way. + +## 3. Building (out-of-source build) + +Always build in a separate directory from the source tree — in-source builds +are not supported. + +```sh +mkdir build +cd build +cmake .. +cmake --build . --parallel +``` + +For a Unix-like platform you'll usually also want an explicit build type, +since CMake's default (empty) build type means no optimization and no +debug info either: + +```sh +cmake .. -DCMAKE_BUILD_TYPE=Release +``` + +To install (default prefix is `/usr/local`; adjust with +`-DCMAKE_INSTALL_PREFIX=...` at the configure step if needed): + +```sh +sudo cmake --install . +``` + +Useful configure-time options (pass as `-D