diff options
| author | Peter Geissler <peter@haxx.in> | 2026-08-28 14:22:57 +0200 |
|---|---|---|
| committer | Peter Geissler <peter@haxx.in> | 2026-08-28 14:22:57 +0200 |
| commit | 7941820413d82b3d62d7fc2ac15ef0e1b3b69ee4 (patch) | |
| tree | 8f5cf4a5614f9b5af86a4c5a230e48469d0a54d8 /docs | |
| parent | windows: fall back to `edit`, not to a notepad window (diff) | |
| download | slosh-7941820413d82b3d62d7fc2ac15ef0e1b3b69ee4.tar.gz slosh-7941820413d82b3d62d7fc2ac15ef0e1b3b69ee4.tar.xz slosh-7941820413d82b3d62d7fc2ac15ef0e1b3b69ee4.zip | |
docs: the Windows build is a cross-compile, and only that
The docs offered a native build as an equal alternative -- "the same
command builds natively on the Windows box itself, with zig on PATH and
a make" -- and it does not work. Makefile.windows needs sed, cat,
mkdir -p and shell grouping, none of which cmd.exe has; and on ARM64
`zig cc` in zig 0.16.0 dies with an access violation on a one-line C
file, so the compiler cannot run there at all. The zip that does it
matches the published shasum, so this is upstream rather than a bad
download.
Nobody following those two sentences reached a binary. So they are
gone, along with the "# host arch, native" usage line in the makefile
and the "cross-compiles too" aside in the two install sections, which
both implied that building on the box was the normal path and the
cross-compile a bonus. It is the other way round, and now the pages
say so once, in the same words each time.
`builds and runs natively` on the doc's first line loses `builds`:
what is native about slosh.exe is the binary, not where it was made.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/index.md | 4 | ||||
| -rw-r--r-- | docs/windows.md | 19 |
2 files changed, 13 insertions, 10 deletions
diff --git a/docs/index.md b/docs/index.md index d7513dc..ad90c7f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -37,8 +37,10 @@ there.) Windows 10/11, x86-64 and ARM64, as one `slosh.exe`. Panes are ConPTYs and sessions are AF_UNIX sockets, so everything documented here works there too. +Cross-compiled from a mac or a Linux box, then copied across: + ```bash -make -f Makefile.windows ARCH=x86_64 # or ARCH=aarch64; cross-compiles too +make -f Makefile.windows ARCH=x86_64 # or ARCH=aarch64 ``` The details, and the three decisions the port rests on: [windows](windows.md). diff --git a/docs/windows.md b/docs/windows.md index 12b4a8c..861a3cd 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -1,20 +1,21 @@ # Windows -slosh builds and runs natively on Windows 10/11, on both x86-64 and ARM64. It -is one `slosh.exe` with no runtime dependency beyond the OS. +slosh runs natively on Windows 10/11, on both x86-64 and ARM64. It is one +`slosh.exe` with no runtime dependency beyond the OS. + +The build is a cross-compile, from a mac or a Linux box: ```bash -make -f Makefile.windows ARCH=x86_64 # cross-compile from mac or Linux +make -f Makefile.windows ARCH=x86_64 make -f Makefile.windows ARCH=aarch64 ``` -`ARCH` defaults to `aarch64`. The same command builds natively on the Windows -box itself, with zig on `PATH` and a `make`. The vendored terminal core is -cross-compiled the same way and lands in -`vendor/libghostty-vt/zig-out-win-<arch>`, so the two architectures never share -an output directory. +`ARCH` defaults to `aarch64`. The vendored terminal core is cross-compiled the +same way and lands in `vendor/libghostty-vt/zig-out-win-<arch>`, so the two +architectures never share an output directory. -The binary appears at `build/win-<arch>/slosh.exe`. +The binary appears at `build/win-<arch>/slosh.exe`; copy that to the Windows +machine. ## What it does there |
