2013-12-27 21:05:07 +01:00
|
|
|
#define APPNAM "HexChat"
|
|
|
|
#define APPVER "<#= [string]::Join('.', $versionParts) #>"
|
2013-10-05 21:55:56 +02:00
|
|
|
; These are defined by our installer project at build time
|
|
|
|
;#define APPARCH "x64"
|
|
|
|
;#define PROJECTDIR "C:\...\hexchat\win32\installer\"
|
|
|
|
|
2013-11-09 09:47:24 +01:00
|
|
|
;http://mitrich.net23.net/?/inno-download-plugin.html
|
|
|
|
#include <idp.iss>
|
|
|
|
|
2013-10-05 21:55:56 +02:00
|
|
|
[Setup]
|
|
|
|
AppName=HexChat
|
|
|
|
AppVersion={#APPVER}
|
|
|
|
AppVerName=HexChat {#APPVER}
|
2012-12-26 03:49:21 +01:00
|
|
|
AppPublisher=HexChat
|
2013-10-05 21:55:56 +02:00
|
|
|
AppPublisherURL=http://hexchat.github.io
|
2012-12-26 03:49:21 +01:00
|
|
|
AppCopyright=Copyright (C) 1998-2010 Peter Zelezny
|
|
|
|
AppSupportURL=https://github.com/hexchat/hexchat/issues
|
2013-10-05 21:55:56 +02:00
|
|
|
AppUpdatesURL=http://hexchat.github.io/downloads.html
|
2014-06-13 17:31:50 +02:00
|
|
|
LicenseFile=share\doc\hexchat\COPYING
|
2012-12-26 03:49:21 +01:00
|
|
|
UninstallDisplayIcon={app}\hexchat.exe
|
2013-10-05 21:55:56 +02:00
|
|
|
UninstallDisplayName=HexChat
|
|
|
|
#if APPARCH == "x64"
|
|
|
|
DefaultDirName={pf64}\HexChat
|
|
|
|
#else
|
|
|
|
DefaultDirName={pf32}\HexChat
|
|
|
|
#endif
|
2012-12-26 03:49:21 +01:00
|
|
|
DefaultGroupName=HexChat
|
|
|
|
DisableProgramGroupPage=yes
|
|
|
|
SolidCompression=yes
|
|
|
|
Compression=lzma2/ultra64
|
|
|
|
SourceDir=..\rel
|
|
|
|
OutputDir=..
|
2013-10-05 21:55:56 +02:00
|
|
|
#if APPARCH == "x64"
|
|
|
|
OutputBaseFilename={#APPNAM} {#APPVER} x64
|
|
|
|
#else
|
|
|
|
OutputBaseFilename={#APPNAM} {#APPVER} x86
|
|
|
|
#endif
|
2012-12-26 03:49:21 +01:00
|
|
|
FlatComponentsList=no
|
|
|
|
PrivilegesRequired=none
|
|
|
|
ShowComponentSizes=no
|
|
|
|
CreateUninstallRegKey=not IsTaskSelected('portable')
|
|
|
|
Uninstallable=not IsTaskSelected('portable')
|
2013-10-05 21:55:56 +02:00
|
|
|
#if APPARCH == "x64"
|
2012-12-26 03:49:21 +01:00
|
|
|
ArchitecturesAllowed=x64
|
|
|
|
ArchitecturesInstallIn64BitMode=x64
|
2013-10-05 21:55:56 +02:00
|
|
|
#else
|
|
|
|
ArchitecturesAllowed=x86 x64
|
|
|
|
#endif
|
2014-07-19 16:06:29 +02:00
|
|
|
MinVersion=6.1
|
2013-10-05 21:55:56 +02:00
|
|
|
WizardImageFile={#PROJECTDIR}wizardimage.bmp
|
|
|
|
WizardSmallImageFile={#PROJECTDIR}wizardsmallimage.bmp
|
|
|
|
SetupIconFile={#PROJECTDIR}..\..\data\icons\hexchat.ico
|
2012-12-26 03:49:21 +01:00
|
|
|
|
|
|
|
[Types]
|
|
|
|
Name: "normal"; Description: "Normal Installation"
|
|
|
|
Name: "minimal"; Description: "Minimal Installation"
|
|
|
|
Name: "custom"; Description: "Custom Installation"; Flags: iscustom
|
|
|
|
|
|
|
|
[Components]
|
|
|
|
Name: "libs"; Description: "HexChat"; Types: normal minimal custom; Flags: fixed
|
|
|
|
Name: "xctext"; Description: "HexChat-Text"; Types: custom; Flags: disablenouninstallwarning
|
2013-11-09 09:47:24 +01:00
|
|
|
Name: "xtm"; Description: "HexChat Theme Manager"; Types: normal custom; Flags: disablenouninstallwarning
|
2012-12-26 03:49:21 +01:00
|
|
|
Name: "translations"; Description: "Translations"; Types: normal custom; Flags: disablenouninstallwarning
|
2013-11-15 15:48:51 +01:00
|
|
|
Name: "spell"; Description: "Spelling Dictionaries"; Types: custom; Flags: disablenouninstallwarning
|
2012-12-26 03:49:21 +01:00
|
|
|
Name: "plugins"; Description: "Plugins"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "plugins\checksum"; Description: "Checksum"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "plugins\doat"; Description: "Do At"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "plugins\exec"; Description: "Exec"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "plugins\fishlim"; Description: "FiSHLiM"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "plugins\sysinfo"; Description: "SysInfo"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "plugins\upd"; Description: "Update Checker"; Types: normal custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "plugins\winamp"; Description: "Winamp"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning
|
2016-04-03 20:51:18 +02:00
|
|
|
Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouninstallwarning
|
2014-05-29 01:14:17 +02:00
|
|
|
Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning
|
2013-05-02 17:20:05 +02:00
|
|
|
Name: "langs\python"; Description: "Python Interface"; Types: custom; Flags: disablenouninstallwarning
|
|
|
|
Name: "langs\python\python2"; Description: "Python (requires Python 2.7)"; Types: custom; Flags: disablenouninstallwarning exclusive
|
2015-10-06 20:45:12 +02:00
|
|
|
Name: "langs\python\python3"; Description: "Python (requires Python 3.5)"; Types: custom; Flags: disablenouninstallwarning exclusive
|
2012-12-26 03:49:21 +01:00
|
|
|
|
|
|
|
[Tasks]
|
2013-11-16 21:37:41 +01:00
|
|
|
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
2012-12-26 03:49:21 +01:00
|
|
|
|
|
|
|
[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}\hexchat.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}\hexchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable
|
|
|
|
|
|
|
|
Root: HKCR; Subkey: ".hct"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Components:xtm; Tasks: not portable
|
|
|
|
Root: HKCR; Subkey: ".hct"; ValueType: string; ValueName: ""; ValueData: "HexChat Theme File"; Flags: uninsdeletevalue; Components:xtm; Tasks: not portable
|
|
|
|
Root: HKCR; Subkey: ".hct"; ValueType: string; ValueName: "HexChat Theme File"; ValueData: ""; Flags: uninsdeletevalue; Components:xtm; Tasks: not portable
|
|
|
|
Root: HKCR; Subkey: ".hct\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\thememan.exe,0"; Flags: uninsdeletevalue; Components:xtm; Tasks: not portable
|
|
|
|
Root: HKCR; Subkey: ".hct\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Components:xtm; Tasks: not portable
|
|
|
|
Root: HKCR; Subkey: ".hct\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\thememan.exe ""%1"""; Flags: uninsdeletevalue; Components:xtm; Tasks: not portable
|
|
|
|
|
|
|
|
[Run]
|
|
|
|
Filename: "{app}\hexchat.exe"; Description: "Run HexChat after closing the Wizard"; Flags: nowait postinstall skipifsilent
|
2013-04-02 03:33:12 +02:00
|
|
|
Filename: "http://docs.hexchat.org/en/latest/changelog.html"; Description: "See what's changed"; Flags: shellexec runasoriginaluser postinstall skipifsilent unchecked
|
2014-05-31 17:15:45 +02:00
|
|
|
Filename: "{tmp}\vcredist.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installing Visual C++ Redistributable"; Flags: skipifdoesntexist; Tasks: not portable
|
2013-11-09 09:47:24 +01:00
|
|
|
Filename: "{tmp}\dotnet4.exe"; Parameters: "/q /norestart"; StatusMsg: "Installing .NET"; Components: xtm; Flags: skipifdoesntexist; Tasks: not portable
|
2014-05-29 15:33:03 +02:00
|
|
|
Filename: "{tmp}\perl.msi"; StatusMsg: "Installing Perl"; Components: langs\perl; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
2013-11-09 09:47:24 +01:00
|
|
|
Filename: "{tmp}\python.msi"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
2015-10-06 20:45:12 +02:00
|
|
|
Filename: "{tmp}\python.exe"; Parameters: "InstallAllUsers=1 PrependPath=1"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
|
2013-11-15 15:48:51 +01:00
|
|
|
Filename: "{tmp}\spelling-dicts.exe"; Parameters: "/verysilent"; StatusMsg: "Installing Spelling Dictionaries"; Components: spell; Flags: skipifdoesntexist; Tasks: not portable
|
2012-12-26 03:49:21 +01:00
|
|
|
|
|
|
|
[Files]
|
|
|
|
Source: "portable-mode"; DestDir: "{app}"; Tasks: portable
|
|
|
|
|
|
|
|
Source: "changelog.url"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "readme.url"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "cert.pem"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs
|
2014-06-13 17:31:50 +02:00
|
|
|
Source: "share\doc\*"; DestDir: "{app}\share\doc"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs
|
2014-06-26 02:38:53 +02:00
|
|
|
Source: "share\themes\MS-Windows\*"; DestDir: "{app}\share\themes\MS-Windows"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs
|
2012-12-26 03:49:21 +01:00
|
|
|
Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations
|
|
|
|
|
|
|
|
Source: "atk-1.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "cairo.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "fontconfig.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "gdk_pixbuf-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "gdk-win32-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "gio-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "glib-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "gmodule-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "gobject-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
2014-12-02 22:12:48 +01:00
|
|
|
#if APPARCH == "x64"
|
|
|
|
Source: "gspawn-win64-helper.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "gspawn-win64-helper-console.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
#else
|
|
|
|
Source: "gspawn-win32-helper.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "gspawn-win32-helper-console.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
#endif
|
2012-12-26 03:49:21 +01:00
|
|
|
Source: "gthread-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "gtk-win32-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
2013-02-18 05:15:36 +01:00
|
|
|
Source: "harfbuzz.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
2012-12-26 03:49:21 +01:00
|
|
|
Source: "iconv.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "libenchant.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "libintl.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
2013-04-08 01:12:19 +02:00
|
|
|
Source: "libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
2012-12-26 03:49:21 +01:00
|
|
|
Source: "libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "pango-1.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "pangocairo-1.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "pangoft2-1.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "pangowin32-1.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "pixman-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
|
2015-02-03 01:35:49 +01:00
|
|
|
Source: "plugins\hcnotifications-winrt.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: libs
|
|
|
|
|
2015-02-21 03:58:31 +01:00
|
|
|
Source: "lib\enchant\*"; DestDir: "{app}\lib\enchant"; Flags: ignoreversion; Components: libs
|
2012-12-26 03:49:21 +01:00
|
|
|
|
2016-03-12 06:00:06 +01:00
|
|
|
Source: "lib\gtk-2.0\i686-pc-vs14\engines\*"; DestDir: "{app}\lib\gtk-2.0\i686-pc-vs14\engines"; Flags: ignoreversion; Components: libs
|
2012-12-26 03:49:21 +01:00
|
|
|
|
|
|
|
Source: "plugins\hcchecksum.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\checksum
|
|
|
|
Source: "plugins\hcdoat.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\doat
|
|
|
|
Source: "plugins\hcexec.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\exec
|
|
|
|
Source: "plugins\hcfishlim.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\fishlim
|
2013-04-14 10:15:52 +02:00
|
|
|
Source: "share\music.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\winamp or plugins\mpcinfo
|
2012-12-26 03:49:21 +01:00
|
|
|
Source: "plugins\hcmpcinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\mpcinfo
|
2013-04-14 10:15:52 +02:00
|
|
|
Source: "share\download.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\upd
|
2012-12-26 03:49:21 +01:00
|
|
|
Source: "plugins\hcupd.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\upd
|
2014-07-30 00:48:56 +02:00
|
|
|
Source: "WinSparkle.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: plugins\upd
|
2012-12-26 03:49:21 +01:00
|
|
|
Source: "plugins\hcwinamp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winamp
|
2013-04-14 10:15:52 +02:00
|
|
|
Source: "share\system.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\sysinfo
|
2012-12-26 03:49:21 +01:00
|
|
|
Source: "plugins\hcsysinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\sysinfo
|
|
|
|
|
2013-05-02 17:20:05 +02:00
|
|
|
Source: "plugins\hcpython2.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python\python2
|
|
|
|
Source: "plugins\hcpython3.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python\python3
|
2013-04-13 02:26:26 +02:00
|
|
|
Source: "plugins\hcperl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\perl
|
2016-04-03 20:51:18 +02:00
|
|
|
Source: "plugins\hclua.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\lua
|
2012-12-26 03:49:21 +01:00
|
|
|
|
|
|
|
Source: "hexchat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
|
|
|
Source: "hexchat-text.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xctext
|
|
|
|
Source: "thememan.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xtm
|
|
|
|
|
|
|
|
[Icons]
|
2015-02-03 01:35:49 +01:00
|
|
|
Name: "{group}\HexChat"; Filename: "{app}\hexchat.exe"; AppUserModelID: "HexChat.Desktop.Notify"; Tasks: not portable
|
2013-10-05 21:55:56 +02:00
|
|
|
Name: "{group}\HexChat Safe Mode"; Filename: "{app}\hexchat.exe"; Parameters: "--no-auto --no-plugins"; Tasks: not portable
|
|
|
|
Name: "{group}\HexChat ChangeLog"; Filename: "{app}\changelog.url"; IconFilename: "{sys}\shell32.dll"; IconIndex: 165; Tasks: not portable
|
|
|
|
Name: "{group}\HexChat ReadMe"; Filename: "{app}\readme.url"; IconFilename: "{sys}\shell32.dll"; IconIndex: 23; Tasks: not portable
|
|
|
|
Name: "{group}\HexChat Config Folder"; Filename: "%APPDATA%\HexChat\"; Tasks: not portable
|
|
|
|
Name: "{group}\HexChat-Text"; Filename: "{app}\hexchat-text.exe"; Components: xctext; Tasks: not portable
|
|
|
|
Name: "{group}\HexChat Theme Manager"; Filename: "{app}\thememan.exe"; Components: xtm; Tasks: not portable
|
|
|
|
Name: "{group}\Uninstall HexChat"; Filename: "{uninstallexe}"; Tasks: not portable
|
2012-12-26 03:49:21 +01:00
|
|
|
|
|
|
|
[Messages]
|
2013-10-05 21:55:56 +02:00
|
|
|
BeveledLabel= {#APPNAM}
|
2012-12-26 03:49:21 +01:00
|
|
|
|
|
|
|
[Code]
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
procedure InitializeWizard;
|
|
|
|
begin
|
|
|
|
WizardForm.LicenseAcceptedRadio.Checked := True;
|
2013-11-09 09:47:24 +01:00
|
|
|
|
|
|
|
idpDownloadAfter(wpReady);
|
|
|
|
end;
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
function GetSysDir(): String;
|
|
|
|
begin
|
|
|
|
#if APPARCH != "x64"
|
|
|
|
if IsWin64 then
|
|
|
|
Result := ExpandConstant('{syswow64}\')
|
|
|
|
else
|
|
|
|
Result := ExpandConstant('{sys}\');
|
|
|
|
#else
|
|
|
|
Result := ExpandConstant('{sys}\');
|
|
|
|
#endif
|
2012-12-26 03:49:21 +01:00
|
|
|
end;
|
|
|
|
|
2013-11-09 09:47:24 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
function CheckDLL(DLLName: String): Boolean;
|
|
|
|
var
|
|
|
|
ResultCode: Integer;
|
|
|
|
begin
|
|
|
|
if ExecAsOriginalUser(GetSysDir() + 'where.exe', '/Q ' + DLLName,
|
|
|
|
'', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
|
|
|
Result := ResultCode = 0 // 0 is success
|
|
|
|
else
|
|
|
|
Result := False;
|
|
|
|
end;
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
function CheckVCInstall(): Boolean;
|
|
|
|
begin
|
2015-11-26 09:05:38 +01:00
|
|
|
Result := FileExists(GetSysDir() + 'vcruntime140.dll');;
|
2013-11-09 09:47:24 +01:00
|
|
|
end;
|
|
|
|
|
2013-11-15 15:48:51 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
function CheckSpellInstall(): Boolean;
|
2015-02-22 06:20:26 +01:00
|
|
|
var
|
|
|
|
Version: TWindowsVersion;
|
2013-11-15 15:48:51 +01:00
|
|
|
begin
|
2015-02-22 06:20:26 +01:00
|
|
|
GetWindowsVersionEx(Version);
|
|
|
|
|
|
|
|
// Windows 8 or greater has built in spell check.
|
|
|
|
if Version.NTPlatform and (Version.Major > 6) or ((Version.Major = 6) and (Version.Minor > 1)) then
|
|
|
|
Result := True
|
|
|
|
else
|
|
|
|
Result := DirExists(ExpandConstant('{localappdata}') + '\enchant\myspell');
|
2013-11-15 15:48:51 +01:00
|
|
|
end;
|
|
|
|
|
2013-11-09 09:47:24 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
function CheckDotNetInstall(): Boolean;
|
|
|
|
begin
|
|
|
|
Result := RegKeyExists(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4');
|
|
|
|
end;
|
|
|
|
|
2013-11-16 21:37:41 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// Sets up the automatic downloads
|
2013-11-09 09:47:24 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
procedure CurPageChanged(CurPageID: Integer);
|
|
|
|
var
|
|
|
|
REDIST: String;
|
|
|
|
PERL: String;
|
|
|
|
PY2: String;
|
|
|
|
PY3: String;
|
|
|
|
DOTNET: String;
|
2013-11-15 15:48:51 +01:00
|
|
|
SPELL: String;
|
2013-11-09 09:47:24 +01:00
|
|
|
begin
|
2013-11-16 21:37:41 +01:00
|
|
|
if(CurPageID = wpReady) then
|
2013-11-09 09:47:24 +01:00
|
|
|
begin
|
|
|
|
idpClearFiles;
|
2014-06-26 02:38:53 +02:00
|
|
|
|
2013-11-16 21:37:41 +01:00
|
|
|
if not IsTaskSelected('portable') then
|
|
|
|
begin
|
2014-06-26 02:38:53 +02:00
|
|
|
|
2013-11-09 09:47:24 +01:00
|
|
|
#if APPARCH == "x64"
|
2015-10-11 16:14:23 +02:00
|
|
|
REDIST := 'https://dl.hexchat.net/misc/vcredist_2015_x64.exe';
|
2015-02-11 13:59:48 +01:00
|
|
|
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x64.msi';
|
2016-03-28 11:10:08 +02:00
|
|
|
PY2 := 'https://python.org/ftp/python/2.7.10/python-2.7.10.amd64.msi';
|
|
|
|
PY3 := 'https://python.org/ftp/python/3.5.1/python-3.5.1-amd64.exe';
|
2013-11-09 09:47:24 +01:00
|
|
|
#else
|
2015-10-11 16:14:23 +02:00
|
|
|
REDIST := 'https://dl.hexchat.net/misc/vcredist_2015_x86.exe';
|
2015-02-11 13:59:48 +01:00
|
|
|
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x86.msi';
|
2016-03-28 11:10:08 +02:00
|
|
|
PY2 := 'https://python.org/ftp/python/2.7.10/python-2.7.10.msi';
|
|
|
|
PY3 := 'https://python.org/ftp/python/3.5.1/python-3.5.1.exe';
|
2013-11-09 09:47:24 +01:00
|
|
|
#endif
|
2015-02-11 13:59:48 +01:00
|
|
|
DOTNET := 'https://dl.hexchat.net/misc/dotnet_40.exe';
|
|
|
|
SPELL := 'https://dl.hexchat.net/hexchat/HexChat%20Spelling%20Dictionaries%20r2.exe';
|
2013-11-16 21:37:41 +01:00
|
|
|
|
|
|
|
if not CheckVCInstall() then
|
|
|
|
idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe'));
|
|
|
|
|
|
|
|
if IsComponentSelected('xtm') and not CheckDotNetInstall() then
|
|
|
|
idpAddFile(DOTNET, ExpandConstant('{tmp}\dotnet4.exe'));
|
|
|
|
|
|
|
|
if IsComponentSelected('spell') and not CheckSpellInstall() then
|
|
|
|
idpAddFile(SPELL, ExpandConstant('{tmp}\spelling-dicts.exe'));
|
2014-06-26 02:38:53 +02:00
|
|
|
|
2014-06-28 01:10:55 +02:00
|
|
|
if not WizardSilent() then
|
|
|
|
begin
|
|
|
|
if IsComponentSelected('langs\perl') and not CheckDLL('perl520.dll') then
|
|
|
|
idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi'));
|
2014-06-26 02:38:53 +02:00
|
|
|
|
2014-06-28 01:10:55 +02:00
|
|
|
if IsComponentSelected('langs\python\python2') and not CheckDLL('python27.dll') then
|
|
|
|
idpAddFile(PY2, ExpandConstant('{tmp}\python.msi'));
|
2014-06-26 02:38:53 +02:00
|
|
|
|
2015-10-06 20:45:12 +02:00
|
|
|
if IsComponentSelected('langs\python\python3') and not CheckDLL('python35.dll') then
|
|
|
|
idpAddFile(PY3, ExpandConstant('{tmp}\python.exe'));
|
2014-06-28 01:10:55 +02:00
|
|
|
end;
|
2013-11-16 21:37:41 +01:00
|
|
|
end;
|
2013-11-09 09:47:24 +01:00
|
|
|
end;
|
|
|
|
end;
|
2012-12-26 03:49:21 +01:00
|
|
|
|
2013-11-16 21:37:41 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// Disable portable-mode if installing to program files
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
function NextButtonClick(CurPageID: Integer): Boolean;
|
|
|
|
begin
|
|
|
|
if (CurPageID = wpSelectTasks) then
|
|
|
|
if (WizardForm.TasksList.Checked[1] = True) then
|
|
|
|
#if APPARCH == "x64"
|
|
|
|
if (WizardDirValue() = ExpandConstant('{pf64}\HexChat')) then
|
|
|
|
#else
|
|
|
|
if (WizardDirValue() = ExpandConstant('{pf32}\HexChat')) then
|
|
|
|
#endif
|
|
|
|
begin
|
|
|
|
WizardForm.TasksList.Checked[1] := False
|
|
|
|
MsgBox('Portable mode is only intended for use on portable drives and has been disabled.', mbInformation, MB_OK)
|
|
|
|
end;
|
|
|
|
|
|
|
|
Result := True; // Always continue
|
|
|
|
end;
|
|
|
|
|
2012-12-26 03:49:21 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// these are required for x86->x64 or reverse upgrades
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
function GetUninstallString(): String;
|
|
|
|
var
|
|
|
|
sUnInstPath: String;
|
|
|
|
sUnInstallString: String;
|
|
|
|
begin
|
2013-10-05 21:55:56 +02:00
|
|
|
#if APPARCH == "x64"
|
2012-12-26 03:49:21 +01:00
|
|
|
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\HexChat (x64)_is1');
|
2013-10-05 21:55:56 +02:00
|
|
|
#else
|
|
|
|
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\HexChat (x86)_is1');
|
|
|
|
#endif
|
2012-12-26 03:49:21 +01:00
|
|
|
sUnInstallString := '';
|
|
|
|
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
|
|
|
|
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
|
2013-10-05 21:55:56 +02:00
|
|
|
if not (sUnInstallString <> '') then
|
|
|
|
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\HexChat_is1');
|
|
|
|
if not RegQueryStringValue(HKLM32, sUnInstPath, 'UninstallString', sUnInstallString) then
|
2013-10-12 19:36:43 +02:00
|
|
|
if not RegQueryStringValue(HKCU32, sUnInstPath, 'UninstallString', sUnInstallString) then
|
|
|
|
if IsWin64 then
|
|
|
|
if not RegQueryStringValue(HKLM64, sUnInstPath, 'UninstallString', sUnInstallString) then
|
|
|
|
RegQueryStringValue(HKCU64, sUnInstPath, 'UninstallString', sUnInstallString);
|
2012-12-26 03:49:21 +01:00
|
|
|
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);
|
2014-06-28 01:10:55 +02:00
|
|
|
if Exec(sUnInstallString, '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
|
2012-12-26 03:49:21 +01:00
|
|
|
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;
|
|
|
|
DeleteFile(ExpandConstant('{app}\portable-mode'));
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
end;
|