summary refs log tree commit diff stats
path: root/build/xchat-wdk.skel.iss
diff options
context:
space:
mode:
authorberkeviktor@aol.com <berkeviktor@aol.com>2010-11-15 14:28:40 +0100
committerberkeviktor@aol.com <berkeviktor@aol.com>2010-11-15 14:28:40 +0100
commitf1dff7604580eef9c65d25a7a2de5cc857cee359 (patch)
tree69f137569c17c076ed1ff47af9ff716bc2659ff0 /build/xchat-wdk.skel.iss
parent711d06b42d1e10547be1b78e67db40084465a350 (diff)
preserve gtk theme
Diffstat (limited to 'build/xchat-wdk.skel.iss')
-rw-r--r--build/xchat-wdk.skel.iss20
1 files changed, 15 insertions, 5 deletions
diff --git a/build/xchat-wdk.skel.iss b/build/xchat-wdk.skel.iss
index 44b58813..c633c21f 100644
--- a/build/xchat-wdk.skel.iss
+++ b/build/xchat-wdk.skel.iss
@@ -281,15 +281,25 @@ end;
 

 /////////////////////////////////////////////////////////////////////

 procedure CurStepChanged(CurStep: TSetupStep);

+var

+	sAppPath: String;

+	sTempPath: String;

 begin

-	if not (IsTaskSelected('portable')) then

+	if not (IsTaskSelected('portable')) and (IsUpgrade()) then

 	begin

 		if (CurStep=ssInstall) then

 		begin

-			if (IsUpgrade()) then

-			begin

-				UnInstallOldVersion();

-			end;

+			sAppPath := ExtractFilePath(Application.ExeName);

+			sTempPath := GetTempDir();

+

+			DelTree(sTempPath + 'gtk-2.0', True, True, True)

+			RenameFile(sAppPath + 'etc\gtk-2.0', sTempPath + 'gtk-2.0');

+			UnInstallOldVersion();

+		end;

+		if (CurStep=ssPostInstall) then

+		begin

+			DelTree(sAppPath + 'etc\gtk-2.0', True, True, True)

+			RenameFile(sTempPath + 'gtk-2.0', sAppPath + 'etc\gtk-2.0');

 		end;

 	end;

 end;