Files
PS_Launcher/installer
j.foucher 30eceaea2c v0.20.0 — Cancel-from-red-button waits for segments + new Verifying row state
Two related UX bugs fixed.

1) Red "Annuler" button on a row : DL appeared to keep going

The button calls RestartFromZeroAsync which used to fire
_activeDownloadCts.Cancel() then sleep 200 ms then delete the .partial.
With 16 parallel segments mid-write, 200 ms is way too short — the
segments were still flushing buffers when the file got deleted, then
recreated it from their own write streams, making it look like the
download "continued".

Now we keep a reference to the in-flight install Task
(_activeInstallTask) and properly await it (with a 10 s safety timeout)
before discarding state. This guarantees all segment FileStreams are
closed and the .partial deletion is the final word.

2) Progress bar said "Downloading…" during SHA-256 verification

The footer message switched to "🔍 Vérification SHA-256 v…" but the
row's badge stayed on "⬇ Downloading…" because row.State stayed at
Downloading throughout DownloadAsync (which internally chains DL +
verify). New VersionRowState.Verifying inserted between Downloading
and Installing, applied on the first hashProgress callback. Badge now
reads "🔍 Vérification…" / "🔍 Verifying…" during the hash phase.

VersionRowViewModel.IsBusy now also includes Verifying so commands
that gate on busy stay disabled during verification.

Versions bumped to 0.20.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 18:34:18 +02:00
..

PS_Launcher — Installeur

Génère un setup Windows (PSLauncher-Setup-{version}.exe) qui distribue le launcher principal + son updater dans Program Files\ASTERION VR\PSLauncher\.

Pré-requis

Build en une commande

Depuis la racine du repo :

powershell -ExecutionPolicy Bypass -File installer\build-installer.ps1

Ça enchaîne :

  1. dotnet publish src/PSLauncher.App -c ReleasePSLauncher.exe (~77 Mo)
  2. dotnet publish src/PSLauncher.Updater -c ReleasePSLauncher.Updater.exe (~10 Mo)
  3. ISCC PSLauncher.issinstaller/output/PSLauncher-Setup-X.Y.Z.exe

Le fichier final fait ~80 Mo (compression ultra Inno + binaires self-contained).

Distribution

Tu balances un seul .exe au client :

  • Il lance, choisit français/anglais, clique Suivant×3, c'est installé.
  • Raccourci bureau + menu Démarrer créés.
  • Désinstallation propre via Programmes et fonctionnalités.

Le cache utilisateur (%LocalAppData%\PSLauncher\config.json, logs, downloads partiels) n'est pas touché par l'install/désinstall — la license et les paramètres survivent.

Mise à jour du launcher

Le launcher se met à jour seul via PSLauncher.Updater.exe (cf. flow auto-update). Le client n'a pas besoin de rejouer l'installeur sauf changement majeur (TFM, déps).

Bumper la version

Avant de rebuild un installeur :

  1. src/PSLauncher.App/PSLauncher.App.csproj<Version>X.Y.Z</Version> (et AssemblyVersion / FileVersion)
  2. installer/PSLauncher.iss#define MyAppVersion "X.Y.Z"
  3. installer/build-installer.ps1

Côté serveur, mets aussi à jour manifest/versions.json section launcher avec la nouvelle version + URL de download du nouveau PSLauncher.exe (via le backoffice ou édition manuelle, puis php tools/sign-manifest.php).

Code-signing (optionnel)

Pour éviter le warning SmartScreen "éditeur inconnu", il faut signer PSLauncher.exe, PSLauncher.Updater.exe et PSLauncher-Setup-X.Y.Z.exe avec un certificat Authenticode (OV ~250 €/an, EV ~400 €/an, ou gratuit via SignPath pour OSS). Hors-scope du script actuel.