blob: 5a6ac289233944b2e9bbbe6a8c57c115f866b38b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/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 brew dependencies (macOS)
if command -v brew >/dev/null 2>&1; then
for pkg in wgpu-native glfw; do
if ! brew list "$pkg" >/dev/null 2>&1; then
echo "Warning: $pkg not found via brew. Installing..."
brew install "$pkg"
else
echo "$pkg found (via brew)."
fi
done
else
echo "Warning: Homebrew not found. Ensure wgpu-native and glfw are installed manually."
fi
echo "Done."
|