[gimp/gimp-2-8] Installer: remember /32 switch between runs



commit a125d8daccd4485a0983ce37a377e4720e90a9a2
Author: Jernej SimonÄiÄ <jernej+s-gnome eternallybored org>
Date:   Sat Jul 14 16:06:34 2012 +0200

    Installer: remember /32 switch between runs

 build/windows/installer/gimp3264.iss |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)
---
diff --git a/build/windows/installer/gimp3264.iss b/build/windows/installer/gimp3264.iss
index 72c972f..c9ec326 100644
--- a/build/windows/installer/gimp3264.iss
+++ b/build/windows/installer/gimp3264.iss
@@ -1471,17 +1471,25 @@ end;
 
 procedure Check32bitOverride;
 var i: Integer;
+	old: String;
 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;
+	old := LowerCase(GetPreviousData('32bitMode',''));
+
+	if old = 'true' then //ignore command line if previous install is already present
+		Force32bitInstall := True
+	else if old = 'false' then
+		Force32bitInstall := False
+	else
+		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));
+	DebugMsg('Check32bitOverride',BoolToStr(Force32bitInstall) + '[' + old + ']');
 end;
 
 
@@ -1543,6 +1551,13 @@ begin
 end;
 
 
+procedure RegisterPreviousData(PreviousDataKey: Integer);
+begin
+	if Is64BitInstallMode() then
+		SetPreviousData(PreviousDataKey,'32BitMode',BoolToStr(Force32bitInstall));
+end;
+
+
 procedure SaveToUninstInf(const pText: AnsiString);
 var sUnInf: String;
 	sOldContent: String;



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