summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 05:19:21 -0300
committerGabriel Schneider <[email protected]>2026-11-06 05:55:49 -0300
commitc8553032ef84aec74cbb5d07d07f934eecf3d4a9 (patch)
treee47d3dd72b83e0b95d53271df9f5932dab389959 /build
parentde0447471febe1253b42a32fe9a1d6cdccc9d5b9 (diff)
downloadpardes-c8553032ef84aec74cbb5d07d07f934eecf3d4a9.tar.gz
pardes-c8553032ef84aec74cbb5d07d07f934eecf3d4a9.zip
kinds #9, the core's image code gone: src/image.zig (558 lines) and the static table go, so no kind is compiled in (Registry.init, Kind.image, compiledIn, `static` in /addons and "is compiled in" with them) and a test of the core's side of a kind's pane opens Kind.test_kind (a picture of one pixel, no library); a placement's fit (NativeGeometry, containGeometry) moves to surface.zig and a PDF's fit modes to pdf_view.zig; a terminal's kitty PNG decodes in TerminalImages.zig through wuffs as before, its downscale through stb_image_resize, the one part of zstbi the core keeps (stb_image patched out of it, the wuffs_images option, tag_image and image_exts gone); the image cases load the built image.so by path: test/panes.zig's and fs_namespace's through Addon.perform, T1 through Addon load (a new behaviour case: PNG, JPEG and PPM through 9P, the art words, a refused corrupt PNG, a dump's placeholder and its picture back, which replaces the decode unit test and ctl.zig's corrupt-image case), the snapshot, process and image harnesses by linking it into each session's data directory; images.snap unchanged
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'build')
-rw-r--r--build/snap.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/build/snap.zig b/build/snap.zig
index ec705b5f..981aec64 100644
--- a/build/snap.zig
+++ b/build/snap.zig
@@ -2,6 +2,8 @@ const std = @import("std");
pub fn addTty(b: *std.Build, opts: struct {
exe: *std.Build.Step.Compile,
+ /// The image addon, which every session that opens a picture loads.
+ image_addon: *std.Build.Step.Compile,
target: std.Build.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
ghostty_vt: ?*std.Build.Module,
@@ -61,6 +63,7 @@ pub fn addTty(b: *std.Build, opts: struct {
}
const run_process_test = b.addRunArtifact(process_test);
run_process_test.addArtifactArg(opts.exe);
+ run_process_test.addPrefixedFileArg("--image-addon=", opts.image_addon.getEmittedBin());
run_process_test.addArg(if (opts.gui) "--backend=gui" else "--backend=tui");
run_process_test.addPassthruArgs();
run_process_test.has_side_effects = true;
@@ -73,12 +76,14 @@ pub fn addTty(b: *std.Build, opts: struct {
if (opts.gui) {
const run_monkey_gui = b.addRunArtifact(process_test);
run_monkey_gui.addArtifactArg(opts.exe);
+ run_monkey_gui.addPrefixedFileArg("--image-addon=", opts.image_addon.getEmittedBin());
run_monkey_gui.addArgs(&.{ "--backend=gui", "window: a monkey" });
run_monkey_gui.setEnvironmentVariable("PARDES_GUI_MONKEY", "all");
run_monkey_gui.has_side_effects = true;
monkey_gui_step.dependOn(&run_monkey_gui.step);
const run_gui_golden = b.addRunArtifact(process_test);
run_gui_golden.addArtifactArg(opts.exe);
+ run_gui_golden.addPrefixedFileArg("--image-addon=", opts.image_addon.getEmittedBin());
run_gui_golden.addArgs(&.{ "--backend=gui", "window: its scenes" });
run_gui_golden.setEnvironmentVariable("PARDES_GUI_GOLDEN", b.graph.environ_map.get("PARDES_GUI_GOLDEN") orelse "check");
run_gui_golden.setCwd(b.path("."));
@@ -91,6 +96,7 @@ pub fn addTty(b: *std.Build, opts: struct {
const run_snap = b.addRunArtifact(snap);
run_snap.addArtifactArg(opts.exe);
run_snap.addPrefixedFileArg("--lspmock=", lspmock.getEmittedBin());
+ run_snap.addPrefixedFileArg("--image-addon=", opts.image_addon.getEmittedBin());
run_snap.addPassthruArgs();
// scripts fork children and drive real ptys: never cached, never "up to date"
run_snap.has_side_effects = true;