Introduce new OpenRA.exe entrypoint and change OpenRA.Game to a library.

This commit is contained in:
Paul Chote
2020-11-22 11:52:00 +00:00
committed by teinarss
parent 20fe59e844
commit 07a10069db
17 changed files with 130 additions and 63 deletions

View File

@@ -21,26 +21,4 @@ namespace OpenRA
Success = 0,
Running = int.MaxValue
}
static class Program
{
[STAThread]
static int Main(string[] args)
{
if (Debugger.IsAttached || args.Contains("--just-die"))
return (int)Game.InitializeAndRun(args);
AppDomain.CurrentDomain.UnhandledException += (_, e) => ExceptionHandler.HandleFatalError((Exception)e.ExceptionObject);
try
{
return (int)Game.InitializeAndRun(args);
}
catch (Exception e)
{
ExceptionHandler.HandleFatalError(e);
return (int)RunStatus.Error;
}
}
}
}