mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Update the animated GIF window test
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user