j.foucher 9bdcdabb9e v0.3: resumable downloads with HTTP Range, Polly retry, persistent state
This is the robustness layer needed for real 14 GB builds. A 99%-complete
download that gets interrupted no longer means re-downloading 14 GB.

DownloadManager
---------------
- Range: bytes={resumeFrom}- on every (re)attempt; reads resumeFrom from
  the actual size of the .partial file so retries always resume from real
  on-disk state, not from a remembered counter.
- If-Range: ETag (or Last-Modified fallback). When the server returns 200
  instead of 206 we know the resource changed under us, so we discard
  .partial and start fresh.
- Polly resilience pipeline: 6 retries, exponential 1-32s with jitter,
  on HttpRequestException / IOException / TimeoutException / 5xx / 408 /
  429. Each retry re-evaluates resumeFrom from disk, so the server is
  asked only for what's actually missing.
- state.json persisted every 5s OR every 100 MiB, whichever comes first,
  via atomic write-then-rename. Holds url, total, downloaded, sha256,
  etag, last-modified, and the .partial path.
- Disk-space check happens once at fresh-start (1.05x expected size); a
  resume doesn't redo it.
- On final success: SHA-256 of the assembled .partial verified, then
  atomic rename to .zip and state.json deleted.

DownloadStateStore
------------------
- New IDownloadStateStore in PSLauncher.Core/Downloads.
- Stores under %LocalAppData%/PSLauncher/downloads/.
- Save / Load / Discard / ScanResumable. Tolerates malformed state files
  by ignoring them.

UI hint
-------
VersionRowViewModel now has ResumableBytes; when > 0, the install button
label switches to "↻  Reprendre (X%)" computed from
ResumableBytes / Remote.Download.SizeBytes. MainViewModel.RebuildList
queries IDownloadManager.GetResumableState(version) for each remote-only
row and populates ResumableBytes. Both the featured hero card and the
compact rows bind to InstallButtonLabel.

API change
----------
IDownloadManager gains GetResumableState(version) and
DiscardResumableState(version) so callers (and the UI) can reason about
in-progress downloads without poking at the filesystem directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 09:55:31 +02:00

PS_Launcher

Launcher Windows pour l'application UE5 PROSERVE : gère plusieurs versions cohabitantes, téléchargement et installation de nouvelles versions depuis un serveur, validation de license, release notes.

Composants

  • src/ — Solution C# / .NET 8 / WPF (Visual Studio 2022 + SDK .NET 8 requis)
    • PSLauncher.App : UI WPF (style Epic Games Launcher)
    • PSLauncher.Core : services (Manifest, Download, Install, Process…)
    • PSLauncher.Models : DTOs partagés
  • server/ — Code serveur PHP 8 (à déployer sous www/PS_Launcher/ sur OVH mutualisé)

Démarrage rapide (dev)

dotnet build PS_Launcher.sln
dotnet run --project src/PSLauncher.App

Pour produire un binaire autonome distribuable (un seul .exe ~70 Mo) :

dotnet publish src/PSLauncher.App -c Release
# Sortie : src/PSLauncher.App/bin/Release/net8.0-windows/win-x64/publish/PSLauncher.exe

Configuration locale

Le launcher écrit sa config dans %LocalAppData%\PSLauncher\config.json au premier lancement. Édite serverBaseUrl pour pointer vers ton serveur :

{
  "serverBaseUrl": "https://ton-domaine.com/PS_Launcher/api",
  "installRoot": "C:\\ASTERION\\GIT\\PS_Launcher\\ASTERION_VR"
}

État (roadmap)

  • v0.1 — Scan + lancement de versions installées
  • v0.2 — Manifest distant, download ZIP, install cohabitante, release notes Markdown
  • v0.3 — Reprise (HTTP Range), retry Polly, state.json
  • v0.4 — License (MySQL + Ed25519 + DPAPI)
  • v0.5 — Settings, suppression manuelle versions, toasts
  • v1.0 — Auto-update launcher, MSI installer

Voir le plan détaillé pour la roadmap complète.

Licence / interne

Repo interne ASTERION. Ne pas distribuer.

Description
No description provided
Readme 170 MiB
Languages
C# 46%
HTML 29%
PHP 23.3%
CSS 0.6%
Batchfile 0.5%
Other 0.6%