From ff387cfc59d6ef0872e92cbaefb97bc1c2aee768 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Mon, 9 Sep 2024 12:12:51 +0100 Subject: [PATCH] Fix a few remaining things --- Bloxstrap/Installer.cs | 12 ++++++++---- Bloxstrap/LaunchHandler.cs | 8 +++++++- .../UI/Elements/Dialogs/ConnectivityDialog.xaml | 2 +- Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Bloxstrap/Installer.cs b/Bloxstrap/Installer.cs index 2aff0527..e27fe5b8 100644 --- a/Bloxstrap/Installer.cs +++ b/Bloxstrap/Installer.cs @@ -162,11 +162,12 @@ public static void DoUninstall(bool keepData) const string LOG_IDENT = "Installer::DoUninstall"; var processes = new List(); - processes.AddRange(Process.GetProcessesByName(App.RobloxPlayerAppName)); + + if (!String.IsNullOrEmpty(App.State.Prop.Player.VersionGuid)) + processes.AddRange(Process.GetProcessesByName(App.RobloxPlayerAppName)); -#if STUDIO_FEATURES - processes.AddRange(Process.GetProcessesByName(App.RobloxStudioAppName)); -#endif + if (!String.IsNullOrEmpty(App.State.Prop.Studio.VersionGuid)) + processes.AddRange(Process.GetProcessesByName(App.RobloxStudioAppName)); // prompt to shutdown roblox if its currently running if (processes.Any()) @@ -179,7 +180,10 @@ public static void DoUninstall(bool keepData) ); if (result != MessageBoxResult.OK) + { App.Terminate(ErrorCode.ERROR_CANCELLED); + return; + } try { diff --git a/Bloxstrap/LaunchHandler.cs b/Bloxstrap/LaunchHandler.cs index 502936ac..28b4e2be 100644 --- a/Bloxstrap/LaunchHandler.cs +++ b/Bloxstrap/LaunchHandler.cs @@ -1,6 +1,5 @@ using System.Windows; -using Microsoft.Win32; using Windows.Win32; using Windows.Win32.Foundation; @@ -43,6 +42,8 @@ public static void ProcessLaunchArgs() LaunchRoblox(); else if (!App.LaunchSettings.QuietFlag.Active) LaunchMenu(); + else + App.Terminate(); } public static void LaunchInstaller() @@ -52,6 +53,7 @@ public static void LaunchInstaller() if (!interlock.IsAcquired) { Frontend.ShowMessageBox(Strings.Dialog_AlreadyRunning_Installer, MessageBoxImage.Stop); + App.Terminate(); return; } @@ -96,6 +98,7 @@ public static void LaunchUninstaller() if (!interlock.IsAcquired) { Frontend.ShowMessageBox(Strings.Dialog_AlreadyRunning_Uninstaller, MessageBoxImage.Stop); + App.Terminate(); return; } @@ -116,7 +119,10 @@ public static void LaunchUninstaller() } if (!confirmed) + { + App.Terminate(); return; + } Installer.DoUninstall(keepData); diff --git a/Bloxstrap/UI/Elements/Dialogs/ConnectivityDialog.xaml b/Bloxstrap/UI/Elements/Dialogs/ConnectivityDialog.xaml index ca2f96b9..03817bb1 100644 --- a/Bloxstrap/UI/Elements/Dialogs/ConnectivityDialog.xaml +++ b/Bloxstrap/UI/Elements/Dialogs/ConnectivityDialog.xaml @@ -32,7 +32,7 @@ - + diff --git a/Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml b/Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml index 1fa1c010..59ee1bc8 100644 --- a/Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml +++ b/Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml @@ -33,7 +33,7 @@ - +