From c906cb0e048ef7cd32f636f1692a0c72a5d206b7 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 23 Feb 2026 09:16:54 +0100 Subject: docs(build): add WSL (Windows 10) build support and documentation - build_win.sh: platform-aware MinGW DLL search (macOS Homebrew vs Linux apt paths) - HOWTO.md: new WSL section covering native Linux build and Windows cross-compile - PROJECT_CONTEXT.md: note WSL support in Build status handoff(Gemini): WSL native + cross-compile build support added. Co-Authored-By: Claude Sonnet 4.6 --- scripts/build_win.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'scripts/build_win.sh') diff --git a/scripts/build_win.sh b/scripts/build_win.sh index c1732f0..da75748 100755 --- a/scripts/build_win.sh +++ b/scripts/build_win.sh @@ -24,12 +24,22 @@ cp third_party/windows/lib/wgpu_native.dll build_win/ # Copy MinGW DLLs (pthread, etc.) echo "Copying MinGW DLLs..." -MINGW_BIN=$(dirname $(find /opt/homebrew -name "libwinpthread-1.dll" | grep x86_64 | head -n 1)) -if [ -d "$MINGW_BIN" ]; then - cp "$MINGW_BIN/libwinpthread-1.dll" build_win/ - cp "$MINGW_BIN/libgcc_s_seh-1.dll" build_win/ 2>/dev/null || true - cp "$MINGW_BIN/libstdc++-6.dll" build_win/ 2>/dev/null || true +if [[ "$(uname)" == "Darwin" ]]; then + MINGW_SEARCH_ROOTS="/opt/homebrew" else + # Linux / WSL: mingw-w64 installed via apt + MINGW_SEARCH_ROOTS="/usr/x86_64-w64-mingw32 /usr/lib/gcc/x86_64-w64-mingw32" +fi +COPIED=0 +for dll in libwinpthread-1.dll libgcc_s_seh-1.dll libstdc++-6.dll; do + src=$(find $MINGW_SEARCH_ROOTS -name "$dll" 2>/dev/null | head -n 1) + if [ -n "$src" ]; then + cp "$src" build_win/ + echo " Copied: $dll" + COPIED=$((COPIED+1)) + fi +done +if [ "$COPIED" -eq 0 ]; then echo "Warning: Could not find MinGW DLLs. You might need them to run the exe." fi -- cgit v1.2.3