This document is the single source of truth for configuring, building, and testing YAZE on all platforms. Other documentation files link here rather than duplicating these instructions.
For day-to-day local development on a configured machine, use the unified workflow script:
scripts/dev/local-workflow.sh allUseful subcommands:
scripts/dev/local-workflow.sh build
scripts/dev/local-workflow.sh test
scripts/dev/local-workflow.sh sync
scripts/dev/local-workflow.sh status
scripts/dev/local-workflow.sh hooks
scripts/dev/local-workflow.sh release-checkWhat sync does on macOS:
- Updates
/Applications/yaze.appfrom the selected build output. - Refreshes PATH link for
z3ed(default:/usr/local/bin/z3ed). - Verifies runtime binary hashes after copy/link.
git clone --recursive https://github.com/scawful/yaze.git
cd yazeRun the verification script once per machine to check dependencies and fix common issues:
macOS / Linux:
./scripts/verify-build-environment.sh --fixWindows (PowerShell):
.\scripts\verify-build-environment.ps1 -FixIssuesAppleClang (/usr/bin/clang) is the default and most reliable choice. If Homebrew LLVM is on your PATH and you hit SDK header errors, pick the toolchain explicitly:
# AppleClang (recommended)
cmake --preset mac-dbg --fresh -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
# Homebrew LLVM (optional)
cmake --preset mac-dbg --fresh -DCMAKE_TOOLCHAIN_FILE=cmake/llvm-brew.toolchain.cmakeYAZE uses CMake presets for consistent builds. Configure with cmake --preset <name>, then build with cmake --build --preset <name>.
- macOS:
mac-dbg,mac-dbg-v,mac-rel,mac-dev,mac-ai,mac-ai-fast,mac-uni,mac-sdl3,mac-test - Windows:
win-dbg,win-dbg-v,win-rel,win-dev,win-ai,win-z3ed,win-arm,win-arm-rel,win-vs-dbg,win-vs-rel,win-vs-ai,win-sdl3,win-test - Linux:
lin-dbg,lin-dbg-v,lin-rel,lin-dev,lin-ai,lin-sdl3,lin-test - iOS:
ios-debug,ios-release(device builds for the thin Xcode shell) - CI:
ci-linux,ci-macos,ci-windows,ci-windows-ai - WASM:
wasm-debug,wasm-release,wasm-crash-repro,wasm-ai
mac-ai-fast prefers the Homebrew gRPC/protobuf stack for faster configure times (brew install grpc protobuf abseil).
Tip: Add -v suffix (e.g., mac-dbg-v) to enable verbose compiler warnings.
Use the thin iOS shell backed by CMake-built static libs:
scripts/build-ios.sh # builds ios-debug + generates Xcode project
scripts/build-ios.sh ios-releaseThis generates src/ios/yaze_ios.xcodeproj and a bundled static library at
build-ios/ios/libyaze_ios_bundle.a. Open the Xcode project and run on device.
Requires xcodegen (brew install xcodegen) and the iOS SDK from Xcode.
For CLI-driven device deploys (build + install + optional launch):
scripts/xcodebuild-ios.sh ios-debug deploy
scripts/xcodebuild-ios.sh ios-debug deploy "Baby Pad"deploy resolves the app bundle from DerivedData and installs via
xcrun devicectl. Device selection order is DEVICE arg,
$YAZE_IOS_DEVICE, then "Baby Pad".
For multi-iPad deploy loops (build once + install to many devices):
scripts/dev/ios-ipad-workflow.sh instant --all
scripts/dev/ios-ipad-workflow.sh instant --devices "Baby Pad,iPadothée Chalamet" --no-launch
scripts/dev/ios-ipad-workflow.sh redeploy --all --no-launchinstant caches an iOS source fingerprint and skips rebuilds when inputs
haven't changed, making repeated installs much faster.
| Build Type | Default Directory |
|---|---|
| Any preset | build/presets/<preset>/ |
macOS and Windows presets use multi-config generators, so binaries live under
build/presets/<preset>/bin/Debug or build/presets/<preset>/bin/Release.
Linux and WASM single-config presets place binaries directly under
build/presets/<preset>/bin/.
If you need per-user or per-agent isolation, create a local
CMakeUserPresets.json that points binaryDir to a custom path outside the
repo. Avoid creating ad hoc in-repo build_* folders; keep builds under the
default per-preset tree or move them fully out of the checkout.
Example:
cp CMakeUserPresets.json.example CMakeUserPresets.json
export YAZE_BUILD_ROOT="$HOME/.cache/yaze"
cmake --preset dev-local
cmake --build --preset dev-local --target yazeYou can also set YAZE_BUILD_DIR for scripts and the agent build tool to direct builds to an external path:
export YAZE_BUILD_DIR="$HOME/.cache/yaze/build"For AI-enabled builds, use the *-ai presets and specify only the targets you need:
cmake --build --preset mac-ai --target yaze z3edUse the unified workflow to build from build_ai presets and sync the runtime
bundle to a single canonical app path: /Applications/yaze.app.
scripts/dev/local-workflow.sh allFor faster iteration when tests are already green:
scripts/dev/local-workflow.sh build --skip-tests
scripts/dev/local-workflow.sh syncMenu launchers (SketchyBar, Raycast, Alfred, etc.) should target:
open -a "/Applications/yaze.app"The sync workflow also prunes legacy aliases such as /Applications/Yaze.app
and older Nightly app links when present.
Set shared caches once per machine to avoid re-downloading dependencies after cleaning build directories.
macOS / Linux:
export CPM_SOURCE_CACHE="$HOME/.cpm-cache"
export VCPKG_DOWNLOADS="$HOME/.cache/vcpkg/downloads"
export VCPKG_BINARY_SOURCES="clear;files,$HOME/.cache/vcpkg/bincache,readwrite"Windows (PowerShell):
$env:CPM_SOURCE_CACHE = "$env:USERPROFILE\.cpm-cache"
$env:VCPKG_DOWNLOADS = "$env:LOCALAPPDATA\vcpkg\downloads"
$env:VCPKG_BINARY_SOURCES = "clear;files,$env:LOCALAPPDATA\vcpkg\bincache,readwrite"You can also set these in CMakeUserPresets.json (see CMakeUserPresets.json.example).
Windows Helper Scripts:
- Quick builds:
scripts/agents/windows-smoke-build.ps1 - Test runs:
scripts/agents/run-tests.sh(or PowerShell equivalent)
Tip: Prefer ./scripts/yaze and ./scripts/z3ed to run the newest local
binary (the wrappers prefer build_ai/ outputs when available).
macOS:
cmake --preset mac-dbg
cmake --build --preset mac-dbg --target yazeLinux:
cmake --preset lin-dbg
cmake --build --preset lin-dbg --target yazeWindows:
cmake --preset win-dbg
cmake --build --preset win-dbg --target yazemacOS:
cmake --preset mac-ai
cmake --build --preset mac-ai --target yaze z3edLinux:
cmake --preset lin-ai
cmake --build --preset lin-ai --target yaze z3edWindows:
cmake --preset win-ai
cmake --build --preset win-ai --target yaze z3edYAZE uses CTest with GoogleTest. Tests are organized by category using labels.
# Run stable tests (fast, no ROM required)
ctest --test-dir build -L stable -j4
# Run all enabled tests
ctest --test-dir build --output-on-failure
# Run tests matching a pattern
ctest --test-dir build -R "Dungeon"# macOS/Windows (multi-config)
./build/bin/Debug/yaze_emu_test --emu_test_rom=roms/alttp_vanilla.sfc
./build/bin/Debug/yaze_test_unit --rom=roms/alttp_vanilla.sfc
./build/bin/Debug/yaze_test_integration --rom=roms/alttp_vanilla.sfc
./build/bin/Debug/yaze_test_gui --rom=roms/alttp_vanilla.sfc
./build/bin/Debug/yaze_test_benchmark --rom=roms/alttp_vanilla.sfc
# Linux (single-config)
./build/bin/yaze_emu_test --emu_test_rom=roms/alttp_vanilla.sfc| Category | Command | Description |
|---|---|---|
| Stable | ctest --test-dir build -L stable |
Core unit tests, always available |
| GUI | ctest --test-dir build -L gui |
GUI smoke tests |
| ROM-dependent | ctest --test-dir build -L rom_dependent |
Requires a Zelda 3 ROM |
| Experimental | ctest --test-dir build -L experimental |
AI/experimental features |
# Configure with ROM path
cmake --preset mac-dev -DYAZE_TEST_ROM_VANILLA_PATH="$PWD/roms/alttp_vanilla.sfc"
# Build and run
cmake --build --preset mac-dev --target yaze_test
ctest --test-dir build -L rom_dependent| Preset | Stable | GUI | ROM-Dep | Experimental |
|---|---|---|---|---|
*-dbg |
Yes | Yes | No | No |
*-ai |
Yes | Yes | No | Yes |
*-dev |
Yes | Yes | Yes | No |
*-rel |
No | No | No | No |
| Variable | Purpose |
|---|---|
YAZE_TEST_ROM_VANILLA |
Path to vanilla ROM for ROM-dependent tests |
YAZE_TEST_ROM_EXPANDED |
Path to expanded (ZSCustom/OOS) ROM |
YAZE_TEST_ROM_PATH |
Legacy ROM path (vanilla fallback) |
YAZE_SKIP_ROM_TESTS |
Skip ROM tests (useful for CI) |
YAZE_ENABLE_UI_TESTS |
Enable GUI tests (auto-detected if display available) |
- Build Troubleshooting - Solutions for common build issues
- Platform Compatibility - Platform-specific notes and CI/CD details
- CMake Presets Guide - Complete preset reference
- Testing Guide - Comprehensive testing documentation