-
Notifications
You must be signed in to change notification settings - Fork 840
Build Instructions for Linux
These instructions apply to all major Linux distributions. The build procedure is identical everywhere; only the package installation commands differ.
Tip
Prebuilt packages are available for many distributions: zeal in the
Arch Linux Extra repository, the
zealdocs PPA for
Ubuntu, and the
@zealdocs/zeal COPR
for Fedora. Building from source is only necessary for development or
packaging. More options are listed on the
download page, and
Repology tracks Zeal
packaging across distributions.
A C++20 compatible compiler, Git, CMake (3.25.1 or later at the time of writing; the README lists the current minimum), Ninja, and development packages for Qt 6 (including Qt WebEngine), libarchive, and SQLite are required.
sudo apt-get install build-essential cmake extra-cmake-modules ninja-build \
libarchive-dev libgl-dev libqt6opengl6-dev libqt6svg6-dev \
libsqlite3-dev libvulkan-dev libxcb-keysyms1-dev qt6-webengine-devsudo dnf install gcc-c++ cmake extra-cmake-modules ninja-build \
qt6-qtbase-devel qt6-qtsvg-devel qt6-qtwebchannel-devel \
qt6-qtwebengine-devel libarchive-devel sqlite-devel tomlplusplus-devel \
mesa-libGL-devel vulkan-headers libX11-devel libxcb-devel \
libxkbcommon-devel xcb-util-keysyms-develsudo pacman -S --needed base-devel cmake extra-cmake-modules ninja \
libarchive qt6-base qt6-svg qt6-webchannel qt6-webengine sqlite \
tomlplusplus vulkan-headers xcb-util-keysymsGet the source code:
git clone https://github.com/zealdocs/zeal.git
cd zealConfigure and build with CMake presets:
cmake --preset release
cmake --build --preset releaseEach preset builds into build/<preset>, so the output lands in
build/release here, and the binary can be run directly:
./build/release/zealAvailable presets:
| Preset | Purpose |
|---|---|
release |
RelWithDebInfo build |
debug |
Debug build |
dev |
Development build: exports compile commands, enables sccache/ccache if available |
release-portable / debug-portable / dev-portable
|
Portable build (settings stored next to the executable) |
testing |
Debug build with the test suite enabled (ctest --preset testing) |
Common build commands are also available as
just recipes, which is the recommended
way to drive the build during development. Install it from your
distribution repositories; the package is named just.
just configure # configure with the default (dev) preset
just build # build
just run # build and launch Zeal
just test # configure, build, and run the test suite
just preset=release buildRun just without arguments to see the full recipe list.
Any IDE with CMake presets support (Visual Studio Code with the CMake Tools extension, CLion, Qt Creator) picks up the project configuration automatically; simply select one of the presets listed above.
The bundled .clangd configuration expects the compilation database
produced by the dev preset, so run just configure (or
cmake --preset dev) once to enable clangd-based code completion and
diagnostics.
sudo cmake --install build/releaseAfterwards, reload the desktop database to register the dash:// and
dash-plugin:// URL handlers:
sudo update-desktop-database