From ce3979d131a5ed0cbb9d9768b3f4a75b4614c1ce Mon Sep 17 00:00:00 2001 From: "j.foucher" Date: Sun, 3 May 2026 09:55:41 +0200 Subject: [PATCH] =?UTF-8?q?v0.14.0=20=E2=80=94=20rename=20PSLauncher.exe?= =?UTF-8?q?=20=E2=86=92=20PS=5FLauncher.exe=20(with=20backward=20compat)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aligns the executable name with the repo / product naming. Backward- compatible: existing installs that have PSLauncher.exe on disk continue to work — the self-updater overwrites the file at the running .exe path without renaming, so the historical filename persists on those machines. Changes - AssemblyName : PSLauncher → PS_Launcher (both App and Updater csproj) - Inno Setup : MyAppExeName, MyUpdaterExeName, OutputBaseFilename all now use PS_Launcher prefix - LauncherSelfUpdater : looks for PS_Launcher.Updater.exe first, falls back to legacy PSLauncher.Updater.exe so old installs keep updating - Build scripts (build-launcher / build-updater / build-installer / build-all) : taskkill both legacy AND new names; output paths printed with new names - .gitignore : added PS_Launcher.exe / PS_Launcher.Updater.exe / PS_Launcher-*.exe patterns alongside the legacy ones; also ignored the WebView2 user-data folder and Office ~$ lock files - Server admin/launcher.php : URL pattern now generates PS_Launcher-{ver}.exe ; SignManifest's existing tolerant glob *{ver}*.exe still matches both names - Versions bumped to 0.14.0 (App + Updater + installer .iss) Migration story for clients - Brand-new install via PS_Launcher-Setup-0.14.0.exe → PS_Launcher.exe on disk - Existing install (PSLauncher.exe) auto-updates to v0.14 → file stays named PSLauncher.exe but contains v0.14 code; self-updater fallback ensures future updates keep working Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 13 +++++++ build-all.bat | 10 +++--- build-installer.bat | 7 ++-- build-launcher.bat | 20 ++++++----- build-updater.bat | 18 +++++----- installer/PSLauncher.iss | 20 ++++++----- server/admin/launcher.php | 6 ++-- src/PSLauncher.App/PSLauncher.App.csproj | 15 +++++--- .../Updates/LauncherSelfUpdater.cs | 34 +++++++++++++------ .../PSLauncher.Updater.csproj | 7 ++-- 10 files changed, 100 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index bd1b747..1d5ce8f 100644 --- a/.gitignore +++ b/.gitignore @@ -53,10 +53,23 @@ 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 +/PS_Launcher*.bak # Sortie de l'installeur Inno Setup /installer/output/ + +# 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 8f988fc..27259cf 100644 --- a/build-all.bat +++ b/build-all.bat @@ -6,8 +6,10 @@ 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 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. echo ==^> dotnet publish PSLauncher.App (Release single-file) echo. @@ -22,8 +24,8 @@ if %ERRORLEVEL% NEQ 0 goto :fail echo. echo [OK] Les deux exes sont disponibles a la racine du repo : -echo %REPO%PSLauncher.exe -echo %REPO%PSLauncher.Updater.exe +echo %REPO%PS_Launcher.exe +echo %REPO%PS_Launcher.Updater.exe echo. pause endlocal & exit /b 0 diff --git a/build-installer.bat b/build-installer.bat index 84cd3bc..a79bc36 100644 --- a/build-installer.bat +++ b/build-installer.bat @@ -13,8 +13,11 @@ setlocal set "SCRIPT_DIR=%~dp0" REM Termine les eventuelles instances en cours qui verrouilleraient les .exe -taskkill /F /IM PSLauncher.exe /T >nul 2>&1 -taskkill /F /IM PSLauncher.Updater.exe /T >nul 2>&1 +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 powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%installer\build-installer.ps1" %* set "EXITCODE=%ERRORLEVEL%" diff --git a/build-launcher.bat b/build-launcher.bat index fb0c88d..e673b70 100644 --- a/build-launcher.bat +++ b/build-launcher.bat @@ -1,13 +1,17 @@ @echo off -REM Build du launcher principal (PSLauncher.exe). -REM Sortie : C:\ASTERION\GIT\PS_Launcher\PSLauncher.exe (~78 Mo single-file self-contained) +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 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 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 +taskkill /F /IM PS_Launcher.exe /T >nul 2>&1 +taskkill /F /IM PS_Launcher.Updater.exe /T >nul 2>&1 echo. echo ==^> dotnet publish PSLauncher.App (Release single-file) echo. @@ -19,9 +23,9 @@ echo. if %EXITCODE% NEQ 0 ( echo [ECHEC] Build du launcher echoue avec le code %EXITCODE%. ) else ( - echo [OK] PSLauncher.exe disponible a la racine du repo : - echo %REPO%PSLauncher.exe + echo [OK] PS_Launcher.exe disponible a la racine du repo : + echo %REPO%PS_Launcher.exe ) echo. pause -endlocal & exit /b %EXITCODE% +endlocal ^& exit /b %EXITCODE% diff --git a/build-updater.bat b/build-updater.bat index 3b78336..bbd05b1 100644 --- a/build-updater.bat +++ b/build-updater.bat @@ -1,14 +1,16 @@ @echo off -REM Build de l'updater (PSLauncher.Updater.exe). -REM Sortie : C:\ASTERION\GIT\PS_Launcher\PSLauncher.Updater.exe (~34 Mo single-file) -REM L'updater accompagne PSLauncher.exe — il doit etre dans le meme dossier. +REM Build de l'updater (PS_Launcher.Updater.exe — renomme depuis PSLauncher.Updater.exe en v0.14.0). +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. 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 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. echo ==^> dotnet publish PSLauncher.Updater (Release single-file) echo. @@ -20,9 +22,9 @@ echo. if %EXITCODE% NEQ 0 ( echo [ECHEC] Build de l'updater echoue avec le code %EXITCODE%. ) else ( - echo [OK] PSLauncher.Updater.exe disponible a la racine du repo : - echo %REPO%PSLauncher.Updater.exe + echo [OK] PS_Launcher.Updater.exe disponible a la racine du repo : + echo %REPO%PS_Launcher.Updater.exe ) echo. pause -endlocal & exit /b %EXITCODE% +endlocal ^& exit /b %EXITCODE% diff --git a/installer/PSLauncher.iss b/installer/PSLauncher.iss index f07da43..94a4a17 100644 --- a/installer/PSLauncher.iss +++ b/installer/PSLauncher.iss @@ -4,18 +4,22 @@ ; "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" PSLauncher.iss ; ; Avant compile : -; 1. Faire `dotnet publish src/PSLauncher.App -c Release` (génère PSLauncher.exe ~77 Mo) -; 2. Faire `dotnet publish src/PSLauncher.Updater -c Release` (génère PSLauncher.Updater.exe ~10 Mo) +; 1. Faire `dotnet publish src/PSLauncher.App -c Release` (génère PS_Launcher.exe ~77 Mo) +; 2. Faire `dotnet publish src/PSLauncher.Updater -c Release` (génère PS_Launcher.Updater.exe ~10 Mo) ; ; Le script picore directement les binaires dans bin/Release/.../publish/. #define MyAppName "PROSERVE Launcher" -#define MyAppShortName "PSLauncher" -#define MyAppVersion "0.13.0" +#define MyAppShortName "PS_Launcher" +#define MyAppVersion "0.14.0" #define MyAppPublisher "ASTERION VR" #define MyAppURL "https://asterionvr.com" -#define MyAppExeName "PSLauncher.exe" -#define MyUpdaterExeName "PSLauncher.Updater.exe" +; 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" [Setup] ; AppId est UNIQUE pour PSLauncher — ne pas changer entre deux versions sinon @@ -29,12 +33,12 @@ AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} ; Installation user-mode (pas d'admin requis) : le launcher pourra se mettre à jour -; tout seul via PSLauncher.Updater.exe sans déclencher de UAC. +; tout seul via PS_Launcher.Updater.exe sans déclencher de UAC. DefaultDirName={localappdata}\Programs\{#MyAppPublisher}\{#MyAppShortName} DefaultGroupName={#MyAppName} DisableProgramGroupPage=yes OutputDir=output -OutputBaseFilename=PSLauncher-Setup-{#MyAppVersion} +OutputBaseFilename=PS_Launcher-Setup-{#MyAppVersion} SetupIconFile=..\src\PSLauncher.App\Resources\favicon.ico Compression=lzma2/ultra SolidCompression=yes diff --git a/server/admin/launcher.php b/server/admin/launcher.php index 8c9a234..35c6c92 100644 --- a/server/admin/launcher.php +++ b/server/admin/launcher.php @@ -53,14 +53,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { 'version' => $lver, 'minRequired' => $lmin !== '' ? $lmin : '0.5.0', 'download' => [ - 'url' => "{$base}/builds/launcher/PSLauncher-{$lver}.exe", + 'url' => "{$base}/builds/launcher/PS_Launcher-{$lver}.exe", 'sizeBytes' => 0, 'sha256' => 'REPLACE_AFTER_BUILD', ], 'releaseNotesUrl' => null, ]; saveManifest($manifestPath, $manifest); - $message = "Section launcher mise à jour (v{$lver}). Upload PSLauncher-{$lver}.exe dans builds/launcher/ puis clique « Hasher le launcher + signer »."; + $message = "Section launcher mise à jour (v{$lver}). Upload PS_Launcher-{$lver}.exe dans builds/launcher/ puis clique « Hasher le launcher + signer »."; } elseif ($action === 'remove_launcher') { unset($manifest['launcher']); @@ -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 : PSLauncher.exe → PSLauncher-X.Y.Z.exe.
  5. +
  6. 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).
  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 9528405..1e917f0 100644 --- a/src/PSLauncher.App/PSLauncher.App.csproj +++ b/src/PSLauncher.App/PSLauncher.App.csproj @@ -10,14 +10,19 @@ latest enable Resources\favicon.ico - PSLauncher + + PS_Launcher ASTERION VR PROSERVE Launcher © 2026 ASTERION VR — All rights reserved PSLauncher.App - 0.13.0 - 0.13.0.0 - 0.13.0.0 + 0.14.0 + 0.14.0.0 + 0.14.0.0 true @@ -60,7 +65,7 @@ ? progress, CancellationToken ct) { - // 1. Localise le PSLauncher.exe en cours d'exécution + // 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. var processModule = SysProcess.GetCurrentProcess().MainModule ?? throw new InvalidOperationException("Cannot locate current process module"); var targetExe = processModule.FileName!; @@ -64,20 +68,30 @@ 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 PSLauncher.Updater.exe (à côté du target) - var updaterPath = Path.Combine(installDir, "PSLauncher.Updater.exe"); + // 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. + var updaterPath = Path.Combine(installDir, "PS_Launcher.Updater.exe"); if (!File.Exists(updaterPath)) { - // Fallback : tente de copier l'updater depuis le dossier d'install vers un staging - // si jamais il a été supprimé. Pour la v1, on demande à l'utilisateur de réinstaller. - throw new FileNotFoundException( - "PSLauncher.Updater.exe est manquant à côté de PSLauncher.exe. " + - "Réinstalle le launcher depuis l'installeur officiel.", - 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); + } } // 4. Copie le .new dans le staging dir si downloaded est ailleurs - var newPath = Path.Combine(stagingDir, $"PSLauncher-{launcher.Version}.exe"); + var newPath = Path.Combine(stagingDir, $"PS_Launcher-{launcher.Version}.exe"); if (!string.Equals(downloadedPath, newPath, StringComparison.OrdinalIgnoreCase)) { if (File.Exists(newPath)) File.Delete(newPath); diff --git a/src/PSLauncher.Updater/PSLauncher.Updater.csproj b/src/PSLauncher.Updater/PSLauncher.Updater.csproj index 3192f7f..fc66e5a 100644 --- a/src/PSLauncher.Updater/PSLauncher.Updater.csproj +++ b/src/PSLauncher.Updater/PSLauncher.Updater.csproj @@ -6,9 +6,12 @@ enable enable latest - PSLauncher.Updater + + PS_Launcher.Updater PSLauncher.Updater - 0.13.0 + 0.14.0 ..\PSLauncher.App\Resources\favicon.ico ASTERION VR © 2026 ASTERION VR — All rights reserved