Skip to content

Windows (MSYS2 MingW64)

anthony.samms edited this page May 28, 2026 · 3 revisions

Building on Windows (MSYS2 MinGW64)

Prerequisites

MSYS2

Download and install MSYS2 from https://www.msys2.org/. Then open the MSYS2 MinGW64 shell (not the MSYS or UCRT64 shell) and install the required toolchain and libraries:

pacman -Syu
pacman -S \
  mingw-w64-x86_64-toolchain \
  mingw-w64-x86_64-cmake \
  mingw-w64-x86_64-ninja \
  mingw-w64-x86_64-python \
  mingw-w64-x86_64-pkg-config \
  git

All subsequent commands should be run inside the MSYS2 MinGW64 shell.


Clone the Repository

git clone --recurse-submodules https://github.com/Yonokid/YataiDON
cd YataiDON

If you already cloned without submodules:

git submodule update --init --recursive

Build

Debug

./build_debug.sh

Release

./build_release.sh

The compiled binary is copied to the root directory via these scripts.

For a fast incremental rebuild without reconfiguring:

./build_re.sh

Running

After a successful build, the FFmpeg DLLs are copied automatically into build/bin/ alongside the executable. The game also expects these directories to be present at runtime:

build/bin/
  YataiDON.exe
  *.dll              ← FFmpeg and other DLLs, copied by the build
Skins/
Songs/
shader/
config.toml

You will likely need to copy the DLLs to the root folder; the exe is copied automatically.


Developing with Zed

Zed is the preferred editor for this project as it is highly compatible with C++ on multiple different platforms. To enable syntax highlighting and intellisense, you'll need to add this to your settings.json file:

"lsp": {
    "clangd": {
      "binary": {
        "path": "C:\\msys64\\mingw64\\bin\\clangd.exe",
      },
    },
  }

This will change the default LSP from zed's default clangd to the one provided by MSYS2.


Notes

  • Static linking — the binary is linked with -static -static-libgcc -static-libstdc++, so it does not depend on MinGW runtime DLLs. Only the FFmpeg shared libraries need to ship alongside the executable.
  • FFmpeg is downloaded automatically during the CMake configure step as a prebuilt package from BtbN/FFmpeg-Builds (win64-gpl-shared). No manual download is required.
  • PortAudio is supplied as a prebuilt static archive (src/libs/audio/libportaudio-win.a); no separate installation is needed.
  • libsndfile and libsamplerate are supplied as prebuilt static archives under src/libs/audio/.
  • Dependencies fetched by CMake are cached in .cmake-deps/ in the repo root, so subsequent configures are fast.
  • The vorbis, FLAC, opus, ogg, mp3lame, and mpg123 codec libraries are linked statically as part of the audio stack — they do not need to be installed separately.

Clone this wiki locally