diff --git a/Bloxstrap/App.xaml.cs b/Bloxstrap/App.xaml.cs index 1c6426a..0c8aced 100644 --- a/Bloxstrap/App.xaml.cs +++ b/Bloxstrap/App.xaml.cs @@ -107,7 +107,7 @@ namespace Bloxstrap // preferences dialog was closed, and so base directory was never set if (!IsSetupComplete) - return; + Environment.Exit(Bootstrapper.ERROR_INSTALL_USEREXIT); Directories.Initialize(BaseDirectory); @@ -128,18 +128,17 @@ namespace Bloxstrap string commandLine = ""; -#if false//DEBUG - new MainWindow().ShowDialog(); -#else if (LaunchArgs.Length > 0) { if (LaunchArgs[0] == "-preferences") { +#if !DEBUG if (Process.GetProcessesByName(ProjectName).Length > 1) { - ShowMessageBox($"{ProjectName} is already running. Please close any currently open Bloxstrap or Roblox window before opening the configuration menu.", MessageBoxImage.Error); - return; + ShowMessageBox($"{ProjectName} is currently running. Please close any currently open Bloxstrap or Roblox window before opening the menu.", MessageBoxImage.Error); + Environment.Exit(0); } +#endif //new Preferences().ShowDialog(); new MainWindow().ShowDialog(); @@ -161,7 +160,6 @@ namespace Bloxstrap { commandLine = "--app"; } -#endif if (!String.IsNullOrEmpty(commandLine)) { @@ -169,7 +167,7 @@ namespace Bloxstrap Settings.BootstrapperStyle.Show(new Bootstrapper(commandLine)); } - SettingsManager.Save(); + Terminate(); } } } diff --git a/Bloxstrap/Properties/launchSettings.json b/Bloxstrap/Properties/launchSettings.json index 662b7b5..baeb018 100644 --- a/Bloxstrap/Properties/launchSettings.json +++ b/Bloxstrap/Properties/launchSettings.json @@ -1,6 +1,9 @@ { "profiles": { "Bloxstrap": { + "commandName": "Project" + }, + "Bloxstrap (Menu)": { "commandName": "Project", "commandLineArgs": "-preferences" }