fix: safer install process in program init
This commit is contained in:
parent
1910fb13b8
commit
e35f4913e8
|
|
@ -23,19 +23,21 @@ namespace Kiseki.Launcher.Windows
|
||||||
|
|
||||||
if (!File.Exists(Directories.Application))
|
if (!File.Exists(Directories.Application))
|
||||||
{
|
{
|
||||||
// The launcher is not installed, so let's install it.
|
// The launcher is not installed, so let's run the install process - this will also exit the application
|
||||||
Launcher.Install();
|
Launcher.Install();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (args.Length == 0)
|
|
||||||
{
|
{
|
||||||
// Nothing for us to do :P
|
if (args.Length == 0)
|
||||||
Process.Start(Web.Url("/games"));
|
{
|
||||||
Environment.Exit(0);
|
// Nothing for us to do :P
|
||||||
}
|
Process.Start(Web.Url("/games"));
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
Application.Run(new MainWindow(args[0]));
|
Application.Run(new MainWindow(args[0]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue