v0.14.0 — rename PSLauncher.exe → PS_Launcher.exe (with backward compat)

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) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 09:55:41 +02:00
parent 64fbda0191
commit ce3979d131
10 changed files with 100 additions and 50 deletions

View File

@@ -10,14 +10,19 @@
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>Resources\favicon.ico</ApplicationIcon>
<AssemblyName>PSLauncher</AssemblyName>
<!-- AssemblyName définit le nom du .exe en sortie. Renommé en v0.14.0 :
PSLauncher.exe → PS_Launcher.exe pour s'aligner sur le nom du repo
et du produit. Les anciens installs (qui ont PSLauncher.exe) gardent
leur nom de fichier après auto-update : le self-updater écrase le
fichier au path courant sans le renommer. Le code reste rétro-compatible. -->
<AssemblyName>PS_Launcher</AssemblyName>
<Company>ASTERION VR</Company>
<Product>PROSERVE Launcher</Product>
<Copyright>© 2026 ASTERION VR — All rights reserved</Copyright>
<RootNamespace>PSLauncher.App</RootNamespace>
<Version>0.13.0</Version>
<AssemblyVersion>0.13.0.0</AssemblyVersion>
<FileVersion>0.13.0.0</FileVersion>
<Version>0.14.0</Version>
<AssemblyVersion>0.14.0.0</AssemblyVersion>
<FileVersion>0.14.0.0</FileVersion>
<!-- Single-file self-contained publish profile (used by `dotnet publish`) -->
<PublishSingleFile>true</PublishSingleFile>
@@ -60,7 +65,7 @@
</ItemGroup>
<!-- Après chaque `dotnet publish -c Release`, copie le single-file exe à la racine du repo
(C:\ASTERION\GIT\PS_Launcher\PSLauncher.exe). ContinueOnError pour ne pas casser le
(C:\ASTERION\GIT\PS_Launcher\PS_Launcher.exe). ContinueOnError pour ne pas casser le
publish si une instance du launcher tourne et verrouille la cible — l'opérateur peut
killer et réessayer, ou simplement utiliser le binaire depuis bin\Release\... -->
<Target Name="CopyPublishedToRepoRoot" AfterTargets="Publish"

View File

@@ -44,7 +44,11 @@ public sealed class LauncherSelfUpdater : ILauncherSelfUpdater
IProgress<DownloadProgress>? 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);

View File

@@ -6,9 +6,12 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<AssemblyName>PSLauncher.Updater</AssemblyName>
<!-- Renommé v0.14.0 : PSLauncher.Updater.exe → PS_Launcher.Updater.exe.
La compat backward est gérée côté LauncherSelfUpdater qui essaie d'abord
le nouveau nom puis fallback sur l'ancien. -->
<AssemblyName>PS_Launcher.Updater</AssemblyName>
<RootNamespace>PSLauncher.Updater</RootNamespace>
<Version>0.13.0</Version>
<Version>0.14.0</Version>
<ApplicationIcon>..\PSLauncher.App\Resources\favicon.ico</ApplicationIcon>
<Company>ASTERION VR</Company>
<Copyright>© 2026 ASTERION VR — All rights reserved</Copyright>