summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-23 09:16:54 +0100
committerskal <pascal.massimino@gmail.com>2026-02-23 09:16:54 +0100
commitc906cb0e048ef7cd32f636f1692a0c72a5d206b7 (patch)
treec708586c0d0c093b5db9c4f9e157eac89284ad61 /scripts
parent7d6c9bc2f10a479d9e054af56a75e535d1015b79 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_win.sh20
1 files changed, 15 insertions, 5 deletions
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