summaryrefslogtreecommitdiff
path: root/scripts/fetch_win_deps.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/fetch_win_deps.sh')
-rwxr-xr-xscripts/fetch_win_deps.sh29
1 files changed, 29 insertions, 0 deletions
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."