From c706d09e723e4ee5fc840962f9a57f7c81b50258 Mon Sep 17 00:00:00 2001 From: "j.foucher" Date: Sun, 3 May 2026 10:08:23 +0200 Subject: [PATCH] Drop legacy PSLauncher.exe backward compat (not in prod yet) Simplifies the rename done in ce3979d : PS_Launcher.exe is the only name. Removes the dual-path lookup in LauncherSelfUpdater, the duplicated taskkill blocks in the .bat scripts, the legacy patterns in .gitignore, and the explanatory comments about the migration. Cleaner code, single source of truth for the binary name. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 6 ---- build-all.bat | 2 -- build-installer.bat | 3 -- build-launcher.bat | 6 +--- build-updater.bat | 4 +-- installer/PSLauncher.iss | 4 --- server/admin/launcher.php | 2 +- src/PSLauncher.App/PSLauncher.App.csproj | 5 ---- .../Updates/LauncherSelfUpdater.cs | 28 ++++--------------- .../PSLauncher.Updater.csproj | 3 -- 10 files changed, 9 insertions(+), 54 deletions(-) diff --git a/.gitignore b/.gitignore index 1d5ce8f..239e522 100644 --- a/.gitignore +++ b/.gitignore @@ -53,11 +53,6 @@ server/builds/* .claude/ # Binaires copiés par le post-publish à la racine du repo -# (legacy : PSLauncher.exe — pre-v0.14 ; nouveau : PS_Launcher.exe — depuis v0.14) -/PSLauncher.exe -/PSLauncher.Updater.exe -/PSLauncher-*.exe -/PSLauncher*.bak /PS_Launcher.exe /PS_Launcher.Updater.exe /PS_Launcher-*.exe @@ -68,7 +63,6 @@ server/builds/* # WebView2 user data folder créé à côté de l'exe au runtime (cache, cookies, # sync data Edge Chromium). Peut faire plusieurs Mo. -/PSLauncher.exe.WebView2/ /PS_Launcher.exe.WebView2/ # Fichiers de lock Office (Word/PowerPoint) commençant par ~$ diff --git a/build-all.bat b/build-all.bat index 27259cf..92663f9 100644 --- a/build-all.bat +++ b/build-all.bat @@ -6,8 +6,6 @@ setlocal set "REPO=%~dp0" echo. echo ==^> Termine les eventuelles instances qui verrouilleraient les .exe -taskkill /F /IM PSLauncher.exe /T >nul 2>&1 -taskkill /F /IM PSLauncher.Updater.exe /T >nul 2>&1 taskkill /F /IM PS_Launcher.exe /T >nul 2>&1 taskkill /F /IM PS_Launcher.Updater.exe /T >nul 2>&1 echo. diff --git a/build-installer.bat b/build-installer.bat index a79bc36..20dcefa 100644 --- a/build-installer.bat +++ b/build-installer.bat @@ -13,9 +13,6 @@ setlocal set "SCRIPT_DIR=%~dp0" REM Termine les eventuelles instances en cours qui verrouilleraient les .exe -REM (les deux noms : legacy PSLauncher et nouveau PS_Launcher >= v0.14.0) -taskkill /F /IM PSLauncher.exe /T >nul 2>&1 -taskkill /F /IM PSLauncher.Updater.exe /T >nul 2>&1 taskkill /F /IM PS_Launcher.exe /T >nul 2>&1 taskkill /F /IM PS_Launcher.Updater.exe /T >nul 2>&1 diff --git a/build-launcher.bat b/build-launcher.bat index e673b70..21ca84c 100644 --- a/build-launcher.bat +++ b/build-launcher.bat @@ -1,15 +1,11 @@ @echo off REM Build du launcher principal (PS_Launcher.exe). REM Sortie : C:\ASTERION\GIT\PS_Launcher\PS_Launcher.exe (~78 Mo single-file self-contained) -REM Renommé v0.14.0 : avant c'etait PSLauncher.exe. On taskkill les deux noms -REM pour gerer les deux generations d'install (legacy + nouvelle). setlocal set "REPO=%~dp0" echo. -echo ==^> Termine les eventuelles instances de PSLauncher / PS_Launcher qui verrouilleraient les .exe -taskkill /F /IM PSLauncher.exe /T >nul 2>&1 -taskkill /F /IM PSLauncher.Updater.exe /T >nul 2>&1 +echo ==^> Termine les eventuelles instances de PS_Launcher qui verrouilleraient les .exe taskkill /F /IM PS_Launcher.exe /T >nul 2>&1 taskkill /F /IM PS_Launcher.Updater.exe /T >nul 2>&1 echo. diff --git a/build-updater.bat b/build-updater.bat index bbd05b1..465c9d1 100644 --- a/build-updater.bat +++ b/build-updater.bat @@ -1,5 +1,5 @@ @echo off -REM Build de l'updater (PS_Launcher.Updater.exe — renomme depuis PSLauncher.Updater.exe en v0.14.0). +REM Build de l'updater (PS_Launcher.Updater.exe). REM Sortie : C:\ASTERION\GIT\PS_Launcher\PS_Launcher.Updater.exe (~34 Mo single-file) REM L'updater accompagne PS_Launcher.exe — il doit etre dans le meme dossier. @@ -7,8 +7,6 @@ setlocal set "REPO=%~dp0" echo. echo ==^> Termine les eventuelles instances qui verrouilleraient les .exe -taskkill /F /IM PSLauncher.exe /T >nul 2>&1 -taskkill /F /IM PSLauncher.Updater.exe /T >nul 2>&1 taskkill /F /IM PS_Launcher.exe /T >nul 2>&1 taskkill /F /IM PS_Launcher.Updater.exe /T >nul 2>&1 echo. diff --git a/installer/PSLauncher.iss b/installer/PSLauncher.iss index 94a4a17..4c5747b 100644 --- a/installer/PSLauncher.iss +++ b/installer/PSLauncher.iss @@ -14,10 +14,6 @@ #define MyAppVersion "0.14.0" #define MyAppPublisher "ASTERION VR" #define MyAppURL "https://asterionvr.com" -; Renommé en v0.14.0 (PSLauncher.exe → PS_Launcher.exe). Les nouvelles installs -; auront ce nom ; les anciennes installs auto-updatées garderont PSLauncher.exe -; sur disque (le self-updater écrase le fichier sans le renommer). Code OK pour -; les deux variantes. #define MyAppExeName "PS_Launcher.exe" #define MyUpdaterExeName "PS_Launcher.Updater.exe" diff --git a/server/admin/launcher.php b/server/admin/launcher.php index 35c6c92..aaf2578 100644 --- a/server/admin/launcher.php +++ b/server/admin/launcher.php @@ -130,7 +130,7 @@ Layout::header('Launcher', 'launcher');
  1. Remplis le formulaire Définir / mettre à jour ci-dessous (ex : 0.6.0).
  2. Sur ton poste : dotnet publish src\PSLauncher.App -c Release et dotnet publish src\PSLauncher.Updater -c Release (les exes sont copiés à la racine du repo).
  3. -
  4. Renomme la copie : PS_Launcher.exe → PS_Launcher-X.Y.Z.exe (v0.14+ ; ancien nom PSLauncher.exe reste accepté côté serveur via le glob *{ver}*.exe).
  5. +
  6. Renomme la copie : PS_Launcher.exe → PS_Launcher-X.Y.Z.exe.
  7. Upload via SFTP dans www/PS_Launcher/builds/launcher/.
  8. Clique 🔁 Hasher le launcher + signer.
  9. Les launchers déjà déployés détecteront la nouvelle version au prochain « Vérifier les MAJ ».
  10. diff --git a/src/PSLauncher.App/PSLauncher.App.csproj b/src/PSLauncher.App/PSLauncher.App.csproj index 1e917f0..37e7ec1 100644 --- a/src/PSLauncher.App/PSLauncher.App.csproj +++ b/src/PSLauncher.App/PSLauncher.App.csproj @@ -10,11 +10,6 @@ latest enable Resources\favicon.ico - PS_Launcher ASTERION VR PROSERVE Launcher diff --git a/src/PSLauncher.Core/Updates/LauncherSelfUpdater.cs b/src/PSLauncher.Core/Updates/LauncherSelfUpdater.cs index 33416ed..91714a7 100644 --- a/src/PSLauncher.Core/Updates/LauncherSelfUpdater.cs +++ b/src/PSLauncher.Core/Updates/LauncherSelfUpdater.cs @@ -44,11 +44,7 @@ public sealed class LauncherSelfUpdater : ILauncherSelfUpdater IProgress? progress, CancellationToken ct) { - // 1. Localise le launcher en cours d'exécution. Le nom du fichier peut varier - // selon l'install : PS_Launcher.exe (nouvelles installs >= v0.14.0) OU - // PSLauncher.exe (anciennes installs auto-updatées qui ont gardé leur nom - // de fichier). On prend le nom courant tel quel — l'updater écrasera ce - // fichier sans le renommer, donc le nom historique perdure sur ces machines. + // 1. Localise le PS_Launcher.exe en cours d'exécution var processModule = SysProcess.GetCurrentProcess().MainModule ?? throw new InvalidOperationException("Cannot locate current process module"); var targetExe = processModule.FileName!; @@ -68,26 +64,14 @@ public sealed class LauncherSelfUpdater : ILauncherSelfUpdater var downloadedPath = await _downloadManager.DownloadAsync(downloadJob, progress, ct).ConfigureAwait(false); _logger.LogInformation("New launcher downloaded to {Path}", downloadedPath); - // 3. Localise l'updater à côté du target. Cherche d'abord le nouveau nom - // (PS_Launcher.Updater.exe, depuis v0.14.0) puis fallback sur l'ancien - // (PSLauncher.Updater.exe) pour compat backward avec les installs faites - // avec un installer < v0.14.0. + // 3. Localise PS_Launcher.Updater.exe (à côté du target) var updaterPath = Path.Combine(installDir, "PS_Launcher.Updater.exe"); if (!File.Exists(updaterPath)) { - var legacyUpdater = Path.Combine(installDir, "PSLauncher.Updater.exe"); - if (File.Exists(legacyUpdater)) - { - _logger.LogInformation("Using legacy updater path {Path} (pre-v0.14 install layout)", legacyUpdater); - updaterPath = legacyUpdater; - } - else - { - throw new FileNotFoundException( - "Updater (PS_Launcher.Updater.exe / PSLauncher.Updater.exe) introuvable à côté du launcher. " + - "Réinstalle le launcher depuis l'installeur officiel.", - updaterPath); - } + throw new FileNotFoundException( + "PS_Launcher.Updater.exe est manquant à côté de PS_Launcher.exe. " + + "Réinstalle le launcher depuis l'installeur officiel.", + updaterPath); } // 4. Copie le .new dans le staging dir si downloaded est ailleurs diff --git a/src/PSLauncher.Updater/PSLauncher.Updater.csproj b/src/PSLauncher.Updater/PSLauncher.Updater.csproj index fc66e5a..68a7547 100644 --- a/src/PSLauncher.Updater/PSLauncher.Updater.csproj +++ b/src/PSLauncher.Updater/PSLauncher.Updater.csproj @@ -6,9 +6,6 @@ enable enable latest - PS_Launcher.Updater PSLauncher.Updater 0.14.0