mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Fix bug with app still runnning in background
This commit is contained in:
parent
695384fffb
commit
19d3deecf4
@ -107,7 +107,7 @@ namespace Bloxstrap
|
|||||||
// preferences dialog was closed, and so base directory was never set
|
// preferences dialog was closed, and so base directory was never set
|
||||||
// (this doesnt account for the registry value not existing but thats basically never gonna happen)
|
// (this doesnt account for the registry value not existing but thats basically never gonna happen)
|
||||||
if (String.IsNullOrEmpty(BaseDirectory))
|
if (String.IsNullOrEmpty(BaseDirectory))
|
||||||
return;
|
Environment.Exit(Bootstrapper.ERROR_INSTALL_USEREXIT);
|
||||||
|
|
||||||
Directories.Initialize(BaseDirectory);
|
Directories.Initialize(BaseDirectory);
|
||||||
|
|
||||||
@ -128,18 +128,17 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
string commandLine = "";
|
string commandLine = "";
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
new Preferences().ShowDialog();
|
|
||||||
#else
|
|
||||||
if (LaunchArgs.Length > 0)
|
if (LaunchArgs.Length > 0)
|
||||||
{
|
{
|
||||||
if (LaunchArgs[0] == "-preferences")
|
if (LaunchArgs[0] == "-preferences")
|
||||||
{
|
{
|
||||||
|
#if !DEBUG
|
||||||
if (Process.GetProcessesByName(ProjectName).Length > 1)
|
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);
|
ShowMessageBox($"{ProjectName} is currently running. Please close any currently open Bloxstrap or Roblox window before opening the menu.", MessageBoxImage.Error);
|
||||||
return;
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
new Preferences().ShowDialog();
|
new Preferences().ShowDialog();
|
||||||
}
|
}
|
||||||
@ -160,7 +159,6 @@ namespace Bloxstrap
|
|||||||
{
|
{
|
||||||
commandLine = "--app";
|
commandLine = "--app";
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(commandLine))
|
if (!String.IsNullOrEmpty(commandLine))
|
||||||
{
|
{
|
||||||
@ -168,7 +166,7 @@ namespace Bloxstrap
|
|||||||
Settings.BootstrapperStyle.Show(new Bootstrapper(commandLine));
|
Settings.BootstrapperStyle.Show(new Bootstrapper(commandLine));
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsManager.Save();
|
Terminate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"Bloxstrap": {
|
"Bloxstrap": {
|
||||||
"commandName": "Project"
|
"commandName": "Project"
|
||||||
|
},
|
||||||
|
"Bloxstrap (Menu)": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"commandLineArgs": "-preferences"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user