Files
OpenRA/OpenRA.Game/Support/Program.cs
2010-07-18 16:48:21 +12:00

52 lines
1.1 KiB
C#

#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Windows.Forms;
namespace OpenRA
{
static class Program
{
[STAThread]
static void Main( string[] args )
{
// brutal hack
Application.CurrentCulture = CultureInfo.InvariantCulture;
if (Debugger.IsAttached || args.Contains("--just-die"))
{
Run(args);
return;
}
try
{
Run( args );
}
catch( Exception e )
{
Log.AddChannel("exception", "openra.exception.txt", true, false);
Log.Write("exception", "{0}", e.ToString());
Log.Upload(Game.GetGameId());
throw;
}
}
static void Run( string[] args )
{
Game.Initialize( new Settings( args ) );
Game.Run();
}
}
}