From 03b5a4ce0534b0740a0743794bccc3384c93a6fd Mon Sep 17 00:00:00 2001 From: Jordan Russell Date: Tue, 31 Dec 2024 00:23:17 -0600 Subject: [PATCH] Remove auto-search for disk slices in "..\DISKx". Secretly searching for a missing file in another directory just doesn't align with modern best practices. --- Projects/Src/Setup.FileExtractor.pas | 11 ++--------- whatsnew.htm | 1 + 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Projects/Src/Setup.FileExtractor.pas b/Projects/Src/Setup.FileExtractor.pas index 18b26b84..54802afa 100644 --- a/Projects/Src/Setup.FileExtractor.pas +++ b/Projects/Src/Setup.FileExtractor.pas @@ -114,7 +114,7 @@ procedure TFileExtractor.SetCryptKey(const Value: TSetupEncryptionKey); class function TFileExtractor.FindSliceFilename(const ASlice: Integer): String; var Major, Minor: Integer; - Prefix, F1, F2, Path: String; + Prefix, F1, Path: String; begin Prefix := PathChangeExt(PathExtractName(SetupLdrOriginalFilename), ''); Major := ASlice div SetupHeader.SlicesPerDisk + 1; @@ -123,21 +123,14 @@ class function TFileExtractor.FindSliceFilename(const ASlice: Integer): String; F1 := Format('%s-%d.bin', [Prefix, Major]) else F1 := Format('%s-%d%s.bin', [Prefix, Major, Chr(Ord('a') + Minor)]); - F2 := Format('..\DISK%d\', [Major]) + F1; if LastSourceDir <> '' then begin Result := AddBackslash(LastSourceDir) + F1; if NewFileExists(Result) then Exit; end; Result := AddBackslash(SourceDir) + F1; if NewFileExists(Result) then Exit; - if LastSourceDir <> '' then begin - Result := PathExpand(AddBackslash(LastSourceDir) + F2); - if NewFileExists(Result) then Exit; - end; - Result := PathExpand(AddBackslash(SourceDir) + F2); - if NewFileExists(Result) then Exit; Path := SourceDir; - LogFmt('Asking user for new disk containing "%s".', [F1]); + LogFmt('Asking user for new disk containing "%s".', [F1]); if SelectDisk(Major, F1, Path) then begin LastSourceDir := Path; Result := AddBackslash(Path) + F1; diff --git a/whatsnew.htm b/whatsnew.htm index e18a0c65..49bab856 100644 --- a/whatsnew.htm +++ b/whatsnew.htm @@ -93,6 +93,7 @@
  • Replaced all remaining use of MD5 and SHA-1 hashes with SHA-256 hashes, without removing the MD5 and SHA-1 Pascal Scripting and ISPP support functions.
  • At long last, Setup's wizard window now shows a thumbnail image on its taskbar button, and animates correctly when minimized and restored. As part of this work, support for the long-deprecated [Setup] section directive WindowVisible, which was used to enable a 1990s-style blue gradient background behind the wizard window, has been dropped.
  • The aspect ratio of Setup's large and small wizard images (as specified by WizardImageFile and WizardSmallImageFile) is now maintained when the window is scaled. Previously, depending on the font and font size used, they could have appeared horizontally stretched or squished.
  • +
  • When disk spanning is enabled and Setup cannot find the needed disk slice file (e.g., setup-2.bin) in the source directory, it no longer automatically searches for it in a directory named DISKx one level up, where x is the disk number. Though consistent with old installers from the 16-bit era, this behavior wasn't documented.
  • The New Script Wizard now sets UninstallDisplayIcon when an .exe is chosen as the main executable file.
  • Merged the Inno Setup Preprocessor documentation into the main documentation instead of being separate.
  • Added a dark mode version of the documentation, automatically used by the Compiler IDE if a dark theme is chosen.