summaryrefslogtreecommitdiff
path: root/docs/typ
diff options
context:
space:
mode:
Diffstat (limited to 'docs/typ')
-rw-r--r--docs/typ/building.typ12
-rw-r--r--docs/typ/install.typ5
2 files changed, 13 insertions, 4 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ
index 8520fbbf..151d4b3f 100644
--- a/docs/typ/building.typ
+++ b/docs/typ/building.typ
@@ -14,8 +14,15 @@ fetched and pinned by the manifest; the terminal build needs no system
package. The SDL shell builds SDL3 and FreeType from source. Pictures and
PDFs are addons, each its own step: `zig build image`, `zig build pdf`
(`pdf.so`, over MuPDF, its own FreeType and zlib in it), or `zig build
-addons` for both; the binaries hold neither, and MuPDF is compiled only
-for the `pdf` step and the tests.
+addons` for both; the binaries hold neither. MuPDF, and the FreeType and
+zlib the terminal build takes only for it, are lazy: a build fetches them
+only with `-Dpdf`, which is on by itself once MuPDF is fetched, so a fresh
+checkout's `zig build -Dplatform=tui` downloads none of them, and its
+first `zig build pdf -Dpdf` (or `addons`, `static`, `mupdf-check`, a PDF
+bench) fetches MuPDF once; without it those steps say to add `-Dpdf`, and
+the tests leave their PDF cases out. (Zig 0.17's configure is handed the
+options and never the steps asked for, so a step cannot fetch for itself.)
+MuPDF is compiled only for the steps and tests that use `pdf.so`.
#pairs(
[`zig build`], [the terminal shell and the SDL window together, *installed into `~/.local/bin`* (`pardes` and `pardes-gui`)],
@@ -41,6 +48,7 @@ must share with its session; `pardes --help` lists every flag.
#pairs(
[`-Dplatform`], [`tui`, `gui`, `macos`; absent: the tui and SDL shells together, installed into `~/.local`],
+ [`-Dpdf`], [bool: build the pdf addon, fetching MuPDF the first time; default on once MuPDF is fetched, and off Linux],
[`-Djpx`], [bool, `true`: JPEG 2000, and with it scanned PDFs],
[`-Dtree-sitter`], [`disabled`, `zig`, `minimal`, `full`; `full`],
[`-Dembed-sources`], [bool, `false`: serve the sources under #file("/src")],
diff --git a/docs/typ/install.typ b/docs/typ/install.typ
index 28ed67c8..9b23669f 100644
--- a/docs/typ/install.typ
+++ b/docs/typ/install.typ
@@ -22,9 +22,10 @@ With Zig 0.17 (the build fetches everything else; once that is
downloaded, a first build from a clean cache took 62 seconds on 16 cores):
#cmd("# pardes, in a terminal\nzig build -Dplatform=tui --prefix ~/.local")
#cmd("# pardes-gui, its own window\nzig build -Dplatform=gui --prefix ~/.local")
-#cmd("# the image and PDF addons (or `zig build image pdf`)\nzig build addons -Dplatform=tui --prefix ~/.local")
+#cmd("# the image and PDF addons (or `zig build image pdf`)\nzig build addons -Dpdf -Dplatform=tui --prefix ~/.local")
Then run `pardes` or `pardes FILE`. The addons are steps of their own:
`lib/pardes/addons/image.so`, the image addon, and
-`lib/pardes/addons/pdf.so`, the PDF addon (over MuPDF), which pardes
+`lib/pardes/addons/pdf.so`, the PDF addon (over MuPDF, which `-Dpdf`
+fetches the first time and every build after takes as fetched), which pardes
loads at start from its prefix; a pardes without them (a downloaded binary
alone) shows image files and PDFs as text.