blob: 28ed67c894d04108f2f52db29814caad2c1f904c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Installing pardes: the downloads, else the clone and the build, included
// by setup.typ and by the site's landing page, so it is written once. The
// downloads and the mirrors come from `project` in style.typ.
#import "style.typ": cmd, project
#if project.download != none {
let d = project.download
for f in d.files {
let name = f.url.split("/").last()
[pardes #d.version, #f.what (#str(calc.round(f.bytes / 1000000)) MB):]
cmd("curl -LO " + f.url + "\necho '" + f.sha256 + " " + name + "' | sha256sum -c\nchmod +x " + name + " && mv " + name + " ~/.local/bin/" + f.program)
}
[The checksums are also in #link(d.sums)[`SHA256SUMS`].]
parbreak()
[Or build it from source:]
}
#let first = project.mirrors.first()
#cmd("git clone " + first.clone + " && cd pardes")
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")
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
loads at start from its prefix; a pardes without them (a downloaded binary
alone) shows image files and PDFs as text.
|