summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 06:24:42 -0300
committerGabriel Schneider <[email protected]>2026-11-06 11:19:32 -0300
commit76c55b5bce0f181b0b15b16596c900397dfef544 (patch)
treee99180a43bfaa7d8d7c3ff22ed28ee5c425c3e1a /build
parent0893d632e242553390d968751fff0e880627c34a (diff)
downloadpardes-76c55b5bce0f181b0b15b16596c900397dfef544.tar.gz
pardes-76c55b5bce0f181b0b15b16596c900397dfef544.zip
kinds #13, pdf.so: addons/pdf/pdf.c is the PDF kind against ABI 2.1 (its record the file's bytes, renders on jobs over two MuPDF lanes a cookie aborts, its strip laid out at `at` with crops and repainted rows for hover and selection, its text the body, search, links and PdfSections through look and text, P:F S places, PdfFit, PdfTint, PdfSections, its keys), pdf_bridge moves beside it, and the build makes it from position-independent MuPDF, FreeType and zlib exporting pardes_addon alone, installs <prefix>/lib/pardes/addons/pdf.so, -Dmupdf now builds it or not and mupdf-check runs its addon-test script
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.zig13
1 files changed, 7 insertions, 6 deletions
diff --git a/build/snap.zig b/build/snap.zig
index 981aec64..4f9b8f63 100644
--- a/build/snap.zig
+++ b/build/snap.zig
@@ -2,8 +2,9 @@ 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,
+ /// The addons the build made (image, pdf), which every session loads:
+ /// each `--addon=<lib>`, linked into its data directory's addons.
+ addons: []const *std.Build.Step.Compile,
target: std.Build.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
ghostty_vt: ?*std.Build.Module,
@@ -63,7 +64,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());
+ for (opts.addons) |a| run_process_test.addPrefixedFileArg("--addon=", a.getEmittedBin());
run_process_test.addArg(if (opts.gui) "--backend=gui" else "--backend=tui");
run_process_test.addPassthruArgs();
run_process_test.has_side_effects = true;
@@ -76,14 +77,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());
+ for (opts.addons) |a| run_monkey_gui.addPrefixedFileArg("--addon=", a.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());
+ for (opts.addons) |a| run_gui_golden.addPrefixedFileArg("--addon=", a.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("."));
@@ -96,7 +97,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());
+ for (opts.addons) |a| run_snap.addPrefixedFileArg("--addon=", a.getEmittedBin());
run_snap.addPassthruArgs();
// scripts fork children and drive real ptys: never cached, never "up to date"
run_snap.has_side_effects = true;