install: rework ModpackInstaller (incomplete)

This commit is contained in:
2024-06-17 18:30:57 +02:00
parent a4d5fff876
commit 9c43055580
6 changed files with 95 additions and 53 deletions

View File

@@ -97,7 +97,7 @@ Public Class Form1
SetStatus(LangRes.StatusText_CheckingForUpdates, MySymbols.icons8_update_16px)
Try
lastUpdateCheckResult = Await updater.CheckForUpdates(Not AppConfig.Instance.AllowRemoveLocalFiles)
lastUpdateCheckResult = Await updater.Check(Not AppConfig.Instance.AllowRemoveLocalFiles)
Catch ex As Exception
SetStatus(LangRes.StatusText_ErrorWhileUpdateCheckOrUpdate, MySymbols.icons8_delete_16px)
Finally
@@ -112,7 +112,7 @@ Public Class Form1
currentUpdating = True
Try
If Await updater.InstallUpdates(lastUpdateCheckResult) Then
If Await updater.Install(lastUpdateCheckResult) Then
lastUpdateCheckResult = Nothing 'Reset last update check, a new one would be needed now.
SetStatus(LangRes.StatusTest_EverythingOk, MySymbols.icons8_checkmark_16px)
Else
@@ -132,7 +132,7 @@ Public Class Form1
End Function
Private Sub Update_InstallProgessUpdated(result As UpdateCheckResult, processedSyncs As Integer)
Dim actionCount = result.UpdateActions.Count
Dim actionCount = result.Actions.Count
SetStatus(Math.Round(processedSyncs / actionCount * 100, 1) & "%", MySymbols.icons8_software_installer_16px)
End Sub