From d03b727cddfcec41b464ddf6178f17d0e831e529 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 22:49:11 -0300 Subject: kinds #50, macOS by pattern: off Linux every core module has the addons compiled in (Addon.zig's loader is a Linux memfd, now refused elsewhere at compile time), the native shell registers them at start as the tui and gui do, and `-Dmacos-sdk=` hands SDL's build the SDK's paths, so `-Dplatform=gui -Dtarget=aarch64-macos` configures (and `zig build core-test -Dtarget=aarch64-macos` compiles its test binary, MuPDF and both kinds in, without running it) Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- docs/typ/building.typ | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/typ/building.typ') diff --git a/docs/typ/building.typ b/docs/typ/building.typ index 61641cba..41fadbb2 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -33,6 +33,11 @@ MuPDF is compiled only for the steps and tests that use `pdf.so`. [`zig build static -Dplatform=gui`], [`pardes-gui` with the two addons compiled in, linked dynamically (SDL and the GPU take the display's libraries)], ) +Off Linux the addons are always compiled in, as in a static build: +`Addon.zig` loads a library through a Linux memfd, and `Addon load` +elsewhere says `not on this platform`. A gui for macOS built on another +system takes the SDK SDL needs with `-Dmacos-sdk=`. + A bare `zig build` installs into the prefix (`zig-out`, or `--prefix `) and copies the binaries into `~/.local/bin`; `-Dhome-install=false` leaves that copy out. Zig 0.17 keeps the prefix from the build script, so @@ -57,6 +62,7 @@ must share with its session; `pardes --help` lists every flag. [`-Dstamp-commit`], [bool: the git commit in `--version` and crash records; on for release builds and the `~/.local` install], [`-Dtheme-animation`], [bool, `true`], [`-Dworkspace-tag`], [bool: draw the workspace tag row; on except for macOS, whose menu bar carries it], + [`-Dmacos-sdk`], [path: the macOS SDK SDL's headers and frameworks come from, for a gui built for macOS elsewhere], [`-Dprebuilt-shaders`], [bool: embed the committed SPIR-V; on for a bare `zig build`, off with `-Dplatform`; `zig build shaders` refreshes it with glslc], [`-Dtracy`], [path to a Tracy checkout; off], [`-Dmacos-identity`], [codesigning identity for `pardes.app`; `-` (ad hoc)], -- cgit v1.3