I am trying to create a distributable .exe file with Inno Setup tools and Inno Download Plugin. The resulting file is ~3GB in size, split in 6 parts (1 for the executable, 5 bins containing all the files).
Would it be possible to keep the 5 bins uploaded on some server and download them during installation with the remaining executable file?
My code is here :
procedure InitializeWizard();
var
ResultCode: integer;
TempAddress: String;
FinalSavePath: String;
UserName, UserCompany: String;
begin
idpSetOption('DetailedMode', '1');
idpSetOption('AllowContinue', '1');
idpSetLogin('aaa', 'aaa');
idpAddFile('https://...', target_path);
idpAddFile('https://...', target_path);
idpAddFile('https://...', target_path);
idpAddFile('https://...', target_path);
idpDownloadAfter(wpWelcome);
end;
With idpDownloadAfter(wpWelcome)
the installer starts downloading right after accepting to run the executable, if .bin
files are already present. If not, the installer just keeps asking for the .bin
to be present.
Inno Setup 6.1 has a built-in support for file downloads, which does not need any support files. So the solution below is obsolete now. See Inno Setup: Install file from Internet.
Inno Download Plugin uses idp.dll
, which itself is stored in the mysetup-*.bin
files. That's why you get prompted for the .bin
files, even before anything starts. You need the idp.dll
so that the download itself can start.
With some hacking you can have the idp.dll
be stored in the [Code]
, hence directly in the mysetup.exe
.
See Inno Setup: Reading a file from installer during uninstallation.
You will need to modify the idp.iss
as follows:
[Files]
section with its reference to idp.dll
.external
functions declarations:@files:idp.dll cdecl
to @{tmp}\idp.dll cdecl delayload
.To the front of your .iss
script, copy the long code block from my answer to the previously mentioned question.
And now you can do:
procedure InitializeWizard();
begin
SaveBinaryStringToFile(
ExpandConstant('{tmp}\idp.dll'), {#FileToBinaryString("unicode\idp.dll")});
idpAddFile(
'https://www.example.com/mysetup-1.bin', ExpandConstant('{src}\mysetup-1.bin'));
idpDownloadAfter( {whatever} );
end;
Make sure you update the path to the idp.dll
to the correct location on your development machine in the call to FileToBinaryString
.
The code is for Unicode version of Inno Setup (the only version as of Inno Setup 6).