summary refs log tree commit diff stats
path: root/win32/installer/hexchat-xp-x86.skel.iss
diff options
context:
space:
mode:
Diffstat (limited to 'win32/installer/hexchat-xp-x86.skel.iss')
-rw-r--r--win32/installer/hexchat-xp-x86.skel.iss23
1 files changed, 23 insertions, 0 deletions
diff --git a/win32/installer/hexchat-xp-x86.skel.iss b/win32/installer/hexchat-xp-x86.skel.iss
index 8875ebad..0c27aeac 100644
--- a/win32/installer/hexchat-xp-x86.skel.iss
+++ b/win32/installer/hexchat-xp-x86.skel.iss
@@ -260,6 +260,21 @@ begin
 end;

 

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

+procedure MigrateConf();

+begin

+  FileCopy(ExpandConstant('{userappdata}\HexChat\xchat.conf'), ExpandConstant('{userappdata}\HexChat\hexchat.conf'), True);

+end;

+

+/////////////////////////////////////////////////////////////////////

+function ConfExistCheck(): Boolean;

+begin

+  if FileExists(ExpandConstant('{userappdata}\HexChat\xchat.conf')) then

+      Result := True

+  else

+    Result := False

+end;

+

+/////////////////////////////////////////////////////////////////////

 procedure CurStepChanged(CurStep: TSetupStep);

 begin

 	if not (IsTaskSelected('portable')) then

@@ -272,6 +287,14 @@ begin
 			end;

 			DeleteFile(ExpandConstant('{app}\portable-mode'));

 		end;

+

+		if (CurStep=ssPostInstall) then

+		begin

+			if ConfExistCheck() then begin

+				if SuppressibleMsgBox('Would you like to copy your old HexChat configuration file (xchat.conf) to the new name (hexchat.conf)? Make sure you remove xchat.conf when you no longer need it.', mbConfirmation, MB_YESNO or MB_DEFBUTTON2, IDNO) = IDYES then

+					MigrateConf();

+			end;

+		end;

 	end;

 end;