diff --git a/Bloxstrap/App.xaml.cs b/Bloxstrap/App.xaml.cs index bc333f0e..e8a91e2e 100644 --- a/Bloxstrap/App.xaml.cs +++ b/Bloxstrap/App.xaml.cs @@ -198,6 +198,26 @@ protected override void OnStartup(StartupEventArgs e) } } + if (fixInstallLocation && installLocation is not null) + { + var installer = new Installer + { + InstallLocation = installLocation, + IsImplicitInstall = true + }; + + if (installer.CheckInstallLocation()) + { + Logger.WriteLine(LOG_IDENT, $"Changing install location to '{installLocation}'"); + installer.DoInstall(); + } + else + { + // force reinstall + installLocation = null; + } + } + if (installLocation is null) { Logger.Initialize(true); @@ -205,21 +225,6 @@ protected override void OnStartup(StartupEventArgs e) } else { - if (fixInstallLocation) - { - var installer = new Installer - { - InstallLocation = installLocation, - IsImplicitInstall = true - }; - - if (installer.CheckInstallLocation()) - { - Logger.WriteLine(LOG_IDENT, $"Changing install location to '{installLocation}'"); - installer.DoInstall(); - } - } - Paths.Initialize(installLocation); // ensure executable is in the install directory @@ -246,10 +251,8 @@ protected override void OnStartup(StartupEventArgs e) Locale.Set(Settings.Prop.Locale); -#if !DEBUG if (!LaunchSettings.BypassUpdateCheck) Installer.HandleUpgrade(); -#endif LaunchHandler.ProcessLaunchArgs(); } diff --git a/Bloxstrap/LaunchSettings.cs b/Bloxstrap/LaunchSettings.cs index 25a24fad..05ba45d9 100644 --- a/Bloxstrap/LaunchSettings.cs +++ b/Bloxstrap/LaunchSettings.cs @@ -28,7 +28,11 @@ public class LaunchSettings public LaunchFlag StudioFlag { get; } = new("studio"); +#if DEBUG + public bool BypassUpdateCheck => true; +#else public bool BypassUpdateCheck => UninstallFlag.Active || WatcherFlag.Active; +#endif public LaunchMode RobloxLaunchMode { get; set; } = LaunchMode.None;