#!/bin/sh # Fetch minimal third-party dependencies set -e echo "Initializing demo64k dependencies..." mkdir -p third_party if [ ! -f third_party/miniaudio.h ]; then echo "Fetching miniaudio.h..." curl -L https://raw.githubusercontent.com/mackron/miniaudio/master/miniaudio.h -o third_party/miniaudio.h else echo "miniaudio.h already present." fi # 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 "glfw3webgpu already present." fi # 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 "Warning: Homebrew not found. Ensure wgpu-native is installed manually." fi echo "Done."