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 @@