From 47e65e9ae7b7f7cb43a5216ca562125bb7afd7c0 Mon Sep 17 00:00:00 2001 From: Martijn Laan <1092369+martijnlaan@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:33:38 +0100 Subject: [PATCH] The New Script Wizard now sets UninstallDisplayIcon when an .exe is chosen as the main executable file. --- Projects/Src/IDE.Wizard.WizardForm.pas | 5 ++++- whatsnew.htm | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Projects/Src/IDE.Wizard.WizardForm.pas b/Projects/Src/IDE.Wizard.WizardForm.pas index 5bcde9acd..76039d532 100644 --- a/Projects/Src/IDE.Wizard.WizardForm.pas +++ b/Projects/Src/IDE.Wizard.WizardForm.pas @@ -946,12 +946,15 @@ procedure TWizardForm.GenerateScript; { AppFiles } if not NotCreateAppDirCheck.Checked and not NoAppExeCheck.Checked then begin Files := Files + 'Source: "' + PathExtractPath(AppExeEdit.Text) + AppExeName + '"; DestDir: "{app}"; Flags: ignoreversion' + SNewLine; + var AppExeIsReallyExe := SameText(PathExtractExt(AppExeEdit.Text), '.exe'); if AppExeRunCheck.Checked then begin - if SameText(PathExtractExt(AppExeEdit.Text), '.exe') then + if AppExeIsReallyExe then Run := Run + 'Filename: "{app}\' + AppExeName + '"; Description: "{cm:LaunchProgram,' + AppAmpEscapedName + '}"; Flags: nowait postinstall skipifsilent' + SNewLine else Run := Run + 'Filename: "{app}\' + AppExeName + '"; Description: "{cm:LaunchProgram,' + AppAmpEscapedName + '}"; Flags: shellexec postinstall skipifsilent' + SNewLine; end; + if AppExeIsReallyExe then + Setup := Setup + 'UninstallDisplayIcon={app}\' + AppExeName + SNewLine; if Is64BitPEImage(AppExeEdit.Text) then begin Setup := Setup + '; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run' + SNewLine; Setup := Setup + '; on anything but x64 and Windows 11 on Arm.' + SNewLine; diff --git a/whatsnew.htm b/whatsnew.htm index 55c906e37..20d2231f0 100644 --- a/whatsnew.htm +++ b/whatsnew.htm @@ -92,6 +92,7 @@
  • Added [Setup] section directive EncryptionKeyDerivation to change the number of PBKDF2-HMAC-SHA256 iterations to use from the default of 200000 to another value.
  • 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.
  • 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.
  • +
  • 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.
  • Pascal Scripting changes: