Selaa lähdekoodia

Do not try to include .issig size in the total progress. Instead just process events while downloading it without updating progress.

New todo list:
-Add DownloadRequiredSha256 parameter. (Or DownloadRequiredSHA256OfFile?)
-Use another progressproc for the ArchiveFindExtract and 2 DownloadFile calls: it should prevent the progress bar position from moving beyond ExternalSize like CopySourceFileToDestFile does.
-Update whatsnew.
-Update CodeDownloadFiles references and add new ones.
-Make a new fresh messages commit.
-Add constant support to download username and extract/download passwords. (Extract on main.)
-Test download username/password support.
Martijn Laan 3 kuukautta sitten
vanhempi
commit
125db1251c

+ 0 - 1
Components/ISSigFunc.pas

@@ -70,7 +70,6 @@ function ISSigCalcStreamHash(const AStream: TStream): TSHA256Digest;
 
 
 var
 var
   ISSigExt: String = '.issig';
   ISSigExt: String = '.issig';
-  ISSigEstimatedSize: Integer = 330;
 
 
 implementation
 implementation
 
 

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

@@ -226,6 +226,11 @@ begin
   ProcessEvents;
   ProcessEvents;
 end;
 end;
 
 
+procedure JustProcessEventsProc(Bytes: Cardinal);
+begin
+  ProcessEvents;
+end;
+
 function AbortRetryIgnoreTaskDialogMsgBox(const Text: String;
 function AbortRetryIgnoreTaskDialogMsgBox(const Text: String;
   const RetryIgnoreAbortButtonLabels: array of String): Boolean;
   const RetryIgnoreAbortButtonLabels: array of String): Boolean;
 { Returns True if Ignore was selected, False if Retry was selected, or
 { Returns True if Ignore was selected, False if Retry was selected, or
@@ -1578,7 +1583,7 @@ var
                   { Download the .issig file }
                   { Download the .issig file }
                   const ISSigUrl = GetISSigUrl(SourceFile, CurFile^.DownloadISSigSource);
                   const ISSigUrl = GetISSigUrl(SourceFile, CurFile^.DownloadISSigSource);
                   DownloadFile(ISSigUrl, CurFile^.DownloadUserName, CurFile^.DownloadPassword,
                   DownloadFile(ISSigUrl, CurFile^.DownloadUserName, CurFile^.DownloadPassword,
-                    ISSigDestF, False, '', '', ExtractorProgressProc);
+                    ISSigDestF, False, '', '', JustProcessEventsProc);
                   FreeAndNil(ISSigDestF);
                   FreeAndNil(ISSigDestF);
                   { Download and verify the actual file }
                   { Download and verify the actual file }
                   DownloadFile(SourceFile, CurFile^.DownloadUserName, CurFile^.DownloadPassword,
                   DownloadFile(SourceFile, CurFile^.DownloadUserName, CurFile^.DownloadPassword,

+ 0 - 2
Projects/Src/Setup.MainFunc.pas

@@ -3550,8 +3550,6 @@ begin
                 (ESevenZipError). Also see EnumFiles. }
                 (ESevenZipError). Also see EnumFiles. }
             end;
             end;
           end;
           end;
-          if (foDownload in Options) and (foISSigVerify in Options) then
-            Inc6464(ExternalSize, Integer64(UInt64(ISSigEstimatedSize)));
           if Components = '' then { no types or a file that doesn't belong to any component }
           if Components = '' then { no types or a file that doesn't belong to any component }
             if (Tasks = '') and (Check = '') then {don't count tasks or scripted entries}
             if (Tasks = '') and (Check = '') then {don't count tasks or scripted entries}
               Inc6464(MinimumSpace, ExternalSize);
               Inc6464(MinimumSpace, ExternalSize);