From e3daca37aa134a6885c8ae5c508c3d7f7bfc600a Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 13:57:51 +0100 Subject: Add Windows cross-compilation support (MinGW) and emulation (Wine) --- scripts/fetch_win_deps.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 scripts/fetch_win_deps.sh (limited to 'scripts/fetch_win_deps.sh') diff --git a/scripts/fetch_win_deps.sh b/scripts/fetch_win_deps.sh new file mode 100755 index 0000000..a32f047 --- /dev/null +++ b/scripts/fetch_win_deps.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -e +set -x + +# Create directories +mkdir -p third_party/windows/lib +mkdir -p third_party/windows/include/GLFW + +echo "Fetching GLFW 3.4..." +curl -L -o glfw.zip https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.bin.WIN64.zip +unzip -q glfw.zip +cp glfw-3.4.bin.WIN64/lib-mingw-w64/libglfw3.a third_party/windows/lib/ +cp glfw-3.4.bin.WIN64/include/GLFW/* third_party/windows/include/GLFW/ +rm -rf glfw.zip glfw-3.4.bin.WIN64 + +echo "Fetching wgpu-native v0.19.4.1..." +curl -L -o wgpu.zip https://github.com/gfx-rs/wgpu-native/releases/download/v0.19.4.1/wgpu-windows-x86_64-release.zip +unzip -q wgpu.zip -d wgpu_temp +# Copy import library (renaming for MinGW convention, though it can usually read .lib) +cp wgpu_temp/wgpu_native.dll.lib third_party/windows/lib/libwgpu_native.dll.a +# Copy runtime DLL (will be needed next to executable) +cp wgpu_temp/wgpu_native.dll third_party/windows/lib/wgpu_native.dll +# Copy headers +mkdir -p third_party/windows/include/webgpu +cp wgpu_temp/webgpu.h third_party/windows/include/webgpu/ +cp wgpu_temp/wgpu.h third_party/windows/include/webgpu/ +rm -rf wgpu.zip wgpu_temp + +echo "Windows dependencies fetched." -- cgit v1.2.3