From dd85d1d636383a735171472c96fd595a91856530 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 14:27:57 -0300 Subject: build: the tty configures with no sketchbook beside it The snake and veil GPU addons ask for sketchbook, a path dependency, and a missing path is a fatal error at configure (reports/build-api.md 3.2), so every build failed without ../sketchbook, the terminal's too. addons.gpu now asks for it under the window build alone (-Dplatform=gui or the bare build); elsewhere snake-shader and veil are still steps, which fail saying so. On the terminal's build the snake_shader addon's --addon-test comparison goes with it (behaviour-test and addon-test run the fake, snake, life and pdf ones there). Gates: with ../sketchbook moved aside, zig build -l -Dplatform=tui (and --print-configuration, and the musl shape) succeeds, where the parent fails "failed to open ../sketchbook: FileNotFound"; -Dplatform=gui still needs it. zig build -l and -h byte-identical, whole matrix; the printed configuration byte-identical for the bare and gui shapes; the tui, musl, nopdf, tsmin, ReleaseFast and macos shapes lose the snake_shader and veil libraries, their installs, glslc runs, test and --addon-test comparison and sketchbook's abi-hash tool, and gain one Fail step; the tui configuration is the same with and without sketchbook. Warm rebuild on tui (install addons, core-test shell-test unit-test process-test): 0 compiles not cached, the parent's counts, installed binaries cmp-identical to the parent's. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- build/addons.zig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'build/addons.zig') diff --git a/build/addons.zig b/build/addons.zig index a3a23825..b092b82a 100644 --- a/build/addons.zig +++ b/build/addons.zig @@ -2,12 +2,18 @@ const std = @import("std"); const mupdf_build = @import("mupdf.zig"); /// The GPU addons over sketchbook's `gpu_scene`: the snake (addons/snake_shader) -/// and the frame corpus's translucent veil (test/veil.zig). -pub fn gpu(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.Optimize, addon_mod: *std.Build.Module) ?*std.Build.Step.Compile { +/// and the frame corpus's translucent veil (test/veil.zig). They are the +/// window build's, as sketchbook is: the terminal's configures without +/// sketchbook beside the checkout, and there their steps say so. +pub fn gpu(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.Optimize, addon_mod: *std.Build.Module, window: bool) ?*std.Build.Step.Compile { const snake_shader_step = b.step("snake-shader", "build the optional GPU snake addon into zig-out/lib"); var snake_shader_lib: ?*std.Build.Step.Compile = null; const veil_step = b.step("veil", "build the frame corpus's translucent GPU test addon (test/veil.zig) into zig-out/lib"); - if (b.lazyDependency("sketchbook", .{ .@"gpu-only" = true })) |sb| { + if (!window) { + const fail = b.addFail("the GPU addons are the window's: -Dplatform=gui (sketchbook beside this checkout)"); + snake_shader_step.dependOn(&fail.step); + veil_step.dependOn(&fail.step); + } else if (b.lazyDependency("sketchbook", .{ .@"gpu-only" = true })) |sb| { const files = b.addWriteFiles(); for ([_][]const u8{ "vert", "frag", "post.frag" }) |stage| { const compile = b.addSystemCommand(&.{ "glslc", "-O" }); -- cgit v1.3