diff --git a/build/windows/installer/base_gimp3264.iss b/build/windows/installer/base_gimp3264.iss index f2a496709c..e5b7fe2b0e 100644 --- a/build/windows/installer/base_gimp3264.iss +++ b/build/windows/installer/base_gimp3264.iss @@ -623,6 +623,7 @@ var Installed_AppVersion: String; Installed_AppVersionInt: Int64; Installer_AppVersionInt: Int64; + ErrorCode: Integer; begin isInstalled := 'notInstalled'; if RegQueryStringValue(HKCU, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1', @@ -654,6 +655,13 @@ begin InstallType := 'itDowngrade'; end; DebugMsg('CheckInstallType','Installed GIMP {#GIMP_MUTEX_VERSION} is: ' + Installed_AppVersion + ', installer is: {#FULL_GIMP_VERSION}. So Install type is: ' + InstallType); + + if (not WizardSilent) and (InstallType = 'itDowngrade') then begin + if SuppressibleMsgBox(FmtMessage(CustomMessage('DowngradeError'), [Installed_AppVersion, '{#FULL_GIMP_VERSION}']), mbCriticalError, MB_OK, IDOK) = IDOK then begin + ShellExecAsOriginalUser('','ms-settings:appsfeatures','','',SW_SHOW,ewNoWait,ErrorCode); + Abort; + end; + end; end; function InitializeSetup(): Boolean; @@ -661,6 +669,8 @@ function InitializeSetup(): Boolean; var Message,Buttons: TArrayOfString; #endif begin + CheckInstallType; + ConfigOverride := coUndefined; Check32bitOverride; @@ -1452,11 +1462,11 @@ end; //7.2 INSTALL: show GIMP text (aka billboard) above progress bar #if Defined(GIMP_UNSTABLE) && GIMP_UNSTABLE != "" - const - GIMP_URL = 'https://gimp.org/downloads/devel/'; +const + GIMP_URL = 'https://gimp.org/downloads/devel/'; #else - const - GIMP_URL = 'https://gimp.org/downloads/'; +const + GIMP_URL = 'https://gimp.org/downloads/'; #endif procedure lblURL_OnClick(Sender: TObject); diff --git a/build/windows/installer/lang/setup.isl.xml.in b/build/windows/installer/lang/setup.isl.xml.in index 72997097e0..cffeed6a8e 100644 --- a/build/windows/installer/lang/setup.isl.xml.in +++ b/build/windows/installer/lang/setup.isl.xml.in @@ -18,6 +18,11 @@
+ + + You are trying to directly downgrade from GIMP %1 to %2.%n%nPlease remove GIMP yourself before installing this version. + + Development version