Unify upgrade process and add update progress bar
This commit is contained in:
parent
ded58f687d
commit
d787843fd2
20 changed files with 264 additions and 247 deletions
|
|
@ -51,9 +51,6 @@ namespace LibationWinForms
|
|||
|
||||
MessageBoxLib.VerboseLoggingWarning_ShowIfTrue();
|
||||
|
||||
#if !DEBUG
|
||||
checkForUpdate();
|
||||
#endif
|
||||
// logging is init'd here
|
||||
AppScaffolding.LibationScaffolding.RunPostMigrationScaffolding(config);
|
||||
}
|
||||
|
|
@ -165,31 +162,6 @@ namespace LibationWinForms
|
|||
// - long running. won't get a chance to finish in cli. don't move to app scaffolding
|
||||
}
|
||||
|
||||
private static void checkForUpdate()
|
||||
{
|
||||
AppScaffolding.UpgradeProperties upgradeProperties;
|
||||
|
||||
try
|
||||
{
|
||||
upgradeProperties = AppScaffolding.LibationScaffolding.GetLatestRelease();
|
||||
if (upgradeProperties is null)
|
||||
return;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBoxLib.ShowAdminAlert(null, "Error checking for update", "Error checking for update", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (upgradeProperties.ZipUrl is null)
|
||||
{
|
||||
MessageBox.Show(upgradeProperties.HtmlUrl, "New version available");
|
||||
return;
|
||||
}
|
||||
|
||||
Updater.Run(upgradeProperties);
|
||||
}
|
||||
|
||||
private static void postLoggingGlobalExceptionHandling()
|
||||
{
|
||||
// this line is all that's needed for strict handling
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue