summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-03-19 18:48:17 +0100
committerskal <pascal.massimino@gmail.com>2026-03-19 18:48:17 +0100
commitb311fd3747e3d3fa2b4e8daf54cc91f4de44a3cf (patch)
tree0866fca4d58476cc6b75c66aada8dbde08b8f6a6
parentc66d33a45741eee13c57efb841769a94b577e1a9 (diff)
docs(init): add glfw as macOS brew dependency
project_init.sh now checks/installs both wgpu-native and glfw via brew. HOWTO.md documents the macOS prerequisites before the build steps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rw-r--r--doc/HOWTO.md7
-rwxr-xr-xscripts/project_init.sh18
2 files changed, 17 insertions, 8 deletions
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index bfb47fd..e44978d 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -6,6 +6,13 @@ Quick reference for common tasks.
## Building
+### macOS Prerequisites
+
+```bash
+brew install wgpu-native glfw
+./scripts/project_init.sh # fetches miniaudio, glfw3webgpu
+```
+
### Workspace Selection
```bash
# Main demo (default)
diff --git a/scripts/project_init.sh b/scripts/project_init.sh
index 549e146..5a6ac28 100755
--- a/scripts/project_init.sh
+++ b/scripts/project_init.sh
@@ -24,16 +24,18 @@ else
echo "glfw3webgpu already present."
fi
-# Check for wgpu-native (system install)
+# Check for brew dependencies (macOS)
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
+ 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 is installed manually."
+ echo "Warning: Homebrew not found. Ensure wgpu-native and glfw are installed manually."
fi
echo "Done."