Files
PS_Launcher/server
j.foucher 3a00b0e677 Don't trust manifest.latest, no-cache the manifest fetch
Two robustness fixes after a real-world miss where v1.4.7 was uploaded but
the launcher kept reporting v1.4.6 as latest:

1. UpdateChecker: ignore the `latest` field of the manifest entirely.
   Always pick the highest SemVer in the versions[] array (filtered by
   availableForDownload). Removes a class of "I forgot to bump latest"
   bugs at the server.

2. ManifestService: send Cache-Control: no-cache, no-store + Pragma:
   no-cache when fetching. The user explicitly clicked "Check for
   updates", they want fresh data — bypass any intermediate cache
   (browser-style HTTP cache, OVH static handler default 2-day expires).

3. sign-manifest.php: after hashing the uploaded ZIPs, auto-update
   `manifest.latest` to the highest version that actually has a ZIP
   on the server. Prevents the same drift the client now ignores, but
   keeps the field meaningful for any consumer that reads it.

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

PS_Launcher — Côté serveur

Contenu de ce dossier à uploader sous www/PS_Launcher/ sur le mutualisé OVH.

Arborescence finale après upload

www/
└── PS_Launcher/
    ├── .htaccess
    ├── api/
    │   ├── config.php          ← À ÉDITER avec tes vraies valeurs (DB, secrets)
    │   ├── index.php
    │   ├── lib/Response.php
    │   └── routes/
    │       ├── Manifest.php
    │       └── Releasenotes.php
    ├── manifest/
    │   └── versions.json       ← Régénéré par tools/sign-manifest.php
    ├── releasenotes/
    │   ├── 1.4.5.md
    │   └── 1.4.6.md
    ├── builds/                 ← Tu uploades ici les ZIPs en SFTP
    │   └── proserve-1.4.6.zip
    └── tools/
        └── sign-manifest.php   ← Lance après chaque upload de ZIP

Workflow de release

  1. Packager Unreal → produit le dossier Proserve v1.4.6/.
  2. Le zipper localement : le contenu du ZIP doit reproduire ce qui est attendu côté client (le client extrait dans Proserve v1.4.6/, donc le ZIP peut soit contenir un dossier racine Proserve v1.4.6/, soit son contenu directement — voir ci-dessous).
  3. Uploader le ZIP via SFTP dans www/PS_Launcher/builds/proserve-1.4.6.zip.
  4. Éditer manifest/versions.json pour ajouter (ou modifier) l'entrée 1.4.6 et le champ latest.
  5. Ajouter releasenotes/1.4.6.md.
  6. Se connecter en SSH OVH et lancer :
    cd www/PS_Launcher
    php tools/sign-manifest.php
    
    Cela calcule automatiquement sizeBytes et sha256 à partir du ZIP.

Convention du contenu du ZIP

Le client extrait le ZIP dans installRoot/Proserve v{version}/. Donc le ZIP doit contenir directement les fichiers PROSERVE_UE_5_5.exe, Engine/, PROSERVE_UE_5_5/, etc. à sa racine (pas de dossier englobant).

Test rapide en ligne de commande :

unzip -l proserve-1.4.6.zip | head -10

Doit lister PROSERVE_UE_5_5.exe à la racine, pas Proserve v1.4.6/PROSERVE_UE_5_5.exe.

Test de l'API depuis ton poste

Une fois uploadé, vérifier :

curl https://www.tondomaine.com/PS_Launcher/api/health
curl https://www.tondomaine.com/PS_Launcher/api/manifest
curl https://www.tondomaine.com/PS_Launcher/api/releasenotes/1.4.6

À mettre à jour avant prod

  • api/config.php : tous les replace_me / replace_with_*. Ce fichier ne doit JAMAIS être commit dans un repo public.
  • Dans manifest/versions.json, remplace www.exemple-asterion.com par ton vrai domaine.