From b311fd3747e3d3fa2b4e8daf54cc91f4de44a3cf Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 19 Mar 2026 18:48:17 +0100 Subject: 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 --- doc/HOWTO.md | 7 +++++++ scripts/project_init.sh | 18 ++++++++++-------- 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." -- cgit v1.2.3