56 Building
Tearnote edited this page 2026-09-03 12:11:52 +01:00

Playnote > Building

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):

Note

Some of these vcpkg recipes require common system packages to be installed. They are likely to be present on Linux distributions which don't single out -dev packages, but on others they might be missing. Check the CMake or vcpkg output if configuration fails.

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://git.playnote.dev/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-playnote" "-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.