For such entries the archive is downloaded to {tmp}\_isetup\<randomdir>\<destname> using a TDownloadWizardPage, as the first step of PrepareToInstall. Supports verification.
On success the entries' SourceFilename is updated to the temp file, the download flag is removed and also DestName and verification. Áfter that the rest (PreviousInstallCompleted, RegisterResourcesWithRestartManager, and installation) works normally and required no changes.
On error the problem is displayed by the ready page. Also didn't require changes, except for an extract on BaseName display.
Todo:
-Rename CodeDownloadFiles.iss since there's no [Code] in it anymore.
-Offer Abort/Retry when a download fails? Or even Ignore somehow?
-Let the user choose if it should show BaseNames or URLs while downloading with a new directive? Both for archives and files.
-Document
-Log a '-- Archive entry --' message during installation before the first '-- File entry--' belonging to that archive. Without it the log is confusing, especially if there's verification.
-Don't let 7-Zip handle not-yet-existing archives (like when an entry refers to an archive in {tmp}). Instead check ourselves like we already do during installation. Prevents confusing error message in the log.
Going to deal with CodeDownloadFiles.iss and CodeDownloadFiles2.iss and all references later.
Also doing the Hash idea (before mentioned as DownloadRequiredSha256) later and not just for downloads.
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.
Todo:
-Handle username + password
-Add param for .issig url, like IssigSource? Now it requires a second entry
-Doc
-Allow download+extractarchive? I suppose the download part would need to be integrated differently since it first would need to download (all?) the archive(s) to {tmp} using CreateDownloadPage. Hooking up the download steam to the 7-Zip instream wouldn't work since it needs non-sequential access.
Could not use array of string in these new functions and had to use TStringList. For consistency changed support function ISSigVerify to use TStringList as well.
Also, didn't need this in the end but kept it anyway: make TDownloadWizardPage's and TExtractionWizardPage's Add(Ex) a function returning the index of the added item, like all other adds.