2019-10-03 04:35:29 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using Wabbajack.Common;
|
|
|
|
|
using Wabbajack.Updater;
|
2019-07-22 22:17:46 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2019-09-14 04:35:42 +00:00
|
|
|
|
/// Interaction logic for App.xaml
|
2019-07-22 22:17:46 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class App : Application
|
|
|
|
|
{
|
2019-10-03 04:35:29 +00:00
|
|
|
|
public App()
|
|
|
|
|
{
|
2019-10-10 05:04:28 +00:00
|
|
|
|
/*
|
2019-10-06 21:58:36 +00:00
|
|
|
|
Utils.Log($"Wabbajack Build - {ThisAssembly.Git.Sha}");
|
|
|
|
|
SetupHandlers();
|
|
|
|
|
|
2019-10-03 04:35:29 +00:00
|
|
|
|
var args = Environment.GetCommandLineArgs();
|
|
|
|
|
if (args.Length > 1)
|
|
|
|
|
{
|
2019-10-07 17:33:34 +00:00
|
|
|
|
Utils.SetLoggerFn(f => { });
|
|
|
|
|
WorkQueue.Init((a, b, c) => { }, (a, b) => { });
|
2019-10-03 04:35:29 +00:00
|
|
|
|
var updater = new CheckForUpdates(args[1]);
|
|
|
|
|
if (updater.FindOutdatedMods())
|
|
|
|
|
{
|
|
|
|
|
Environment.Exit(0);
|
|
|
|
|
}
|
|
|
|
|
Environment.Exit(1);
|
2019-10-10 05:04:28 +00:00
|
|
|
|
}*/
|
2019-10-03 04:35:29 +00:00
|
|
|
|
|
|
|
|
|
}
|
2019-10-06 21:58:36 +00:00
|
|
|
|
|
|
|
|
|
private void SetupHandlers()
|
|
|
|
|
{
|
|
|
|
|
AppDomain.CurrentDomain.UnhandledException += AppHandler;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AppHandler(object sender, UnhandledExceptionEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Utils.Log("Uncaught error:");
|
|
|
|
|
Utils.Log(((Exception)e.ExceptionObject).ExceptionToString());
|
|
|
|
|
}
|
2019-07-22 22:17:46 +00:00
|
|
|
|
}
|
2019-09-14 04:35:42 +00:00
|
|
|
|
}
|