From 7830b3c5e89f0339949940b8986bf4849ad7f223 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 1 Nov 2026 21:35:30 +0100 Subject: 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---, 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. --- web/index.php | 78 +++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 16 deletions(-) (limited to 'web/index.php') diff --git a/web/index.php b/web/index.php index 7ed79da..77edf95 100644 --- a/web/index.php +++ b/web/index.php @@ -4,20 +4,23 @@ declare(strict_types=1); /** * zagan.bet download page. * - * Scans ./bin/client and ./bin/server and renders every build it finds, with - * its version, size and SHA-256. No database, no JavaScript, no dependencies. + * Scans ./bin/{gui,client,server} and renders every build it finds, with its + * version, size and SHA-256. The GPL source link points at the public git + * repository. No database, no JavaScript, no dependencies. * * Expected file names (anything else is ignored): * - * bin/client/zagan-bet-client--- - * bin/client/zagan-bet-client---.exe - * bin/server/zagan-bet-server--- + * bin/gui/zagan-bet-gui---[.exe] + * bin/gui/zagan-bet-gui----install.sh + * bin/gui/zagan-bet-gui----install.ps1 + * bin/client/zagan-bet-client---[.exe] + * bin/server/zagan-bet-server---[.exe] * * is MAJOR.MINOR.PATCH, is linux|windows|macos and * is x86_64|i686|aarch64. Example: * - * bin/client/zagan-bet-client-3.1.1-linux-x86_64 - * bin/server/zagan-bet-server-3.1.1-linux-x86_64 + * bin/gui/zagan-bet-gui-4.3.0-linux-x86_64 + * bin/client/zagan-bet-client-4.3.0-linux-x86_64 * * SHA-256 values are cached in a JSON file keyed on size and mtime, so a file * is only re-read when it changes. The cache lives in the system temp @@ -26,6 +29,10 @@ declare(strict_types=1); */ const KINDS = [ + 'gui' => [ + 'title' => 'Desktop app', + 'hint' => 'Windows 10 or newer, or a Linux desktop. No terminal needed.', + ], 'client' => [ 'title' => 'Client', 'hint' => 'Needs a terminal of at least 80×24 cells.', @@ -163,7 +170,7 @@ function read_release( bool &$dirty ): ?array { $pattern = '/^zagan-bet-' . preg_quote($kind, '/') - . '-v?(\d+\.\d+\.\d+)-([a-z]+)-([a-z0-9_]+)(\.exe)?$/i'; + . '-v?(\d+\.\d+\.\d+)-([a-z]+)-([a-z0-9_]+)(-install\.sh|-install\.ps1|\.exe)?$/i'; if (preg_match($pattern, $entry, $matches) !== 1) { return null; } @@ -192,10 +199,14 @@ function read_release( return null; } + $suffix = strtolower($matches[4] ?? ''); + $variant = str_starts_with($suffix, '-install.') ? 'installer' : 'binary'; + return [ 'version' => $matches[1], 'platform' => strtolower($matches[2]), 'arch' => strtolower($matches[3]), + 'variant' => $variant, 'file' => $entry, 'size' => $size, 'mtime' => $mtime, @@ -257,6 +268,10 @@ foreach (KINDS as $kind => $meta) { if ($byArch !== 0) { return $byArch; } + $byVariant = ($a['variant'] === 'installer' ? 1 : 0) <=> ($b['variant'] === 'installer' ? 1 : 0); + if ($byVariant !== 0) { + return $byVariant; + } return strcmp($a['file'], $b['file']); }); @@ -280,18 +295,41 @@ if ($cacheDirty) { żagań.bet - +

żagań.bet

-

Official client and server builds.

+

Official desktop app, terminal client and server builds.

0): ?>

Builds published UTC.

-

Client

+

Desktop app

+

Windows 10 or newer, or a Linux desktop. No terminal needed.

+ $r['variant'] === 'binary')); ?> + $r['variant'] === 'installer')); ?> + +

Nothing published yet.

+ + + + +

Installers

+

The installer checks the download, installs Zagan-Bet for your user and adds it to your programs. Run it next to a downloaded app, or on its own to fetch one.

+ + + +

Terminal client

Needs a terminal of at least 80×24 cells.

Nothing published yet.

@@ -315,7 +353,7 @@ if ($cacheDirty) { - +

SHA-256

On Linux use sha256sum <file>. On Windows use Get-FileHash <file>.

@@ -329,8 +367,17 @@ echo e($sums); ?> +

Source

+

Zagan-Bet is free software under the GNU GPL v3 or later. The source for these builds is at https://git.2137697.xyz/zagan-bet.git.

+

Running it

-

Client:

+

Desktop app on Linux:

+
chmod +x zagan-bet-gui-*-linux-x86_64-install.sh
+./zagan-bet-gui-*-linux-x86_64-install.sh
+

Desktop app on Windows (PowerShell):

+
powershell -ExecutionPolicy Bypass -File .\zagan-bet-gui-*-windows-x86_64-install.ps1
+

The installers verify the SHA-256 before installing. You can also run the downloaded app directly.

+

Terminal client:

chmod +x <downloaded-client>
 ./<downloaded-client>

Server, first run creates identity.p12, key.pem and cert.pem:

@@ -338,8 +385,7 @@ echo e($sums); ./<downloaded-server> --init ./<downloaded-server> -i 0.0.0.0 -p 11525 -

Windows: run the .exe from Windows Terminal or another real terminal.

- -

When lost, execute help command inside zagan.bet client. Server binary supports --help flag

+

Terminal client on Windows: run the .exe from Windows Terminal or another real terminal.

+

Run help inside the terminal client; the server binary supports --help.

-- cgit v1.2.3