From b236af84a4dc285736ea5dde8518adad4b3eacd0 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 3 Nov 2012 23:54:05 +0100 Subject: Installer migrator functions for xchat.conf -> hexchat.conf --- win32/installer/hexchat-xp-x64.skel.iss | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'win32/installer/hexchat-xp-x64.skel.iss') diff --git a/win32/installer/hexchat-xp-x64.skel.iss b/win32/installer/hexchat-xp-x64.skel.iss index e43b80e2..7661ef27 100644 --- a/win32/installer/hexchat-xp-x64.skel.iss +++ b/win32/installer/hexchat-xp-x64.skel.iss @@ -258,6 +258,21 @@ begin Result := 1; 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 @@ -271,6 +286,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; -- cgit 1.4.1