# Installer downloads

Caddy serves this directory at `https://<WEB_DOMAIN>/downloads/` (with directory
browsing enabled) in the production stack. Drop the built installers here — they
are **not** committed to git (see `.gitignore`).

## Filenames the landing page links to

The landing page (`../index.html`) links to these **stable** names, so keep
them exactly (electron-builder is configured in `app/package.json` to emit them):

| Platform            | File                              |
| ------------------- | --------------------------------- |
| Windows (x64)       | `GamersClubTV-Setup-x64.exe`      |
| macOS (Apple Silicon) | `GamersClubTV-arm64.dmg`        |
| macOS (Intel)       | `GamersClubTV-x64.dmg`            |
| Linux (x64)         | `GamersClubTV-x86_64.AppImage`       |

Any additional builds you drop here are still reachable via the "Browse all builds"
link, which points at the directory listing.

## How to produce the installers

From `app/` — **npm, not pnpm**. `app/` is locked with `package-lock.json`; running
pnpm there moves the npm-installed tree aside into `node_modules/.ignored` and then
dies on pnpm 11's `blockExoticSubdeps` (electron-builder pulls `@electron/node-gyp`
from git).

```bash
npm install
npm run dist     # electron-vite build + electron-builder → app/release/
```

On NixOS the bundled `7za`/`mksquashfs`/`desktop-file-validate`/`opj_decompress`
cannot execute (nix.dev/permalink/stub-ld). Build inside the FHS sandbox from the
repo-root flake instead — `make deploy-app` does this automatically, or by hand:

```bash
nix develop .#electron
cd app && npm run dist
```

electron-builder can only build the macOS `.dmg` on macOS and the Windows `.exe`
reliably on Windows (or via Wine); the Linux `.AppImage` builds on Linux. Build each
target on its native OS, then copy the artifacts from `app/release/` into this folder
on the VPS, e.g.:

```bash
scp app/release/GamersClubTV-x86_64.AppImage user@vps:/path/to/web/downloads/
```
