Parcourir la source

Improve portable mode: use new UsePreviousAppDir to replace the special AppId workaround, which enables use of PrivilegesRequiredOverridesAllowed=dialog. Note that this dialog will only popup for new installs because of UsePreviousPriviliges, which is still on its default of yes.

Also move the 'Uninstallable=not PortableCheck' line from Setup.iss to isportable.iss.
Martijn Laan il y a 1 mois
Parent
commit
2322e3ff30
2 fichiers modifiés avec 6 ajouts et 10 suppressions
  1. 4 7
      isportable.iss
  2. 2 3
      setup.iss

+ 4 - 7
isportable.iss

@@ -1,19 +1,16 @@
 // -- IsPortable.iss --
 // Include file with support functions for portable mode
 //
+[Setup]
+UsePreviousAppDir=not PortableCheck
+Uninstallable=not PortableCheck
+
 [Code]
 function PortableCheck: Boolean;
 begin
   Result := ExpandConstant('{param:portable|0}') = '1';
 end;
 
-function GetAppId(Param: String): String;
-begin
-  Result := Param;
-  if PortableCheck then
-    Result := Result + ' Portable';
-end;
-
 function GetDefaultDirName(Param: String): String;
 begin
   if PortableCheck then

+ 2 - 3
setup.iss

@@ -43,7 +43,7 @@ end;
 
 [Setup]
 AppName=Inno Setup
-AppId={code:GetAppId|{#AppId}}
+AppId={#AppId}
 AppVersion=7.0.0-dev{#spacebit}
 AppPublisher=jrsoftware.org
 AppPublisherURL=https://www.innosetup.com/
@@ -55,11 +55,10 @@ SetupMutex=InnoSetupCompilerSetupMutex7{#dasharch},Global\InnoSetupCompilerSetup
 WizardStyle=modern dynamic
 DefaultDirName={code:GetDefaultDirName|{code:GetExtendedAppId|0}}
 DefaultGroupName={code:GetExtendedAppId|1}
-PrivilegesRequiredOverridesAllowed=commandline
+PrivilegesRequiredOverridesAllowed=dialog
 AllowNoIcons=yes
 Compression=lzma2/max
 SolidCompression=yes
-Uninstallable=not PortableCheck
 UninstallDisplayIcon={app}\Compil32.exe
 UsePreviousLanguage=no
 LicenseFile=license.txt