Building from source

One CMake tree builds the Qt-free backend, the Qt desktop client and LexiconServer. The web client needs no build; the Android app has its own Gradle project.

Prerequisites

ToolMinimumNotes
CMake3.21Required by cmake_minimum_required
CompilerC++23 supportGCC 14 is what CI uses; recent Clang or MSVC should work
QtA recent Qt 6Desktop only, modules Core and Widgets. The vendored md4qt needs a newer Qt 6 than Ubuntu 24.04's 6.4; Debian 13's 6.8 works.
SQLite3.38+Native C library with JSON functions; FTS5 enables diacritic-insensitive content search
OpenSSL3Crypto for SHA-256 file identifiers; SSL for the server's TLS

Debian 13 one-liner:

sudo apt update
sudo apt install -y build-essential cmake ninja-build qt6-base-dev libgl-dev libsqlite3-dev libssl-dev

Desktop client

git clone https://github.com/robertvokac/lexicon.git
cd lexicon
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target Lexicon -j
./build/Lexicon
â„šī¸

Runtime side effect The first run creates lexicon.db in the directory of the executable — for a development build that means inside build/. Delete that file whenever you want a fresh database.

Server, web and Android clients

LexiconServer needs no Qt. Without Qt installed, configure with -DLEXICON_BUILD_DESKTOP=OFF:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLEXICON_BUILD_DESKTOP=OFF
cmake --build build --target LexiconServer -j
./build/LexiconServer auth set-user --database ~/lexicon/lexicon.db
./build/LexiconServer --database ~/lexicon/lexicon.db --allowed-origin http://127.0.0.1:8080
# or let the server serve the client too, on its own port:
./build/LexiconServer --database ~/lexicon/lexicon.db --web-dir lexicon-web

Server-side Blob maintenance is local CLI functionality, not REST: use LexiconServer blobs scan --database PATH for a structural check, blobs verify to recalculate every SHA-256, and blobs collect to verify and delete only unused canonical files.

The web client in lexicon-web/ is static files: serve them with any web server, or locally with python3 tools/serve-web.py --port 8080. The Android app builds with ./gradlew assembleDebug in lexicon-android/. docs/server.md, lexicon-web/README.md and lexicon-android/README.md cover deployment, TLS, backups and signing.

Tests

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build build -j
QT_QPA_PLATFORM=offscreen ctest --test-dir build --output-on-failure
node --test lexicon-web/tests/*.test.mjs
python3 tools/web-e2e.py --server build/LexiconServer
cd lexicon-android && LEXICON_SERVER_BINARY=../build/LexiconServer ./gradlew test lint

The C++ suites cover the backend, the REST server over real sockets, backups, old databases, and the desktop dialogs offscreen, including Mass Insert recovery after a partial failure. tools/web-e2e.py drives the web client in headless Chrome against a fresh server and checks a resumable typed Mass Insert worksheet. The Android tests run the Compose screens under Robolectric, some of them against a real LexiconServer. GitHub Actions runs all of it on every push.

Build configurations

ConfigurationCommandUse for
Release-DCMAKE_BUILD_TYPE=ReleaseDay-to-day use
Debug-DCMAKE_BUILD_TYPE=DebugDevelopment, debugging with gdb/lldb
RelWithDebInfo-DCMAKE_BUILD_TYPE=RelWithDebInfoProfiling and crash analysis

If CMake cannot find Qt, point it at your installation:

cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/Qt/6.x.y/gcc_64

Platform notes

Linux

Windows

macOS

IDE setup