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:
- libpipewire (MIT) (Linux-only)
Downloaded via vcpkg (use the overlay triplet on Windows):
- ICU (Unicode)
- glfw (zlib)
- Boost (Boost)
- FFmpeg (LGPL)
- libarchive (New BSD)
- Vulkan libraries (various licenses)
- SQLite (public domain)
- Zstandard (MIT)
- Freetype (Freetype)
- HarfBuzz (Old MIT)
- magic_enum (MIT)
- libassert (MIT)
- {fmt} (MIT)
- volk (MIT)
- libebur128 (MIT)
- vk-bootstrap (MIT)
- toml++ (MIT)
- zpp_bits (MIT)
- readerwriterqueue (BSD)
- concurrentqueue (BSD/Boost)
- hwloc (BSD)
- mimalloc (MIT)
- pkgconf (MIT-like)
- doctest (MIT)
- AngelScript (zlib)
Some of these vcpkg recipes require certain common system packages to be installed; check the output in case of issues.
Downloaded via CMake FetchContent:
- vuk (MIT)
- smol-atlas (MIT)
- cwASIO (MIT)
- Slang (
slangccompiler binary only) (Apache) - M+ Fonts (OFL)
- Pretendard (OFL)
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 withctest --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
Required components: CMake support, Clang compiler
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.