The settings show « Redémarrer » next to « Mise à jour prête ». It verifies the kept package of the chosen channel again, hands exactly that file to Velopack with `Update.exe apply --waitPid <pid> --package <file>`, then quits as « Quitter » does (WM_QUIT, never hidden in the notification area). Velopack 1.2.161 reads the file in place, waits for the app to exit, replaces current\ and opens the new version once, or the old one again after a failure. After « Quitter », the next launch does the same before loading the app, offline too, but only in the single instance: a shortcut launched while the app runs still just brings its window back (#50). An attempt record, <channel>-<version>.attempt next to the package folder, holds the installer's process id. A launch that finds it never retries on its own: it waits for a running installer (a close second launch, or the old version reopened after a failure), then either leaves the app to the new version or opens the current one with a one-time notice. « Redémarrer » retries; a newer release starts fresh. The record survives a new download of the same version, since Velopack deletes a package it cannot open. Velopack's swap has no rollback between its two renames; this residual risk is recorded in ADR-0005 and docs/paquets-windows.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.0 KiB
status
| status |
|---|
| accepted |
Package with Velopack's packer and authenticate updates with our own signed manifest
Arena Tracker installs per user with Velopack 1.2.161 (scripts/package), but only its packer is used: the app never calls the Velopack SDK. In that version the SDK's startup path opens cached packages to read their manifests even with auto-apply disabled, and nothing in Velopack checks a package against a project key. Each release therefore carries a manifest signed with the project's Ed25519 key, binding the app, the Windows target, the version, the channel and the source commit to the SHA-256 of one full package. The core's verify_release checks it before anything opens the package as an archive. Releases contain full packages only.
Velopack also installs a root launcher, Arena Tracker.exe, which runs Update.exe start. If the installed manifest is unreadable, that command opens the latest packages\*.nupkg to read its manifest, and if an app-* folder exists it applies that package without any signature check. Our Start Menu shortcut targets current\arena-tracker.exe and never runs the launcher. Both paths need a file written into %LOCALAPPDATA%\ArenaTracker by the same Windows account, which could equally replace the app's executable. We accept this residual path (decided on 2026-11-20, as #57 required before adopting Velopack).
The MSVC C runtime is linked statically (.cargo/config.toml), so a package ships no vcruntime140.dll that would vary with the build machine's Visual Studio redistributable.
Considered Options
- Velopack SDK at startup: automatic updates for free, but it opens unauthenticated local packages before the app can check them.
- Delete the installer's package copy after each install or update: leaves the launcher nothing to open, at the cost of altering files Velopack manages; it protects only against a writer who can already replace the app.
- Our own installer and updater: no residual path, but a much larger amount of code to write and maintain.
- Packer only, own signed manifest, accepted launcher path (chosen).
Consequences
- The updater must download into a folder outside the installation and Velopack's cache, call
verify_releasethere, and hand exactly those verified bytes to Velopack; unverified bytes never enter%LOCALAPPDATA%\ArenaTracker, even after an interrupted download. - Applying runs
Update.exe apply --waitPid <pid> --package <file>on the file just verified again, which Velopack reads in place. Its folder swap has no rollback: a power cut between its two renames leaves nocurrentfolder until a reinstall (accepted;docs/paquets-windows.md, « Application de la mise à jour »). - Delta packages stay off (
--delta None) until their preparation path can be authenticated too. - Upgrading Velopack means re-reading its startup, locator and install code for new paths that open local packages.
- The private key never enters the repository, the app or the artefacts; only its public key is built into the executable.