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.
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.
Also always set DisableFsRedir to False in InternalExtractTemporaryFile and DownloadTemporaryFile just like it already does for everything else working on the temp dir.
The ShutdownBlockReason calls still pass Application.Handle for the window handle. The docs don't say what the handle is used for. Maybe to supply an icon to display with the specified text?
Mostly done, I think. Still need to actually remove shWindowVisible etc. Still some Application.Handle references that need to be cleaned out. Still need to update help.
TMainForm still exists, but is no longer a form. Good enough for now.
With Application.MainFormOnTaskBar=True, we now have a working taskbar thumbnail and proper minimize/restore animations. Finally.