[gimp/gimp-2-8] Installer: add /32 command-line parameter to force install of 32-bit version on x64



commit 862bbb829f45d61ebd862dfa51e2d971dac38725
Author: Jernej SimonÄiÄ <jernej+s-gnome eternallybored org>
Date:   Sat Jul 14 14:16:21 2012 +0200

    Installer: add /32 command-line parameter to force install of 32-bit version on x64

 build/windows/installer/gimp3264.iss |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/build/windows/installer/gimp3264.iss b/build/windows/installer/gimp3264.iss
index dc80a6c..72c972f 100644
--- a/build/windows/installer/gimp3264.iss
+++ b/build/windows/installer/gimp3264.iss
@@ -373,6 +373,8 @@ var
 
 	ConfigOverride: (coUndefined, coOverride, coDontOverride);
 
+	Force32bitInstall: Boolean;
+
 	asUninstInf: TArrayOfString; //uninst.inf contents (loaded at start of uninstall, exectued at the end)
 
 
@@ -381,9 +383,9 @@ var
 function Check3264(const pWhich: String): Boolean;
 begin
 	if pWhich = '64' then
-		Result := Is64BitInstallMode()
+		Result := Is64BitInstallMode() and (not Force32bitInstall)
 	else if pWhich = '32' then
-		Result := not Is64BitInstallMode()
+		Result := (not Is64BitInstallMode()) or Force32bitInstall
 	else
 		RaiseException('Unknown check');
 end;
@@ -1467,6 +1469,22 @@ begin
 end;
 
 
+procedure Check32bitOverride;
+var i: Integer;
+begin
+	Force32bitInstall := False;
+
+	for i := 0 to ParamCount do //not a bug (in script anyway) - ParamCount returns the index of last ParamStr element, not the actual count
+		if ParamStr(i) = '/32' then
+		begin
+			Force32bitInstall := True;
+			break;
+		end;
+
+	DebugMsg('Check32bitOverride',BoolToStr(Force32bitInstall));
+end;
+
+
 function InitializeSetup(): Boolean;
 #if (Defined(DEVEL) && DEVEL != "") || Defined(DEVEL_WARNING)
 var Message,Buttons: TArrayOfString;
@@ -1481,6 +1499,8 @@ begin
 		exit;
 	end;
 
+	Check32bitOverride;
+
 	Result := RestartSetupAfterReboot(); //resume install after reboot - skip all setting pages, and install directly
 
 	if Result then



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]