summaryrefslogtreecommitdiff
path: root/scripts/project_init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/project_init.sh')
-rwxr-xr-xscripts/project_init.sh25
1 files changed, 16 insertions, 9 deletions
diff --git a/scripts/project_init.sh b/scripts/project_init.sh
index db24c8f..549e146 100755
--- a/scripts/project_init.sh
+++ b/scripts/project_init.sh
@@ -14,19 +14,26 @@ else
echo "miniaudio.h already present."
fi
-# wgpu-native submodule
-if [ ! -d third_party/wgpu-native ]; then
- echo "Fetching wgpu-native submodule..."
- git submodule update --init --recursive
+# glfw3webgpu (helper for GLFW + WebGPU)
+mkdir -p third_party/glfw3webgpu
+if [ ! -f third_party/glfw3webgpu/glfw3webgpu.h ]; then
+ echo "Fetching glfw3webgpu..."
+ curl -L https://raw.githubusercontent.com/eliemichel/glfw3webgpu/main/glfw3webgpu.h -o third_party/glfw3webgpu/glfw3webgpu.h
+ curl -L https://raw.githubusercontent.com/eliemichel/glfw3webgpu/main/glfw3webgpu.c -o third_party/glfw3webgpu/glfw3webgpu.c
else
- echo "wgpu-native submodule already present."
+ echo "glfw3webgpu already present."
fi
-if [ ! -f third_party/wgpu-native/target/release/libwgpu_native.a ]; then
- echo "Building wgpu-native static library..."
- (cd third_party/wgpu-native && make lib-native)
+# Check for wgpu-native (system install)
+if command -v brew >/dev/null 2>&1; then
+ if ! brew list wgpu-native >/dev/null 2>&1; then
+ echo "Warning: wgpu-native not found via brew. Installing..."
+ brew install wgpu-native
+ else
+ echo "wgpu-native found (via brew)."
+ fi
else
- echo "wgpu-native static library already built."
+ echo "Warning: Homebrew not found. Ensure wgpu-native is installed manually."
fi
echo "Done."