109 Commits

Author SHA1 Message Date
Martijn Laan
3f2615936c
Merge branch 'main' into files-downloadarchive 2025-06-12 17:55:33 +02:00
Martijn Laan
92b26afd0c
Comment fixes. 2025-06-12 17:55:25 +02:00
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
8358e444e8
Extractarchive log tweaks:
-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.
2025-06-12 14:38:16 +02:00
Martijn Laan
f3f7fbad28
Finish: Tweaks and fixes after testing. 2025-06-12 14:30:48 +02:00
Martijn Laan
59998c0e85
Fix. 2025-06-12 11:10:58 +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
762abd65c6
Merge branch 'main' into files-hash
# Conflicts:
#	Projects/Src/Setup.Install.pas
2025-06-12 09:35:08 +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
f9feb780c2
Fix/cleanup bad param (which was ignored). 2025-06-11 22:02:21 +02:00
Martijn Laan
ecbc01910b
Merge branch 'files-download'
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.
2025-06-11 21:10:13 +02:00
Martijn Laan
487b78d6dc
Cleanup. 2025-06-11 20:46:41 +02:00
Martijn Laan
2a32a45277
Use the same progress protection while extracting and downloading as while copying an external file. 2025-06-11 20:22:33 +02:00
Martijn Laan
9471d2e64b
Add constants support to DownloadISSigSource, DownloadUserName, and DownloadPassword + fix param parsing bug. 2025-06-10 20:12:32 +02:00
Martijn Laan
eb7f104e80
Merge branch 'main' into files-download
# Conflicts:
#	Projects/Src/Setup.MainFunc.pas
2025-06-10 19:53:19 +02:00
Martijn Laan
73f39438c5
Add constants support to ExtractArchivePassword + cleanup: take password from CurFile param if available. 2025-06-09 20:57:03 +02:00
Martijn Laan
125db1251c
Do not try to include .issig size in the total progress. Instead just process events while downloading it without updating progress.
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.
2025-06-09 19:35:47 +02:00
Martijn Laan
5a830a1524
Fix leftover CallUpdate param which wasnt supposed to be there anymore. 2025-06-09 19:26:38 +02:00
Martijn Laan
4b4ea3c8f6
Don't allow download + skipifsourcedoesntexist. 2025-06-09 19:23:00 +02:00
Martijn Laan
820fd3cbda
Merge branch 'main' into files-download
# Conflicts:
#	ISHelp/isetup.xml
2025-06-09 19:18:03 +02:00
Martijn Laan
663f461a72
Really fix skipifsourcedoesntexist for archives. 2025-06-09 19:17:21 +02:00
Martijn Laan
1252af988c
Fix old SetFileTime bug. 2025-06-09 10:04:45 +02:00
Martijn Laan
5d1fe8ef71
GetISSigUrl: don't decode. 2025-06-09 10:01:44 +02:00
Martijn Laan
069e871f19
Merge branch 'main' into files-download
# Conflicts:
#	ISHelp/isetup.xml
2025-06-09 10:00:12 +02:00
Martijn Laan
f2040ac2af
Add missing foSkipIfSourceDoesntExist check to RecurseExternalArchiveCopyFiles. 2025-06-09 09:58:20 +02:00
Martijn Laan
813d024dd4
Add download+issigverify support. This finishes the branch, only whatsnew todo + making a new fresh messages commit + test username/password support. 2025-06-08 20:28:13 +02:00
Martijn Laan
5b4385bfa7
Make DownloadUserName and DownloadPassword work. Todo: test. 2025-06-08 18:39:59 +02:00
Martijn Laan
e2ce5b00b1
Merge branch 'main' into files-download
# Conflicts:
#	Projects/Src/Setup.Install.pas
2025-06-08 18:34:58 +02:00
Martijn Laan
8e6d25739d
SetDownloadCredentials cleanup. 2025-06-08 18:33:39 +02:00
Martijn Laan
17a85b56fc
Tweak extractarchive logging. 2025-06-08 17:28:09 +02:00
Martijn Laan
12357a3acf
Allow empty ISSigUrl for automatic handling. 2025-06-08 17:17:35 +02:00
Martijn Laan
3b55f2fa69
Merge branch 'main' into files-download 2025-06-08 16:53:03 +02:00
Martijn Laan
20e10bb065
Improve progress/abort handling. 2025-06-08 16:15:49 +02:00
Martijn Laan
3c67d36bff
Add [Files] flag "download" for integrated download support. Was rather easy 👍
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.
2025-06-08 13:42:34 +02:00
Martijn Laan
0f755cb764
Tweak. 2025-06-08 13:11:24 +02:00
Martijn Laan
c0fdd13660
Add comment + cleanup. 2025-06-08 10:08:07 +02:00
Martijn Laan
7869c2fb60
Revert "Setup: add and use missing ISSigVerifySignatureRedir.". 2025-06-08 09:55:37 +02:00
Martijn Laan
abfc87cb80
Setup: add and use missing ISSigVerifySignatureRedir. 2025-06-07 14:55:31 +02:00
Martijn Laan
7f6278c99b
Merge branch 'files-extractarchive' 2025-06-07 09:41:47 +02:00
Martijn Laan
8a5359c1f7
Fix the exception issue by introducing a new message. Cleans up the code AND the message to the user 👍 Todo: commit Default.isl.
New message is:

ErrorExtracting=An error occurred while trying to extract an archive:
2025-06-06 20:48:32 +02:00
Martijn Laan
7334d1839f
Add 'file already downloaded' support to download with issigverify as well. 2025-06-06 18:06:07 +02:00
Martijn Laan
b89694a460
Show only .issig's name in issigverify errors instead of entire path. Also add comments. 2025-06-06 17:34:58 +02:00
Martijn Laan
387af86d00
Improve messages and fix a problem. 2025-06-06 17:28:51 +02:00
Martijn Laan
00838c94ac
Improve ISCmplr's issigverify errors to be like Setup's, with small differences.
Also fix ISSigTool compilation.
2025-06-06 07:48:23 +02:00
Martijn Laan
f7636cf5fe
Improve internal names + log malformed and bad seperately but keep message shared. 2025-06-05 22:11:16 +02:00
Martijn Laan
475967a272
Add new messages for issigverify errors. Todo: commit new Default.isl. 2025-06-05 22:05:15 +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
5016f1c1dc
Add issigverify support for extractarchive. 2025-06-04 12:14:18 +02:00