update Windows build instructions and toolchain configuration

This commit is contained in:
Agel committed 2026-03-16 11:50:52 +01:00
1 parent 8c33ad410a
commit 380803b7ce
2 files changed
+20 -6

No files matched your search

+17 -5
View File
@@ -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 "<command>"
# or equivalently:
C:/msys64/usr/bin/bash.exe -i -c "<command>"
# 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: