int main(string[] args)
{
// NB: Trying to delete the app directory while we have Setup.log
// open will actually crash the uninstaller
bool isUninstalling = args.Any(x => x.Contains("uninstall"));
// Uncomment to test Gifs
//AnimatedGifWindow.ShowWindow(TimeSpan.FromMilliseconds(0), animatedGifWindowToken.Token);
//Thread.Sleep(10 * 60 * 1000);
using (var logger = new SetupLogLogger(isUninstalling)
{
Level = LogLevel.Info
})
{
Locator.CurrentMutable.Register(() => logger, typeof(Splat.ILogger));
try
{
return(executeCommandLine(args));
}
catch (Exception ex)
{
logger.Write("Unhandled exception: " + ex, LogLevel.Fatal);
throw;
}
// Ideally we would deregister the logger from the Locator before it was disposed - this is a hazard as it is at the moment
}
}