Переглянути джерело

The New Script Wizard now sets UninstallDisplayIcon when an .exe is chosen as the main executable file.

Martijn Laan 9 місяців тому
батько
коміт
47e65e9ae7
2 змінених файлів з 5 додано та 1 видалено
  1. 4 1
      Projects/Src/IDE.Wizard.WizardForm.pas
  2. 1 0
      whatsnew.htm

+ 4 - 1
Projects/Src/IDE.Wizard.WizardForm.pas

@@ -946,12 +946,15 @@ begin
     { 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;

+ 1 - 0
whatsnew.htm

@@ -92,6 +92,7 @@ For conditions of distribution and use, see <a href="files/is/license.txt">LICEN
   <li>Added <tt>[Setup]</tt> section directive <tt>EncryptionKeyDerivation</tt> to change the number of PBKDF2-HMAC-SHA256 iterations to use from the default of 200000 to another value.</li>
   <li>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.</li>
   <li>The aspect ratio of Setup's large and small wizard images (as specified by <tt>WizardImageFile</tt> and <tt>WizardSmallImageFile</tt>) 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.</li>
+  <li>The New Script Wizard now sets <tt>UninstallDisplayIcon</tt> when an .exe is chosen as the main executable file.</li>
   <li>Merged the Inno Setup Preprocessor documentation into the main documentation instead of being separate.</li>
   <li>Added a dark mode version of the documentation, automatically used by the Compiler IDE if a dark theme is chosen.</li>
   <li>Pascal Scripting changes: