Merge branch 'main' into menu-redesign-v3

This commit is contained in:
pizzaboxer 2023-02-03 18:16:14 +00:00 committed by GitHub
commit 8b1001331a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -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();
}
}
}

View File

@ -1,6 +1,9 @@
{
"profiles": {
"Bloxstrap": {
"commandName": "Project"
},
"Bloxstrap (Menu)": {
"commandName": "Project",
"commandLineArgs": "-preferences"
}