예제 #1
0
        public static void Main()
        {
            Console.Title = "Steam Database";

            var version = Assembly.GetExecutingAssembly().GetName().Version;
            var date    = new DateTime(2000, 01, 01).AddDays(version.Build).AddSeconds(version.Revision * 2).ToUniversalTime().ToString();

            Log.WriteInfo("Bootstrapper", "Steam Database backend application. Built on {0} UTC", date);
            Log.WriteInfo("Bootstrapper", "Copyright (c) 2013-2015, SteamDB. See LICENSE file for more information.");

            try
            {
                Settings.Load();
            }
            catch (Exception e)
            {
                Log.WriteError("Settings", "{0}", e.Message);

                return;
            }

            ErrorReporter.Init(Settings.Current.BugsnagApiKey);

            if (Settings.Current.SteamKitDebug)
            {
                DebugLog.AddListener(new Log.SteamKitLogger());
                DebugLog.Enabled = true;
            }

            AppDomain.CurrentDomain.UnhandledException += OnSillyCrashHandler;

            Console.CancelKeyPress += OnCancelKey;

            Application.Init();
        }
        public static void Main()
        {
            Console.Title = "Steam Database";

            var version = FileVersionInfo.GetVersionInfo(typeof(Steam).Assembly.Location);

            ProductVersion = version.ProductVersion;

            Log.WriteInfo("Bootstrapper", "Steam Database, built from commit: {0}", ProductVersion);
            Log.WriteInfo("Bootstrapper", "Copyright (c) 2013-2015, SteamDB. See LICENSE file for more information.");

            try
            {
                // Just create deepest folder we will use in the app
                string filesDir = Path.Combine(Application.Path, "files", ".support", "chunks");
                Directory.CreateDirectory(filesDir);

                Settings.Load();
                LocalConfig.Load();
            }
            catch (Exception e)
            {
                Log.WriteError("Settings", "{0}", e.Message);

                return;
            }

            ErrorReporter.Init(Settings.Current.BugsnagApiKey);

            if (Settings.Current.SteamKitDebug)
            {
                DebugLog.AddListener(new Log.SteamKitLogger());
                DebugLog.Enabled = true;
            }

            AppDomain.CurrentDomain.UnhandledException += OnSillyCrashHandler;

            Console.CancelKeyPress += OnCancelKey;

            Application.Init();
        }