summaryrefslogtreecommitdiffstats
path: root/web/README.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-01 21:35:30 +0100
committersalmonik <salmonik@tuta.io>2026-11-01 21:38:36 +0100
commit7830b3c5e89f0339949940b8986bf4849ad7f223 (patch)
treed4ebb4f10583cef1da3b181e093dd5d65ac8a0bb /web/README.md
parentv4.2.1: plain-language game copy and a balance fetch on login (diff)
downloadzagan-bet-7830b3c5e89f0339949940b8986bf4849ad7f223.tar.gz
zagan-bet-7830b3c5e89f0339949940b8986bf4849ad7f223.zip
v4.3.0: package the desktop app with verifiable installers
publish.sh builds the GUI with the gui-release profile, names it zagan-bet-gui-<version>-<platform>-<arch>, and renders a bash and a PowerShell installer next to each app. Both embed the app's SHA-256, verify the file (or fetch it), install per-user and add a launcher: a desktop entry plus an SVG icon on Linux, a Start-menu shortcut on Windows. The download page gains a Desktop app section with the apps and installers, keeps the terminal client and server, links the public git repository for the GPL source, and lists every file in the sha256sum block. deploy.sh verifies all four artifact kinds. Publishing refuses a dirty tree so the linked history matches the binaries.
Diffstat (limited to 'web/README.md')
-rw-r--r--web/README.md43
1 files changed, 31 insertions, 12 deletions
diff --git a/web/README.md b/web/README.md
index e79abd4..bd87e11 100644
--- a/web/README.md
+++ b/web/README.md
@@ -1,15 +1,15 @@
1# Download page 1# Download page
2 2
3`index.php` scans `bin/client` and `bin/server` on every request and renders 3`index.php` scans `bin/gui`, `bin/client` and `bin/server` on every request and
4whatever builds it finds, with version, size and SHA-256. No database, no 4renders whatever builds it finds, with version, size and SHA-256. No database, no JavaScript, no CSS, no dependencies. The page is plain
5JavaScript, no CSS, no dependencies. The page is plain browser defaults: 5browser defaults: black text, blue links, monospace checksums. PHP 8.0+.
6black text, blue links, monospace checksums. PHP 8.0+.
7 6
8## Layout 7## Layout
9 8
10``` 9```
11web/ 10web/
12 index.php 11 index.php
12 bin/gui/ served at /bin/gui/... (app and installers)
13 bin/client/ served at /bin/client/... 13 bin/client/ served at /bin/client/...
14 bin/server/ served at /bin/server/... 14 bin/server/ served at /bin/server/...
15``` 15```
@@ -22,13 +22,22 @@ The page only lists files that match the release pattern; anything else in
22those directories is ignored. 22those directories is ignored.
23 23
24``` 24```
25zagan-bet-client-<version>-<platform>-<arch>[.exe] 25bin/gui/zagan-bet-gui-<version>-<platform>-<arch>[.exe]
26zagan-bet-server-<version>-<platform>-<arch> 26bin/gui/zagan-bet-gui-<version>-<platform>-<arch>-install.sh
27bin/gui/zagan-bet-gui-<version>-<platform>-<arch>-install.ps1
28bin/client/zagan-bet-client-<version>-<platform>-<arch>[.exe]
29bin/server/zagan-bet-server-<version>-<platform>-<arch>[.exe]
27``` 30```
28 31
29`<version>` is `MAJOR.MINOR.PATCH`, `<platform>` is `linux`, `windows` or 32`<version>` is `MAJOR.MINOR.PATCH`, `<platform>` is `linux`, `windows` or
30`macos`, `<arch>` is `x86_64`, `i686` or `aarch64`. 33`macos`, `<arch>` is `x86_64`, `i686` or `aarch64`.
31 34
35The installers are generated next to their app. They embed the app's SHA-256,
36check the file (or download it) and install it for the current user: Linux
37writes `~/.local/bin/zagan-bet-gui` plus a `.desktop` launcher, Windows writes
38`%LOCALAPPDATA%\Programs\Zagan-Bet` plus a Start-menu shortcut. The source
39archives satisfy the GPL's corresponding-source requirement.
40
32## Publishing a build 41## Publishing a build
33 42
34From the repository root: 43From the repository root:
@@ -37,15 +46,21 @@ From the repository root:
37./scripts/publish.sh 46./scripts/publish.sh
38``` 47```
39 48
40It reads the version from `Cargo.toml`, builds all four artifacts and installs 49It reads the version from `Cargo.toml`, builds every artifact and installs
41them under `web/bin` with the names above. Override the destination with 50them under `web/bin` with the names above. The GUI is built with the
42`DEST=/srv/www/bin ./scripts/publish.sh`. 51workspace's `gui-release` profile (LTO, stripped) and the installers are
52rendered with Python 3 and the published SHA-256. Run it from a clean tree so
53the release commit is the source the page links to. Override the destination
54with `DEST=/srv/www/bin ./scripts/publish.sh`, and the download origin baked
55into the installers with `URL_BASE=https://staging.example/ ./scripts/publish.sh`.
56`ALLOW_DIRTY=1` skips the clean-tree check for a preview.
43 57
44Builds are per target triple, so these must be installed: 58Builds are per target triple, so these must be installed:
45`x86_64-unknown-linux-gnu`, `i686-unknown-linux-gnu` and 59`x86_64-unknown-linux-gnu`, `i686-unknown-linux-gnu` and
46`x86_64-pc-windows-gnu`, plus the mingw linker for the Windows build. Client 60`x86_64-pc-windows-gnu`, plus the mingw linker for the Windows build. Client
47builds always pass `--no-default-features`, which drops the server's OpenSSL 61builds always pass `--no-default-features`, which drops the server's OpenSSL
48dependency; the client is rustls-only. 62dependency; the client is rustls-only. The GUI needs Python 3 at publish time
63for the installer templates in `scripts/installers/`.
49 64
50Cargo itself cannot produce these names: it always writes 65Cargo itself cannot produce these names: it always writes
51`target/<triple>/release/<bin>`. The script renames after each build. 66`target/<triple>/release/<bin>`. The script renames after each build.
@@ -100,8 +115,9 @@ Then open <http://127.0.0.1:8899/>.
100``` 115```
101 116
102`deploy.sh` rsyncs `web/` with `--delay-updates`, so a visitor never sees a 117`deploy.sh` rsyncs `web/` with `--delay-updates`, so a visitor never sees a
103half-written binary, then fetches the live page and every artifact it lists and 118half-written binary, then fetches the live page and every artifact it lists —
104compares the downloaded bytes with the local SHA-256. `--verify-only` skips the 119GUI apps, installers, terminal clients and servers — and compares the
120downloaded bytes with the local SHA-256. `--verify-only` skips the
105upload and only checks the live site. Old versions are left on the server; 121upload and only checks the live site. Old versions are left on the server;
106prune them by hand. 122prune them by hand.
107 123
@@ -124,3 +140,6 @@ php -S 127.0.0.1:8899 -t /srv/staging
124 stay downloadable until you remove them from `bin/`. 140 stay downloadable until you remove them from `bin/`.
125- The checksum block is in `sha256sum` format, so visitors can save it as 141- The checksum block is in `sha256sum` format, so visitors can save it as
126 `SHA256SUMS` and run `sha256sum -c SHA256SUMS`. 142 `SHA256SUMS` and run `sha256sum -c SHA256SUMS`.
143- The page links <https://git.2137697.xyz/zagan-bet.git> for the GPL
144 corresponding source; publish only from a committed release so that link
145 contains the exact source.