Update the animated GIF window test

This commit is contained in:
Paul Betts
2017-06-19 16:07:09 -07:00
parent 93039bca18
commit 6d775d515d

View File

@@ -44,19 +44,15 @@ namespace Squirrel.Update
// 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
}
}
@@ -64,6 +60,14 @@ namespace Squirrel.Update
{
var animatedGifWindowToken = new CancellationTokenSource();
// Uncomment to test Gifs
/*
var ps = new ProgressSource();
int i = 0; var t = new Timer(_ => ps.Raise(i += 10), null, 0, 1000);
AnimatedGifWindow.ShowWindow(TimeSpan.FromMilliseconds(0), animatedGifWindowToken.Token, ps);
Thread.Sleep(10 * 60 * 1000);
*/
using (Disposable.Create(() => animatedGifWindowToken.Cancel())) {
this.Log().Info("Starting Squirrel Updater: " + String.Join(" ", args));