From 380803b7ce9b44f05fd45742841f7273f60710ae Mon Sep 17 00:00:00 2001 From: Agel Date: Mon, 16 Mar 2026 11:50:52 +0100 Subject: [PATCH] update Windows build instructions and toolchain configuration --- .claude/settings.local.json | 4 +++- CLAUDE.md | 22 +++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 74f04df..9e8eda3 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -4,7 +4,9 @@ "Bash(find:*)", "Bash(grep:*)", "Bash(cmake:*)", - "Bash(ctest:*)" + "Bash(ctest:*)", + "Bash(PATH=\"/c/msys64/mingw64/bin:$PATH\" \"C:/msys64/mingw64/bin/cmake.exe\":*", + "Bash(PATH=\"/c/msys64/mingw64/bin:$PATH\" \"C:/msys64/mingw64/bin/ninja.exe\":*" ] } } diff --git a/CLAUDE.md b/CLAUDE.md index d548a02..23737ce 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -41,15 +41,27 @@ See [README.md](README.md) for setup instructions, dependency installation, and ### Windows Build Environment -**All build and test commands on Windows must be run in the MSYS2 MINGW64 shell** (`C:\msys64\mingw64`). This is the only shell where `cmake`, `ninja`, `gcc`, and all Qt/third-party libraries are on `PATH`. Do not use PowerShell, CMD, or the plain MSYS2 shell — they lack the correct toolchain and package prefix. +The toolchain is at `C:\msys64\mingw64\bin\`. Call binaries directly with full paths, but prepend `/c/msys64/mingw64/bin` to `PATH` so the compiler and its runtime DLLs are resolvable: -To run a command from Claude Code on Windows, invoke it via the MSYS2 MINGW64 bash: ```bash -/c/msys64/mingw64/bin/bash.exe -c "" -# or equivalently: -C:/msys64/usr/bin/bash.exe -i -c "" +# Configure +PATH="/c/msys64/mingw64/bin:$PATH" "C:/msys64/mingw64/bin/cmake.exe" \ + -S . -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_MAKE_PROGRAM="C:/msys64/mingw64/bin/ninja.exe" \ + -DCMAKE_C_COMPILER="C:/msys64/mingw64/bin/gcc.exe" \ + -DCMAKE_CXX_COMPILER="C:/msys64/mingw64/bin/g++.exe" \ + -DCMAKE_PREFIX_PATH="C:/msys64/mingw64" + +# Build +PATH="/c/msys64/mingw64/bin:$PATH" "C:/msys64/mingw64/bin/ninja.exe" -C build + +# Test +PATH="/c/msys64/mingw64/bin:$PATH" "C:/msys64/mingw64/bin/ctest.exe" --test-dir build --output-on-failure ``` +Use Unix-style paths (`/c/msys64/...`) for `PATH` assignments — Windows-style paths are not recognised by the shell. + ## Test-Driven Development **All new backend logic must be test-driven.** Follow the red-green-refactor cycle strictly: