0

I was previously using the DwinsHs plugin for downloading files in the internet.
Now I am trying to move to the Inno Download Plugin.

In my installer I create my own progress bar using TNewProgressBar.Create(WizardForm);.
I need to update this progress bar when I download a file from the internet using the Inno Download Plugin.

In DwinsHs I would use the function DwinsHs_ReadRemoteURL to download files from the internet and update my progress bar while downloading.

This function would also have a very convenient fallback OnRead, which I used to update my progress bar while downloading the file from the internet.

Is it possible to download a file from the internet using Inno Download Plugin and update my progress bar while downloading?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
yuval
  • 2,848
  • 4
  • 31
  • 51

1 Answers1

1

The Inno Download plugin creates its own progress page by default, when you call the idpDownloadAfter function.

See any of theirs examples. Picking the examples\example1.iss:

procedure InitializeWizard();
begin
    idpAddFile('http://127.0.0.1/test1.zip', ExpandConstant('{tmp}\test1.zip'));
    idpAddFile('http://127.0.0.1/test2.zip', ExpandConstant('{tmp}\test2.zip'));
    idpAddFile('http://127.0.0.1/test3.zip', ExpandConstant('{tmp}\test3.zip'));

    idpDownloadAfter(wpReady);
end;

If you want to bind your own progress bar (or other controls) to the Inno Download plugin backend, see what idpConnectControls function in the idp.iss does:

idpConnectControl('TotalProgressBar',   IDPForm.TotalProgressBar.Handle);
idpConnectControl('FileProgressBar',    IDPForm.FileProgressBar.Handle);
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992