Browse Source

Remove the callbacks which make the assumption they will be called only once with Progress = ProgressMax but this isn't necessarily true for the extraction one and don't want to add extra code to make it true atm.

Martijn Laan 3 months ago
parent
commit
c59df95b8e
1 changed files with 2 additions and 16 deletions
  1. 2 16
      Examples/CodeDownloadFiles.iss

+ 2 - 16
Examples/CodeDownloadFiles.iss

@@ -56,25 +56,11 @@ var
   DownloadPage: TDownloadWizardPage;
   DownloadPage: TDownloadWizardPage;
   ExtractionPage: TExtractionWizardPage;
   ExtractionPage: TExtractionWizardPage;
 
 
-function OnDownloadProgress(const Url, FileName: String; const Progress, ProgressMax: Int64): Boolean;
-begin
-  if Progress = ProgressMax then
-    Log(Format('Successfully downloaded file to {tmp}: %s', [FileName]));
-  Result := True;
-end;
-
-function OnExtractionProgress(const ArchiveName, FileName: String; const Progress, ProgressMax: Int64): Boolean;
-begin
-  if Progress = ProgressMax then
-    Log(Format('Successfully extracted archive to {tmp}\MyProg-ExtraReadmes: %s', [ArchiveName]));
-  Result := True;
-end;
-
 procedure InitializeWizard;
 procedure InitializeWizard;
 begin
 begin
-  DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnDownloadProgress);
+  DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), nil);
   DownloadPage.ShowBaseNameInsteadOfUrl := True;
   DownloadPage.ShowBaseNameInsteadOfUrl := True;
-  ExtractionPage := CreateExtractionPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnExtractionProgress);
+  ExtractionPage := CreateExtractionPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), nil);
 end;
 end;
 
 
 function NextButtonClick(CurPageID: Integer): Boolean;
 function NextButtonClick(CurPageID: Integer): Boolean;