DevelopmentDéveloppement
Build modes, CMake options, the layout of the sources, the tests, the workflows and this site.Modes de compilation, options CMake, organisation des sources, tests, workflows et ce site.
1. BuildCompiler
make # configure & build into build/
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug # debug build (-g -ggdb3)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Asan # AddressSanitizer build
cmake --build build --target release # Debug, Asan & Optimized builds
cmake --build build --target package_release # RPM / DEB / Arch packages of every variant
cmake --build build --target get_unregistered_files # .cpp files missing from SRC / SRC_SHARED| Option | Default | Content |
|---|---|---|
XDESK_PACKAGE_BIN | ON | build and package the executable |
XDESK_PACKAGE_LIB | OFF | build and package the library |
XDESK_PACKAGE_DEV | OFF | package the headers and the CMake config |
XDESK_STABLE_RELEASE | OFF | package channel: stable or -pre |
BUILD_TESTS | OFF | build the unit tests |
The optional backends are detected by CMake (xdesk backends: dbus=... pipewire=... xtest=...).
make # configurer et compiler dans build/
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug # build debug (-g -ggdb3)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Asan # build AddressSanitizer
cmake --build build --target release # builds Debug, Asan et Optimized
cmake --build build --target package_release # paquets RPM / DEB / Arch de chaque variante
cmake --build build --target get_unregistered_files # .cpp absents de SRC / SRC_SHARED| Option | Défaut | Contenu |
|---|---|---|
XDESK_PACKAGE_BIN | ON | compiler et empaqueter l'exécutable |
XDESK_PACKAGE_LIB | OFF | compiler et empaqueter la bibliothèque |
XDESK_PACKAGE_DEV | OFF | empaqueter les headers et la config CMake |
XDESK_STABLE_RELEASE | OFF | canal des paquets : stable ou -pre |
BUILD_TESTS | OFF | compiler les tests unitaires |
Les backends optionnels sont détectés par CMake (xdesk backends: dbus=... pipewire=... xtest=...).
2. SourcesSources
| Path | Content |
|---|---|
src/xdesk/core/ | Config (settings, folders), AuditLog |
src/xdesk/security/ | Crypto, Certificate, PairingCode, DeviceRegistry, IntegrityGuard |
src/xdesk/net/ | Protocol, WebSocket, Server, Exposure, Datagram |
src/xdesk/host/ | Host (auth, rights, bans, terminals, tamper reaction), Session, Stream |
src/xdesk/client/ | Client (pinning, proof, frames, inputs, terminals) |
src/xdesk/platform/ | FrameEncoder, capture, input injection, pseudo terminals, Keymap |
src/xdesk/ui/ | gui/ (Qt panel, viewer, VT emulator), tty/ (terminal panel and client) |
web/, android/ | web client (embedded in the binary), Android app |
docs/site/ | sources of this site (Markdown + gen/ generators) |
| Chemin | Contenu |
|---|---|
src/xdesk/core/ | Config (réglages, dossiers), AuditLog |
src/xdesk/security/ | Crypto, Certificate, PairingCode, DeviceRegistry, IntegrityGuard |
src/xdesk/net/ | Protocol, WebSocket, Server, Exposure, Datagram |
src/xdesk/host/ | Host (auth, droits, bans, terminaux, réaction à l'altération), Session, Stream |
src/xdesk/client/ | Client (épinglage, preuve, images, entrées, terminaux) |
src/xdesk/platform/ | FrameEncoder, capture, injection des entrées, pseudo-terminaux, Keymap |
src/xdesk/ui/ | gui/ (panneau Qt, viewer, émulateur VT), tty/ (panneau et client terminal) |
web/, android/ | client web (embarqué dans le binaire), appli Android |
docs/site/ | sources de ce site (Markdown + générateurs gen/) |
3. TestsTests
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
cmake --build build --parallel $(nproc)
(cd build && QT_QPA_PLATFORM=offscreen ctest --output-on-failure)One test file per module in tests/xdesk/: crypto (RFC 4231 HMAC, Argon2id, transcript binding), pairing codes, registry, protocol reader / writer, frame encoder (tiles, scroll, H.264), command line.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
cmake --build build --parallel $(nproc)
(cd build && QT_QPA_PLATFORM=offscreen ctest --output-on-failure)Un fichier de test par module dans tests/xdesk/ : crypto (HMAC RFC 4231, Argon2id, liaison du transcript), codes d'appairage, registre, lecture / écriture du protocole, encodeur d'images (tuiles, défilement, H.264), ligne de commande.
4. This siteCe site
python3 ~/.claude/skills/better-html-doc/scripts/build_site.py --site docs/site --out docsThe pages are written in docs/ and published by Docs - Pages (CD); the commands and settings pages are generated from src/xdesk/Desktop-init.cpp and include/xdesk/core/Config.hpp.
python3 ~/.claude/skills/better-html-doc/scripts/build_site.py --site docs/site --out docsLes pages sont écrites dans docs/ et publiées par Docs - Pages (CD) ; les pages des commandes et des réglages sont générées depuis src/xdesk/Desktop-init.cpp et include/xdesk/core/Config.hpp.
5. Workflows and releasesWorkflows et releases
| Workflow | Does |
|---|---|
Dispatch (CI/CD) | on every push of main or a tag v* (not *.md / *.txt / docs/ only): decides what runs |
Unit Tests (CI) | Linux and Windows (under wine) tests, always first |
Build (CI) | build check when no package is built |
Build - Packages (CI/CD) | Linux and mingw64- packages, signed and published on gh-pages |
Release - GitHub (CD) | the GitHub release of a tag, from its section of CHANGELOG.md |
Docs - Pages (CD) | copies docs/ on gh-pages |
A push that only changes *.txt files (a CMakeLists.txt) does not start the CI: run Unit Tests (CI) by hand.
| Workflow | Fait |
|---|---|
Dispatch (CI/CD) | à chaque push de main ou d'un tag v* (pas pour *.md / *.txt / docs/ seuls) : décide de ce qui tourne |
Unit Tests (CI) | tests Linux et Windows (sous wine), toujours en premier |
Build (CI) | vérification du build quand aucun paquet n'est construit |
Build - Packages (CI/CD) | paquets Linux et mingw64-, signés et publiés sur gh-pages |
Release - GitHub (CD) | la release GitHub d'un tag, depuis sa section du CHANGELOG.md |
Docs - Pages (CD) | copie docs/ sur gh-pages |
Un push qui ne modifie que des fichiers *.txt (un CMakeLists.txt) ne lance pas la CI : lancer Unit Tests (CI) à la main.