36 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
f3f7fbad28
Finish: Tweaks and fixes after testing. 2025-06-12 14:30:48 +02:00
Martijn Laan
e2034a4866
Update. 2025-06-12 11:50:03 +02:00
Martijn Laan
d987eea43b
Merge branch 'main' into files-hash 2025-06-12 11:34:07 +02:00
Martijn Laan
132172c396
Oops. 2025-06-12 11:27:04 +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
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
7f6278c99b
Merge branch 'files-extractarchive' 2025-06-07 09:41:47 +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
e3a968e10f
Enable Excludes support. 2025-05-31 08:56:41 +02:00
Martijn Laan
a1b8d669c1
Enumerate archive instead of dir in second place (of three). 2025-05-30 16:35:48 +02:00
Martijn Laan
db0d0fbfaa
Don't allow Excludes and extractarchive. Does not mean all other parameters and flags will be okay, need to check later. 2025-05-30 16:08:40 +02:00
Martijn Laan
c645409e76
Compiler: add extractarchive flag & ExtractArchivePassword parameter. 2025-05-30 14:26:20 +02:00
Martijn Laan
9e1b67740b
Add info about VerifyPrecompiledFiles to the errors. 2025-05-30 11:25:04 +02:00
Martijn Laan
4b294bdf0e
Check trust of the check E32's + more TrustFunc cleanup + fix the .issig entries added by previous commit. Todo: islzma*.exe? Also todo: add directive to disable. 2025-05-29 20:51:18 +02:00
Martijn Laan
67815aaccd
Tweak ExtractArchive transition info. 2025-05-29 15:47:11 +02:00
Martijn Laan
56bbf40579
Add [ISSigKeys] RuntimeID, remove [Code] ISSigLoadTextFromFile. 2025-05-22 16:39:56 +02:00
Martijn Laan
faf859c14a
Cleanup duplicate ISSig verification code. 2025-05-18 19:55:05 +02:00
Martijn Laan
bbcadf5620
Make it work. (Reverted previous commit by force push, didn't need the overload.) 2025-05-09 07:48:03 +02:00
Martijn Laan
ce14023594
Add [Files] ISSigAllowedKeys parameter. Not yet used by Setup and not yet documented. Can be set to a space separated list of key names and groups.
Stored as a bitmask in an array of bytes using type AnsiString. Example: if the length is 2 and the first bit of both bytes are set and the others arent then the allowed keys are the ones with index 0 and index 8. So the 1st and 9th key.

If only the 1st and 9th key are allowed but there are many more keys, it still uses a length of 2. But if a 17th key is allowed then it uses a length of 3, even if no other keys are allowed. Etc.
2025-05-04 15:45:29 +02:00
Martijn Laan
7840e44c1f
Add [ISSigKeys] Group parameter. 2025-05-03 21:10:40 +02:00
Martijn Laan
3fe8f683e5
Log successful ISSig verification. 2025-04-28 17:43:04 +02:00
Martijn Laan
89f067a1c6
Check for duplicate [ISSigKeys] names at compile time. (Other sections which use names don't have such a check so that's why this is "new" code.) 2025-04-27 09:13:27 +02:00
Martijn Laan
fe896a83a1
Don't autostrip issigverify when ISSigKeys is empty but error instead. Also mention .issig in the help file. 2025-04-26 08:21:34 +02:00
Martijn Laan
38b9393df1
Add alternative KeyFile parameter to [ISSigKeys]. Also cleanup a leftover LowerCase on the PublicY parameter. 2025-04-24 17:02:29 +02:00
Martijn Laan
d2c69470f6
Tweak KeyNotFound message: 'incorrect key ID' makes sense for the tool since it works with a single key but the Compiler and Setup can have multiple. 2025-04-24 13:14:51 +02:00
Martijn Laan
d330484aa6
Cleanup. 2025-04-23 10:28:31 +02:00
Martijn Laan
f91314e14b
Also check file hash. 2025-04-23 10:08:22 +02:00
Martijn Laan
f70c2c75c7
First bit of verification: read and verify signature file + check file size. 2025-04-23 10:02:31 +02:00
Martijn Laan
a7a5b2c4ab
Allow optional KeyID parameter allowing the script write to catch mistakes early. 2025-04-22 19:32:08 +02:00
Martijn Laan
ac2b262ddc
Some initial work on [ISSigKeys]. 2025-04-22 18:47:44 +02:00
Martijn Laan
d9d845ab62
Replace ArcFour with XChaCha20 which also removes iscrypt.dll use.
Todo:
-Use a single random base nonce for all files
-Remove/replace various iscrypt use in .iss scripts
-Delete iscrypt.dll on updates
-Update help & whatsnew & web
-Rename TSetupSalt/TSetupNonce?
2024-08-31 22:14:32 +02:00
Martijn Laan
e1e7b59b65
Redo "Improve sign flags handling for merged entries."
This reverts commit ed1f132e8c69d5dc9511c7be817948f00648f53d.
2024-08-24 08:10:29 +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