33 Commits

Author SHA1 Message Date
Martijn Laan
2d0ec7b9e5
Add support for dowload+extractarchives in a simple and clean way 👍
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
2025-06-12 17:54:36 +02:00
Martijn Laan
46252ab541
Cleanup. 2025-06-12 10:51:25 +02:00
Martijn Laan
a73d49d52e
Cleanup by adding TSetupFileVerification.
Still not tested. Also todo: doc & new clean messages commit.
2025-06-12 10:29:31 +02:00
Martijn Laan
41e4b363cd
Add SHA256 verification in all places where it can do ISSig verification, using new [Files] parameter Hash.
Didn't test anything yet. Want to do a small refactor first.
2025-06-12 09:31:14 +02:00
Martijn Laan
8e6d25739d
SetDownloadCredentials cleanup. 2025-06-08 18:33:39 +02:00
Martijn Laan
12357a3acf
Allow empty ISSigUrl for automatic handling. 2025-06-08 17:17:35 +02:00
Martijn Laan
369ea1627a
Cleanup IssigUrl->ISSigUrl. 2025-06-08 16:59:01 +02:00
Martijn Laan
95995123dd
Add DownloadTemporaryFileWithISSigVerify + doc tweaks. 2025-06-07 16:15:36 +02:00
Martijn Laan
01dc41cb81
Actually, do move Extract(7Zip)ArchiveRedir's outer exception handling up one level. Does not add extra duplicate code and still keeps it as 6.4.3. 2025-06-06 20:11:14 +02:00
Martijn Laan
f718296112
Improve Add(Ex)WithISSigVerify: accept both URLs at once. 2025-06-04 20:36:28 +02:00
Martijn Laan
6733dc7803
Add TDownloadWizardPage support class functions AddWithISSigVerify and AddExWithISSigVerify. Todo: doc & update CodeDownloadFiles2.iss. Also doc something to prevent people from doing issigverify twice on a downloaded archive.
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.
2025-06-04 18:01:18 +02:00
Martijn Laan
a801fc579b
Make [Code]'s ISSigVerify use Setup.Install's DoISSigVerify (which is new on this branch) to remove duplicate code. Also add DoISSigVerify support to Setup.Install's DownloadTemporaryFile, not yet used. 2025-06-04 16:24:16 +02:00
Martijn Laan
f770e48db8
Finishing touches. 2025-05-28 20:34:25 +02:00
Martijn Laan
a991f57982
Unit names cleanup. 2025-05-24 14:24:23 +02:00
Martijn Laan
6218a86f54
Mark Extract7ZipArchive as obsolete/renamed. If it's called anyway and a 7-Zip DLL is available, still use the DLL version. 2025-05-24 14:11:35 +02:00
Martijn Laan
0d1c4dcdc6
Add [Setup] section directive ArchiveExtraction. Removes the need for the script to handle inclusion/extraction/loading. 2025-05-24 13:37:16 +02:00
Martijn Laan
c48d7bef4d
Tweak archive extraction mode logging. 2025-05-22 12:48:20 +02:00
Martijn Laan
9f4ec000ec
Add TExtractionWizardPage.AddEx. Todo: test & doc. Also some other minor tweaks.
Left the lack of password support as an internal implementation detail of Extract7ZipArchiveRedir.
2025-05-22 12:10:32 +02:00
Martijn Laan
8c9f074319
Add ExtractArchive support to TExtractionWizardPage. Todo: add AddEx to specify password. 2025-05-22 10:31:24 +02:00
Martijn Laan
4d26869349
DownloadTemporaryFileOrExtract7ZipArchiveProcessMessages -> DownloadTemporaryFileOrExtractArchiveProcessMessages. 2025-05-22 09:45:35 +02:00
Martijn Laan
4a4c51302f
Add Redir support to Extract7ZipArchive. 2025-05-19 20:42:17 +02:00
Martijn Laan
6910a147a5
Finishing touches. 2024-11-15 16:44:10 +01:00
Martijn Laan
96853695e2
Update for new messages. 2024-11-15 00:02:22 +01:00
Martijn Laan
8d38ccb084
Finish/fix the page + make Extract7ZipArchive use exceptions on errors, just like DownloadTemporaryFile. Todo: fix messages. Also found new issue (not related to this branch): turns out 7zMain.c doesn't work from the current dir like I thought, instead it works from the archive dir. So the DestDir parameter doesn't work at the moment, doh! 2024-11-14 18:45:08 +01:00
Martijn Laan
c96fdb04a4
Fix the archive name todo + log cleanup (there was double logging). 2024-11-14 15:54:11 +01:00
Martijn Laan
dc634c99de
Work on adding CreateExtractionPage and also make some other improvements. Some todos left as mentioned in the code and also didn't actually test the page yet. 2024-11-14 15:35:20 +01:00
Martijn Laan
7bc16c2892
Fix comment. 2024-11-09 13:28:10 +01:00
Martijn Laan
651064418e
TInputDirWizardPage: Added new NewFolderName property to update the initial value passed to CreateInputDirPage. 2024-08-14 08:55:19 +02:00
Martijn Laan
c745379b5f
Split main form and main functions+vars. 2024-08-09 08:22:01 +02:00
Martijn Laan
bd49a504c7
Finish. So now the functions which were in InstFunc but were not used by SetupLdr are in a Setup-only unit (Setup.InstFunc) and the rest is in a shared unit (SetupLdrAndSetup.InstFunc). The former has most of the function and has the Git history. The latter appears as a new file. 2024-08-06 19:12:28 +02:00
Martijn Laan
200901c8b0 Reintroduce SetupLdrAndSetup prefix. 2024-08-06 13:54:25 +02:00
Martijn Laan
e5d46b163d
Move shared but self-contained and generally useful units to Components. 2024-08-05 20:52:57 +02:00
Martijn Laan
6db7a31745
Move the sources back into the Src folder now that they have prefixes. Changed the Shared prefix of the files which were in SetupLdrAndSetup to Setup. Todo: the remaining dirs with helper code. 2024-08-05 16:56:18 +02:00