Browse Source

Be like DownloadTemporaryFile.

Martijn Laan 10 months ago
parent
commit
23bac8824d

+ 5 - 1
Projects/Src/Compression.SevenZipDecoder.pas

@@ -18,7 +18,9 @@ function SevenZipDecode(const FileName, DestDir: String;
 implementation
 
 uses
-  Windows, SysUtils, PathFunc, Setup.LoggingFunc;
+  Windows, SysUtils, Forms,
+  PathFunc,
+  Setup.LoggingFunc, Setup.MainFunc;
 
 var
   ExpandedDestDir: String;
@@ -222,6 +224,8 @@ end;
 procedure _ReportProgress(const FileName: PChar; const Progress, ProgressMax: UInt64); cdecl;
 begin
   //Setup.LoggingFunc.Log(Format('%s: %d of %d', [FileName, Progress, ProgressMax]));
+  if DownloadTemporaryFileOrSevenZipDecodeProcessMessages then
+    Application.ProcessMessages;
 end;
 
 function SevenZipDecode(const FileName, DestDir: String;

+ 1 - 1
Projects/Src/Setup.Install.pas

@@ -3423,7 +3423,7 @@ begin
     end;
   end;
 
-  if not Abort and DownloadTemporaryFileProcessMessages then
+  if not Abort and DownloadTemporaryFileOrSevenZipDecodeProcessMessages then
     Application.ProcessMessages;
 
   if Abort then

+ 1 - 1
Projects/Src/Setup.MainFunc.pas

@@ -152,7 +152,7 @@ var
   DisableCodeConsts: Integer;
   SetupExitCode: Integer;
   CreatedIcon: Boolean;
-  RestartInitiatedByThisProcess, DownloadTemporaryFileProcessMessages: Boolean;
+  RestartInitiatedByThisProcess, DownloadTemporaryFileOrSevenZipDecodeProcessMessages: Boolean;
   TaskbarButtonHidden: Boolean;
   InstallModeRootKey: HKEY;
 

+ 2 - 2
Projects/Src/Setup.WizardForm.pas

@@ -1871,12 +1871,12 @@ begin
     end;
     WizardForm.Update;
     try
-      DownloadTemporaryFileProcessMessages := True;
+      DownloadTemporaryFileOrSevenZipDecodeProcessMessages := True;
       CodeNeedsRestart := False;
       Result := CodeRunner.RunStringFunctions('PrepareToInstall', [@CodeNeedsRestart], bcNonEmpty, True, '');
       PrepareToInstallNeedsRestart := (Result <> '') and CodeNeedsRestart;
     finally
-      DownloadTemporaryFileProcessMessages := False;
+      DownloadTemporaryFileOrSevenZipDecodeProcessMessages := False;
       UpdateCurPageButtonState;
     end;
     Application.BringToFront;