31 Commits

Author SHA1 Message Date
Martijn Laan
02a6880a0e
WIP: add retry question + add note how to make it work better. 2025-06-12 20:09:14 +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
487b78d6dc
Cleanup. 2025-06-11 20:46:41 +02:00
Martijn Laan
f770e48db8
Finishing touches. 2025-05-28 20:34:25 +02:00
Martijn Laan
4d26869349
DownloadTemporaryFileOrExtract7ZipArchiveProcessMessages -> DownloadTemporaryFileOrExtractArchiveProcessMessages. 2025-05-22 09:45:35 +02:00
Martijn Laan
028432c711 Revert adding Redir suffixes + TRedir<T>. 2025-05-20 13:35:14 +02:00
Martijn Laan
a1bffc816c
Clarify the name of functions taking a DisableFsRedir parameter but not having the ...Redir name. Especially helps if the call just says False for DisableFsRedir.
Also always set DisableFsRedir to False in InternalExtractTemporaryFile and DownloadTemporaryFile just like it already does for everything else working on the temp dir.
2025-05-19 19:29:09 +02:00
Martijn Laan
3a1914add3
Cleanup a bit more. 2025-02-06 18:24:50 +01:00
Martijn Laan
40c2504870
Minor tweak. 2025-01-04 15:39:11 +01:00
Jordan Russell
859bd0a376
Don't reduce small wizard image area down to 55x55 anymore; use the full 58x58 size. 2025-01-04 00:39:23 -06:00
Jordan Russell
d5e8603909
Replace "WizardForm.Show" with "WizardForm.Visible := True".
Show has a BringToFront call that we don't need. Changing Visible from False to True already brings the window to the front when not minimized. And when it is minimized, we don't want it becoming the active window.

This works around the same VCL issue as in preceding commits, where the Forms unit's WM_ACTIVATEAPP handler sets FAppIconic=False even though the window may still be minimized, which causes the next Application.Restore call to be a no-op.
2024-12-22 02:02:28 -06:00
Jordan Russell
3dc9943825
Don't allow Application.Restore to show WizardForm if it's hidden. 2024-12-19 02:25:15 -06:00
Jordan Russell
5e6334e70f
Check if WizardForm is minimized before calling Application.BringToFront.
Works around VCL bug. If Application.BringToFront is called while the app is minimized, the Forms unit's WM_ACTIVATEAPP handler inexplicably sets FAppIconic=False, which causes the next Application.Restore call to be a no-op.
2024-12-18 02:39:45 -06:00
Jordan Russell
c29c12eeb1
Finish updating Setup.WizardForm. 2024-12-15 01:02:09 -06:00
Jordan Russell
9d52a24040
Setup: De-form TMainForm and set MainFormOnTaskBar=True.
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.
2024-12-14 04:44:08 -06:00
Martijn Laan
6910a147a5
Finishing touches. 2024-11-15 16:44:10 +01:00
Martijn Laan
23bac8824d
Be like DownloadTemporaryFile. 2024-11-09 13:32:19 +01:00
Jordan Russell
d5b7736377
Preserve aspect ratio of large wizard images when scaling. 2024-11-06 01:09:58 -06:00
Jordan Russell
1078c29068
Make sure small image is flush with right edge after scaling. 2024-11-05 02:08:54 -06:00
Jordan Russell
8710b2eee4
Preserve aspect ratio of small wizard image when scaling.
Previously, square images could appear horizontally stretched or squished, depending on the font size.

This change does mean that if non-square image sizes were used to work around the problem, the images will now have to be resized.
2024-11-03 01:34:27 -06:00
Jordan Russell
442084008b
Don't stretch small wizard image vertically when >1 images specified.
Previously, when multiple images were specified, the control was left at its default non-square 55x58 size, causing vertical stretching if square image sizes like 55x55 were used.

Report: https://groups.google.com/g/innosetup/c/9IB8v14MoKI
2024-10-30 00:38:12 -05:00
Martijn Laan
a5a8448fc2
Added [Setup] section directive EncryptionKeyDerivation. 2024-09-29 14:42:29 +02:00
Martijn Laan
f727458281
Tweak WizardForm's CheckPassword + some cleanup. 2024-09-29 13:11:57 +02:00
Martijn Laan
6876665c8a
Use PBKDF2 to get the encryption key. Chose to use 100,000 iterations and a 128-bit salt. 2024-09-27 16:24:48 +02:00
Martijn Laan
e955344670
Cleanup Compil32 using Shared.SetupTypes since last july: move the required types (TSetupStep and TUninstallStep) into a new unit instead. 2024-09-27 16:07:30 +02:00
Martijn Laan
9a91001f91
Cleanup password testing: use the encryption itself (by encrypting 0 and comparing results) to test the password instead of having something separate as before.
Encryption itself is unchanged by this commit except that the key is now derived from the password only once. So it still uses SHA-256 for this.

The next step is changing this to a proper KDF, by changing the implementation of GenerateEncryptionKey and the TSetupEncryptionKey type.
2024-09-26 13:26:30 +02:00
Martijn Laan
58b27f351b
Cleanup remaining MD5, SHA1 and Hash unit use. 2024-09-26 11:39:48 +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
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