summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2011-11-23 01:35:45 +0100
committerBerke Viktor <berkeviktor@aol.com>2011-11-23 01:35:45 +0100
commitb4f5cff06552e3e9a68c93d93bbed9aa972a23d1 (patch)
treea19e1696118bccc2c4b7441c873b02857b55d93f
parent362a83cb2624478bc1de26c7f24ffff5d726de2b (diff)
separate x86 and x64 inno setup installers
-rw-r--r--build/bitmaps/wizardimage.bmpbin461814 -> 52062 bytes
-rw-r--r--build/bitmaps/wizardsmallimage.bmpbin85894 -> 9798 bytes
-rw-r--r--build/build-x64.bat20
-rw-r--r--build/build-x86.bat20
-rw-r--r--build/release-x64.bat1
-rw-r--r--build/release-x86.bat1
-rw-r--r--build/version.c16
-rw-r--r--build/xchat-wdk-x64.skel.iss207
-rw-r--r--build/xchat-wdk-x86.skel.iss206
9 files changed, 449 insertions, 22 deletions
diff --git a/build/bitmaps/wizardimage.bmp b/build/bitmaps/wizardimage.bmp
index 628eb313..9f5a4c90 100644
--- a/build/bitmaps/wizardimage.bmp
+++ b/build/bitmaps/wizardimage.bmp
Binary files differdiff --git a/build/bitmaps/wizardsmallimage.bmp b/build/bitmaps/wizardsmallimage.bmp
index 5f6e5ce5..1bb8b790 100644
--- a/build/bitmaps/wizardsmallimage.bmp
+++ b/build/bitmaps/wizardsmallimage.bmp
Binary files differdiff --git a/build/build-x64.bat b/build/build-x64.bat
index 97ec4712..6b400512 100644
--- a/build/build-x64.bat
+++ b/build/build-x64.bat
@@ -7,19 +7,19 @@ set DEV_64=%cd%\..\dep-x64
 set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin\amd64;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin\x64;%DEV_64%\bin
 set PERL_512=c:\mozilla-build\perl-5.12-x64\perl
 set PERL_514=c:\mozilla-build\perl-5.14-x64
-echo [Setup] > xchat-wdk.iss
-echo WizardImageFile=%cd%\bitmaps\wizardimage.bmp >> xchat-wdk.iss
-echo WizardSmallImageFile=%cd%\bitmaps\wizardsmallimage.bmp >> xchat-wdk.iss
+echo [Setup] > xchat-wdk-x64.iss
+echo WizardImageFile=%cd%\bitmaps\wizardimage.bmp >> xchat-wdk-x64.iss
+echo WizardSmallImageFile=%cd%\bitmaps\wizardsmallimage.bmp >> xchat-wdk-x64.iss
 del version.exe
 cl /nologo version.c
-version -a >> xchat-wdk.iss
-version -v >> xchat-wdk.iss
-version -i >> xchat-wdk.iss
-version -o >> xchat-wdk.iss
+version -a64 >> xchat-wdk-x64.iss
+version -v >> xchat-wdk-x64.iss
+version -i >> xchat-wdk-x64.iss
+version -o64 >> xchat-wdk-x64.iss
 cd ..
 build\version -r > resource.h
-echo SetupIconFile=%cd%\xchat.ico >> build\xchat-wdk.iss
-type build\xchat-wdk.skel.iss >> build\xchat-wdk.iss
+echo SetupIconFile=%cd%\xchat.ico >> build\xchat-wdk-x64.iss
+type build\xchat-wdk.skel.iss >> build\xchat-wdk-x64.iss
 cd src
 echo DEV = %DEV_64% > makeinc.mak
 echo X64 = YES >> makeinc.mak
@@ -41,4 +41,6 @@ cd ..\..\build
 call compile-po-files.bat
 set PATH=%OPATH%
 call release-x64.bat
+set PATH=%PROGRAMFILES(X86)%\Inno Setup 5
+compil32 /cc xchat-wdk-x64.iss
 pause
diff --git a/build/build-x86.bat b/build/build-x86.bat
index fb811920..08f1413a 100644
--- a/build/build-x86.bat
+++ b/build/build-x86.bat
@@ -7,19 +7,19 @@ set DEV_32=%cd%\..\dep-x86
 set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin;%DEV_32%\bin
 set PERL_512=c:\mozilla-build\perl-5.12-x86\perl
 set PERL_514=c:\mozilla-build\perl-5.14-x86
-echo [Setup] > xchat-wdk.iss
-echo WizardImageFile=%cd%\bitmaps\wizardimage.bmp >> xchat-wdk.iss
-echo WizardSmallImageFile=%cd%\bitmaps\wizardsmallimage.bmp >> xchat-wdk.iss
+echo [Setup] > xchat-wdk-x86.iss
+echo WizardImageFile=%cd%\bitmaps\wizardimage.bmp >> xchat-wdk-x86.iss
+echo WizardSmallImageFile=%cd%\bitmaps\wizardsmallimage.bmp >> xchat-wdk-x86.iss
 del version.exe
 cl /nologo version.c
-version -a >> xchat-wdk.iss
-version -v >> xchat-wdk.iss
-version -i >> xchat-wdk.iss
-version -o >> xchat-wdk.iss
+version -a32 >> xchat-wdk-x86.iss
+version -v >> xchat-wdk-x86.iss
+version -i >> xchat-wdk-x86.iss
+version -o32 >> xchat-wdk-x86.iss
 cd ..
 build\version -r > resource.h
-echo SetupIconFile=%cd%\xchat.ico >> build\xchat-wdk.iss
-type build\xchat-wdk.skel.iss >> build\xchat-wdk.iss
+echo SetupIconFile=%cd%\xchat.ico >> build\xchat-wdk-x86.iss
+type build\xchat-wdk-x86.skel.iss >> build\xchat-wdk-x86.iss
 cd src
 echo DEV = %DEV_32% > makeinc.mak
 type makeinc.skel.mak >> makeinc.mak
@@ -40,4 +40,6 @@ cd ..\..\build
 call compile-po-files.bat
 set PATH=%OPATH%
 call release-x86.bat
+set PATH=%PROGRAMFILES(X86)%\Inno Setup 5
+compil32 /cc xchat-wdk-x86.iss
 pause
diff --git a/build/release-x64.bat b/build/release-x64.bat
index da9d9930..688473de 100644
--- a/build/release-x64.bat
+++ b/build/release-x64.bat
@@ -39,6 +39,7 @@ copy %DEPS_ROOT%\share\gettext\intl\COPYING.LIB-2.0 %XCHAT_DEST%\LICENSE.GTK
 copy %DEPS_ROOT%\share\gettext\intl\COPYING.LIB-2.1 %XCHAT_DEST%\LICENSE.CAIRO
 copy %DEPS_ROOT%\LICENSE.LUA %XCHAT_DEST%
 copy %DEPS_ROOT%\LICENSE.ENCHANT %XCHAT_DEST%
+copy %DEPS_ROOT%\LICENSE.LIBXML %XCHAT_DEST%
 copy %DEPS_ROOT%\bin\libeay32.dll %XCHAT_DEST%
 copy %DEPS_ROOT%\bin\ssleay32.dll %XCHAT_DEST%
 copy %DEPS_ROOT%\bin\zlib1.dll %XCHAT_DEST%
diff --git a/build/release-x86.bat b/build/release-x86.bat
index 23f9cea0..4f2ee107 100644
--- a/build/release-x86.bat
+++ b/build/release-x86.bat
@@ -39,6 +39,7 @@ copy %DEPS_ROOT%\share\gettext\intl\COPYING.LIB-2.0 %XCHAT_DEST%\LICENSE.GTK
 copy %DEPS_ROOT%\share\gettext\intl\COPYING.LIB-2.1 %XCHAT_DEST%\LICENSE.CAIRO
 copy %DEPS_ROOT%\LICENSE.LUA %XCHAT_DEST%
 copy %DEPS_ROOT%\LICENSE.ENCHANT %XCHAT_DEST%
+copy %DEPS_ROOT%\LICENSE.LIBXML %XCHAT_DEST%
 copy %DEPS_ROOT%\bin\libeay32.dll %XCHAT_DEST%
 copy %DEPS_ROOT%\bin\ssleay32.dll %XCHAT_DEST%
 copy %DEPS_ROOT%\bin\zlib1.dll %XCHAT_DEST%
diff --git a/build/version.c b/build/version.c
index baa5cb46..0201d298 100644
--- a/build/version.c
+++ b/build/version.c
@@ -76,9 +76,13 @@ main (int argc, char *argv[])
 		{
 			printf ("#define COMMA_VERSION %s\n", comma ());
 		}
-		else if (!strcmp (argv[1], "-a"))	/* xchat-wdk.iss/AppVerName */
+		else if (!strcmp (argv[1], "-a32"))	/* xchat-wdk.iss/AppVerName */
 		{
-			printf ("AppVerName=XChat-WDK %s\n", PACKAGE_VERSION);
+			printf ("AppVerName=XChat-WDK %s (x86)\n", PACKAGE_VERSION);
+		}
+		else if (!strcmp (argv[1], "-a64"))	/* xchat-wdk.iss/AppVerName */
+		{
+			printf ("AppVerName=XChat-WDK %s (x64)\n", PACKAGE_VERSION);
 		}
 		else if (!strcmp (argv[1], "-v"))	/* xchat-wdk.iss/AppVersion */
 		{
@@ -88,9 +92,13 @@ main (int argc, char *argv[])
 		{
 			printf ("VersionInfoVersion=%s\n", point ());
 		}
-		else if (!strcmp (argv[1], "-o"))	/* xchat-wdk.iss/OutputBaseFilename */
+		else if (!strcmp (argv[1], "-o32"))	/* xchat-wdk.iss/OutputBaseFilename */
 		{
-			printf ("OutputBaseFilename=XChat-WDK %s\n", PACKAGE_VERSION);
+			printf ("OutputBaseFilename=XChat-WDK %s x86\n", PACKAGE_VERSION);
+		}
+		else if (!strcmp (argv[1], "-o64"))	/* xchat-wdk.iss/OutputBaseFilename */
+		{
+			printf ("OutputBaseFilename=XChat-WDK %s x64\n", PACKAGE_VERSION);
 		}
 		else if (!strcmp (argv[1], "-v"))	/* version.txt */
 		{
diff --git a/build/xchat-wdk-x64.skel.iss b/build/xchat-wdk-x64.skel.iss
new file mode 100644
index 00000000..940b537c
--- /dev/null
+++ b/build/xchat-wdk-x64.skel.iss
@@ -0,0 +1,207 @@
+AppName=XChat-WDK (x64)

+AppPublisher=XChat-WDK

+AppPublisherURL=http://code.google.com/p/xchat-wdk/

+AppCopyright=Copyright (C) 1998-2010 Peter Zelezny

+AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list

+AppUpdatesURL=http://www.xchat-wdk.org/home/downloads

+LicenseFile=COPYING

+UninstallDisplayIcon={app}\xchat.exe

+UninstallDisplayName=XChat-WDK (x64)

+DefaultDirName={pf}\XChat-WDK

+DefaultGroupName=XChat-WDK (x64)

+DisableProgramGroupPage=yes

+SolidCompression=yes

+SourceDir=..\dist-x64

+OutputDir=..\build

+FlatComponentsList=no

+PrivilegesRequired=none

+ShowComponentSizes=no

+CreateUninstallRegKey=not IsTaskSelected('portable')

+Uninstallable=not IsTaskSelected('portable')

+ArchitecturesAllowed=x86 x64

+ArchitecturesInstallIn64BitMode=x64

+

+[Types]

+Name: "normal"; Description: "Normal Installation"

+Name: "full"; Description: "Full Installation"

+Name: "minimal"; Description: "Minimal Installation"

+Name: "custom"; Description: "Custom Installation"; Flags: iscustom

+

+[Components]

+Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed

+Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning

+Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning

+;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\doat"; Description: "Do At"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; Flags: disablenouninstallwarning

+Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\perl"; Description: "Perl"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\python"; Description: "Python"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenouninstallwarning

+

+[Tasks]

+Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked

+

+Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl

+Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl

+

+[Registry]

+Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable

+Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable

+Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable

+Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable

+Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable

+Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable

+

+[Run]

+Filename: "{app}\xchat.exe"; Description: "Run XChat-WDK after closing the Wizard"; Flags: nowait postinstall skipifsilent

+

+[Files]

+Source: "portable-mode"; DestDir: "{app}"; Tasks: portable

+

+Source: "cert.pem"; DestDir: "{app}"; Components: libs

+Source: "COPYING"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.OPENSSL"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.ZLIB"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.GTK"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.CAIRO"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.LUA"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.LIBXML"; DestDir: "{app}"; Components: libs

+Source: "etc\*"; DestDir: "{app}\etc"; Flags: createallsubdirs recursesubdirs; Components: libs

+Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: createallsubdirs recursesubdirs; Components: libs

+Source: "locale\*"; DestDir: "{app}\locale"; Flags: createallsubdirs recursesubdirs; Components: translations

+Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: createallsubdirs recursesubdirs; Components: translations

+;Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: createallsubdirs recursesubdirs; Components: spelling

+

+Source: "freetype6.dll"; DestDir: "{app}"; Components: libs

+Source: "intl.dll"; DestDir: "{app}"; Components: libs

+

+Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libcairo-2.dll"; DestDir: "{app}"; Components: libs

+Source: "libeay32.dll"; DestDir: "{app}"; Components: libs

+Source: "libexpat-1.dll"; DestDir: "{app}"; Components: libs

+Source: "libfontconfig-1.dll"; DestDir: "{app}"; Components: libs

+Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgio-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libglib-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpng14-14.dll"; DestDir: "{app}"; Components: libs

+Source: "lua51.dll"; DestDir: "{app}"; Components: libs

+Source: "ssleay32.dll"; DestDir: "{app}"; Components: libs

+Source: "zlib1.dll"; DestDir: "{app}"; Components: libs

+Source: "libxml2.dll"; DestDir: "{app}"; Components: libs

+Source: "libenchant.dll"; DestDir: "{app}"; Components: libs

+

+Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Components: libs

+

+Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: libs

+Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: libs

+Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Components: libs

+

+Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Components: plugins\checksum

+Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Components: plugins\doat

+Source: "plugins\xcmpcinfo.dll"; DestDir: "{app}\plugins"; Components: plugins\mpcinfo

+Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Components: plugins\upd

+Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Components: plugins\winamp

+Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Components: plugins\xtray

+Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Components: plugins\wmpa

+

+Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Components: langs\lua

+Source: "plugins\xcpython.dll"; DestDir: "{app}\plugins"; Components: langs\python

+Source: "plugins\xctcl.dll"; DestDir: "{app}\plugins"; Components: langs\tcl

+

+Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: perl512

+Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: perl514

+

+Source: "xchat.exe"; DestDir: "{app}"; Components: libs

+Source: "xchat-text.exe"; DestDir: "{app}"; Components: xctext

+

+[Icons]

+Name: "{group}\XChat-WDK (x64)"; Filename: "{app}\xchat.exe"; Tasks: not portable

+Name: "{group}\XChat-Text (x64)"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable

+Name: "{group}\Uninstall XChat-WDK (x64)"; Filename: "{uninstallexe}"; Tasks: not portable

+

+[Messages]

+BeveledLabel= XChat-WDK

+

+[Code]

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

+// these are required for x86->x64 or reverse upgrades

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

+function GetUninstallString(): String;

+var

+	sUnInstPath: String;

+	sUnInstallString: String;

+begin

+	sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\XChat-WDK_is1');

+	sUnInstallString := '';

+	if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then

+		RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);

+	Result := sUnInstallString;

+end;

+

+

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

+function IsUpgrade(): Boolean;

+begin

+	Result := (GetUninstallString() <> '');

+end;

+

+

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

+function UnInstallOldVersion(): Integer;

+var

+	sUnInstallString: String;

+	iResultCode: Integer;

+begin

+// Return Values:

+// 1 - uninstall string is empty

+// 2 - error executing the UnInstallString

+// 3 - successfully executed the UnInstallString

+

+	// default return value

+	Result := 0;

+

+	// get the uninstall string of the old app

+	sUnInstallString := GetUninstallString();

+	if sUnInstallString <> '' then begin

+		sUnInstallString := RemoveQuotes(sUnInstallString);

+		if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then

+			Result := 3

+		else

+			Result := 2;

+	end else

+		Result := 1;

+end;

+

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

+procedure CurStepChanged(CurStep: TSetupStep);

+begin

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

+	begin

+		if (CurStep=ssInstall) then

+		begin

+			if (IsUpgrade()) then

+			begin

+				UnInstallOldVersion();

+			end;

+		end;

+	end;

+end;

diff --git a/build/xchat-wdk-x86.skel.iss b/build/xchat-wdk-x86.skel.iss
new file mode 100644
index 00000000..7786dc23
--- /dev/null
+++ b/build/xchat-wdk-x86.skel.iss
@@ -0,0 +1,206 @@
+AppName=XChat-WDK (x86)

+AppPublisher=XChat-WDK

+AppPublisherURL=http://code.google.com/p/xchat-wdk/

+AppCopyright=Copyright (C) 1998-2010 Peter Zelezny

+AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list

+AppUpdatesURL=http://www.xchat-wdk.org/home/downloads

+LicenseFile=COPYING

+UninstallDisplayIcon={app}\xchat.exe

+UninstallDisplayName=XChat-WDK (x86)

+DefaultDirName={pf}\XChat-WDK

+DefaultGroupName=XChat-WDK (x86)

+DisableProgramGroupPage=yes

+SolidCompression=yes

+SourceDir=..\dist-x86

+OutputDir=..\build

+FlatComponentsList=no

+PrivilegesRequired=none

+ShowComponentSizes=no

+CreateUninstallRegKey=not IsTaskSelected('portable')

+Uninstallable=not IsTaskSelected('portable')

+ArchitecturesAllowed=x86 x64

+

+[Types]

+Name: "normal"; Description: "Normal Installation"

+Name: "full"; Description: "Full Installation"

+Name: "minimal"; Description: "Minimal Installation"

+Name: "custom"; Description: "Custom Installation"; Flags: iscustom

+

+[Components]

+Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed

+Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning

+Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning

+;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\doat"; Description: "Do At"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; Flags: disablenouninstallwarning

+Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning

+Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\perl"; Description: "Perl"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\python"; Description: "Python"; Types: full custom; Flags: disablenouninstallwarning

+Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenouninstallwarning

+

+[Tasks]

+Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked

+

+Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl

+Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl

+

+[Registry]

+Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable

+Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable

+Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable

+Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable

+Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable

+Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable

+

+[Run]

+Filename: "{app}\xchat.exe"; Description: "Run XChat-WDK after closing the Wizard"; Flags: nowait postinstall skipifsilent

+

+[Files]

+Source: "portable-mode"; DestDir: "{app}"; Tasks: portable

+

+Source: "cert.pem"; DestDir: "{app}"; Components: libs

+Source: "COPYING"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.OPENSSL"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.ZLIB"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.GTK"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.CAIRO"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.LUA"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Components: libs

+Source: "LICENSE.LIBXML"; DestDir: "{app}"; Components: libs

+Source: "etc\*"; DestDir: "{app}\etc"; Flags: createallsubdirs recursesubdirs; Components: libs

+Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: createallsubdirs recursesubdirs; Components: libs

+Source: "locale\*"; DestDir: "{app}\locale"; Flags: createallsubdirs recursesubdirs; Components: translations

+Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: createallsubdirs recursesubdirs; Components: translations

+;Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: createallsubdirs recursesubdirs; Components: spelling

+

+Source: "freetype6.dll"; DestDir: "{app}"; Components: libs

+Source: "intl.dll"; DestDir: "{app}"; Components: libs

+

+Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libcairo-2.dll"; DestDir: "{app}"; Components: libs

+Source: "libeay32.dll"; DestDir: "{app}"; Components: libs

+Source: "libexpat-1.dll"; DestDir: "{app}"; Components: libs

+Source: "libfontconfig-1.dll"; DestDir: "{app}"; Components: libs

+Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgio-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libglib-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Components: libs

+Source: "libpng14-14.dll"; DestDir: "{app}"; Components: libs

+Source: "lua51.dll"; DestDir: "{app}"; Components: libs

+Source: "ssleay32.dll"; DestDir: "{app}"; Components: libs

+Source: "zlib1.dll"; DestDir: "{app}"; Components: libs

+Source: "libxml2.dll"; DestDir: "{app}"; Components: libs

+Source: "libenchant.dll"; DestDir: "{app}"; Components: libs

+

+Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Components: libs

+

+Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: libs

+Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: libs

+Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Components: libs

+

+Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Components: plugins\checksum

+Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Components: plugins\doat

+Source: "plugins\xcmpcinfo.dll"; DestDir: "{app}\plugins"; Components: plugins\mpcinfo

+Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Components: plugins\upd

+Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Components: plugins\winamp

+Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Components: plugins\xtray

+Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Components: plugins\wmpa

+

+Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Components: langs\lua

+Source: "plugins\xcpython.dll"; DestDir: "{app}\plugins"; Components: langs\python

+Source: "plugins\xctcl.dll"; DestDir: "{app}\plugins"; Components: langs\tcl

+

+Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: perl512

+Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Components: langs\perl; Tasks: perl514

+

+Source: "xchat.exe"; DestDir: "{app}"; Components: libs

+Source: "xchat-text.exe"; DestDir: "{app}"; Components: xctext

+

+[Icons]

+Name: "{group}\XChat-WDK (x86)"; Filename: "{app}\xchat.exe"; Tasks: not portable

+Name: "{group}\XChat-Text (x86)"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable

+Name: "{group}\Uninstall XChat-WDK (x86)"; Filename: "{uninstallexe}"; Tasks: not portable

+

+[Messages]

+BeveledLabel= XChat-WDK

+

+[Code]

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

+// these are required for x86->x64 or reverse upgrades

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

+function GetUninstallString(): String;

+var

+	sUnInstPath: String;

+	sUnInstallString: String;

+begin

+	sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\XChat-WDK_is1');

+	sUnInstallString := '';

+	if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then

+		RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);

+	Result := sUnInstallString;

+end;

+

+

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

+function IsUpgrade(): Boolean;

+begin

+	Result := (GetUninstallString() <> '');

+end;

+

+

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

+function UnInstallOldVersion(): Integer;

+var

+	sUnInstallString: String;

+	iResultCode: Integer;

+begin

+// Return Values:

+// 1 - uninstall string is empty

+// 2 - error executing the UnInstallString

+// 3 - successfully executed the UnInstallString

+

+	// default return value

+	Result := 0;

+

+	// get the uninstall string of the old app

+	sUnInstallString := GetUninstallString();

+	if sUnInstallString <> '' then begin

+		sUnInstallString := RemoveQuotes(sUnInstallString);

+		if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then

+			Result := 3

+		else

+			Result := 2;

+	end else

+		Result := 1;

+end;

+

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

+procedure CurStepChanged(CurStep: TSetupStep);

+begin

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

+	begin

+		if (CurStep=ssInstall) then

+		begin

+			if (IsUpgrade()) then

+			begin

+				UnInstallOldVersion();

+			end;

+		end;

+	end;

+end;