diff --git a/launcher/App.axaml.cs b/launcher/App.axaml.cs index 8372e5e..459506b 100644 --- a/launcher/App.axaml.cs +++ b/launcher/App.axaml.cs @@ -1,6 +1,7 @@ using Avalonia; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; +using ModpackLauncher.Services; namespace ModpackLauncher; @@ -13,6 +14,11 @@ public partial class App : Application public override void OnFrameworkInitializationCompleted() { + // Clean up any .old launcher left behind by a self-update on a prior run. + // Best-effort: if the previous process hasn't fully released the handle yet + // we just retry on the next startup. + SelfUpdateService.CleanupAfterUpdate(); + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { desktop.MainWindow = new MainWindow(); diff --git a/launcher/MainWindow.axaml b/launcher/MainWindow.axaml index c5dbf52..edd63e6 100644 --- a/launcher/MainWindow.axaml +++ b/launcher/MainWindow.axaml @@ -259,7 +259,7 @@ Foreground="#E8DFC8" FontSize="13" TextWrapping="Wrap" Text="A newer launcher is available." />