49 Building
Hubert Maraszek edited this page 2026-06-18 11:17:41 +02:00

Environment

The code currently targets cross-platform C++23. Supported targets are Linux via GCC, and Windows via clang-cl.

Dependencies

Required to be installed locally:

Downloaded via vcpkg (use the overlay triplet on Windows):

Some of these vcpkg recipes require certain common system packages to be installed; check the output in case of issues.

Downloaded via CMake FetchContent:

Options

The default CMake options create the standard release executable. The options below customize the build for development purposes. Pass them via -DPLAYNOTE_FOO=bar during the Configure step.

  • PLAYNOTE_WERROR: All warnings fail the build. Off by default.
  • PLAYNOTE_MIMALLOC: Use the mimalloc allocator override globally. On by default. Disabling it is required for some memory debugging tools.
  • PLAYNOTE_TESTS: Build the test executable. Off by default. After the build, run tests with ctest --test-dir build --output-on-failure -C Release.

Additionally, the RelWithDebInfo configuration is optimised for day-to-day development. Tracy profiling is enabled in this configuration only.

Building

Install requirements

Windows

MSVC Build Tools

Required components: CMake support, Clang compiler

Git for Windows

Python

Linux (Ubuntu 24.04 example)

sudo apt-get install -y build-essential pkg-config ninja-build extra-cmake-modules nasm mono-devel autoconf-archive libpipewire-0.3-dev libglu1-mesa-dev libwayland-dev wayland-protocols libx11-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev

Clone the repository

git clone https://codeberg.org/Tearnote/Playnote

Clone vcpkg next to the Playnote repository

git clone https://github.com/microsoft/vcpkg

Bootstrap vcpkg

Windows

cd vcpkg
.\bootstrap-vcpkg.bat -disableMetrics

Linux

cd vcpkg
./bootstrap-vcpkg.sh -disableMetrics

Configure

Windows

cd ../Playnote
cmake -B build -T ClangCL "-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-static-md" "-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets"

Linux

cd ../Playnote
cmake -B build -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake

Build

Can replace Release with Debug or RelWithDebInfo.

cmake --build build --config Release

Install

cmake --install build --config Release

The game files will be located in build/install/Release.