Appearance
Building and testing
Build CameraObscura
The app targets Windows x86-64. Install the compiler version in .zigversion and keep the checked-in vendor/ sources. The build downloads the pinned MinGW SDL2 package when it is missing. See Zig downloads.
Place ffmpeg.exe, ffprobe.exe, LICENSE, and README.txt under tools/ffmpeg/ before building. The helper bundle used for development is the 64-bit Gyan Windows essentials build of FFmpeg 9.1. Check the vendor’s SHA-256 for the archive and keep the notices with the helpers. See FFmpeg Windows downloads.
Run from the repository root in PowerShell.
powershell
zig build -Doptimize=ReleaseSafe
zig build test
& .\zig-out\bin\CameraObscura.exeThe build installs CameraObscura and its helper binaries under zig-out/bin/. Keep bin/tools/ffmpeg/ beside the executable. Review the FFmpeg build, license, source availability, and third-party notices before redistributing binaries.
Run regression checks
Most scripts create their own media and launch the app with a hidden window. Run the capture-quality checks on an interactive Windows desktop with a playback device. See Source layout for the modules and smoke entry points.
| Script | What it checks |
|---|---|
./scripts/smoke.ps1 | Synthetic capture, draft recovery, trim and audio imports, and decoding exported files |
./scripts/project-smoke.ps1 | Project persistence, media folders, restart, and missing source files |
./scripts/beat-smoke.ps1 | Timeline editing, still and video transitions, audio fades, naming, and composed exports |
./scripts/beat-workflow-smoke.ps1 | Simulated takes, review, drag and drop, music, and saved beat bins |
./scripts/promo-editing-smoke.ps1 | Mixed resolutions, splits, undo, templates, pinned frames, and crop behavior across formats |
./scripts/targets-smoke.ps1 | Output dimensions, framing, timing, and safe replacement |
./scripts/cli-smoke.ps1 | JSON validation, revision guards, desktop round trips, and CLI exports |
./scripts/ui-smoke.ps1 | Desktop controls, layout, and preview behavior |
./scripts/hotkey-smoke.ps1 | Recording hotkey handling and rebinding |
./scripts/desktop-audio-smoke.ps1 | Capture and muxing from the desktop audio device |
./scripts/capture-quality-smoke.ps1 | Rolling replay, frame rate, and game audio isolation |
./scripts/performance-smoke.ps1 | Background imports and finalization, cached scrubbing, and live title rebuild timing |
Build the documentation site
The Markdown sources live under docs/. VitePress supplies the site, navigation, and local search. Add new guide pages there and register them in docs/.vitepress/config.mjs if they belong in the sidebar.
Install Node.js 22.12 or newer. Run these commands from the repository root.
sh
npm ci --prefix docs --cache zig-out/docs/npm-cache --no-audit --no-fund
npm --prefix docs run docs:dev
npm --prefix docs run docs:build
npm --prefix docs run docs:previewUse docs:dev while editing and docs:preview to check the production build. The static output is written to zig-out/docs/site/. The generated pages use .html URLs so a static host can serve them directly. The default base path is /. When hosting under a subdirectory such as /CameraObscura/, set CAMERA_OBSCURA_DOCS_BASE to that path with leading and trailing slashes before building and previewing.
Rerun npm ci when docs/package-lock.json changes. Installed dependencies, VitePress caches, and generated output are ignored by Git.
Rebuild the hosted site
On the Clyde Games server, run sudo rebuild-obscura-docs to pull the current main branch and rebuild the site. The server runs scripts/deploy-docs.sh as its dedicated documentation build user. The script switches the live symlink at /var/www/obscura/current after the new build passes its file checks. When running the script on another Linux host, set DOCS_OUTPUT_DIR to choose a publication path.