mirror of
https://github.com/moparisthebest/hexchat
synced 2025-02-16 15:20:11 -05:00
win32: Improvements to portable-mode in installer
This commit is contained in:
parent
9834301eda
commit
5c872eb110
@ -80,7 +80,7 @@ Name: "langs\python\python2"; Description: "Python (requires Python 2.7)"; Types
|
|||||||
Name: "langs\python\python3"; Description: "Python (requires Python 3.3)"; Types: custom; Flags: disablenouninstallwarning exclusive
|
Name: "langs\python\python3"; Description: "Python (requires Python 3.3)"; Types: custom; Flags: disablenouninstallwarning exclusive
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked
|
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable
|
Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable
|
||||||
@ -233,6 +233,8 @@ begin
|
|||||||
Result := RegKeyExists(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4');
|
Result := RegKeyExists(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// Sets up the automatic downloads
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
procedure CurPageChanged(CurPageID: Integer);
|
procedure CurPageChanged(CurPageID: Integer);
|
||||||
var
|
var
|
||||||
@ -243,44 +245,68 @@ var
|
|||||||
DOTNET: String;
|
DOTNET: String;
|
||||||
SPELL: String;
|
SPELL: String;
|
||||||
begin
|
begin
|
||||||
if not IsTaskSelected('portable') and (CurPageID = wpReady) then
|
if(CurPageID = wpReady) then
|
||||||
begin
|
begin
|
||||||
idpClearFiles;
|
idpClearFiles;
|
||||||
|
|
||||||
|
if not IsTaskSelected('portable') then
|
||||||
|
begin
|
||||||
|
|
||||||
#if APPARCH == "x64"
|
#if APPARCH == "x64"
|
||||||
REDIST := 'http://dl.hexchat.net/misc/vcredist_2013_x64.exe';
|
REDIST := 'http://dl.hexchat.net/misc/vcredist_2013_x64.exe';
|
||||||
PERL := 'http://dl.hexchat.net/misc/perl/Perl%205.18.0%20x64.msi';
|
PERL := 'http://dl.hexchat.net/misc/perl/Perl%205.18.0%20x64.msi';
|
||||||
PY2 := 'http://python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi';
|
PY2 := 'http://python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi';
|
||||||
PY3 := 'http://python.org/ftp/python/3.3.2/python-3.3.2.amd64.msi';
|
PY3 := 'http://python.org/ftp/python/3.3.2/python-3.3.2.amd64.msi';
|
||||||
#else
|
#else
|
||||||
REDIST := 'http://dl.hexchat.net/misc/vcredist_2013_x86.exe';
|
REDIST := 'http://dl.hexchat.net/misc/vcredist_2013_x86.exe';
|
||||||
PERL := 'http://dl.hexchat.net/misc/perl/Perl%205.18.0%20x86.msi';
|
PERL := 'http://dl.hexchat.net/misc/perl/Perl%205.18.0%20x86.msi';
|
||||||
PY2 := 'http://python.org/ftp/python/2.7.5/python-2.7.5.msi';
|
PY2 := 'http://python.org/ftp/python/2.7.5/python-2.7.5.msi';
|
||||||
PY3 := 'http://python.org/ftp/python/3.3.2/python-3.3.2.msi';
|
PY3 := 'http://python.org/ftp/python/3.3.2/python-3.3.2.msi';
|
||||||
#endif
|
#endif
|
||||||
DOTNET := 'http://dl.hexchat.net/misc/dotnet_40.exe';
|
DOTNET := 'http://dl.hexchat.net/misc/dotnet_40.exe';
|
||||||
SPELL := 'http://dl.hexchat.net/hexchat/HexChat%20Spelling%20Dictionaries%20r2.exe';
|
SPELL := 'http://dl.hexchat.net/hexchat/HexChat%20Spelling%20Dictionaries%20r2.exe';
|
||||||
|
|
||||||
if not CheckVCInstall() then
|
if not CheckVCInstall() then
|
||||||
idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe'));
|
idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe'));
|
||||||
|
|
||||||
if IsComponentSelected('xtm') and not CheckDotNetInstall() then
|
if IsComponentSelected('xtm') and not CheckDotNetInstall() then
|
||||||
idpAddFile(DOTNET, ExpandConstant('{tmp}\dotnet4.exe'));
|
idpAddFile(DOTNET, ExpandConstant('{tmp}\dotnet4.exe'));
|
||||||
|
|
||||||
if IsComponentSelected('spell') and not CheckSpellInstall() then
|
if IsComponentSelected('spell') and not CheckSpellInstall() then
|
||||||
idpAddFile(SPELL, ExpandConstant('{tmp}\spelling-dicts.exe'));
|
idpAddFile(SPELL, ExpandConstant('{tmp}\spelling-dicts.exe'));
|
||||||
|
|
||||||
if IsComponentSelected('langs\perl') and not CheckDLL('perl518.dll') then
|
if IsComponentSelected('langs\perl') and not CheckDLL('perl518.dll') then
|
||||||
idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi'));
|
idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi'));
|
||||||
|
|
||||||
if IsComponentSelected('langs\python\python2') and not CheckDLL('python27.dll') then
|
if IsComponentSelected('langs\python\python2') and not CheckDLL('python27.dll') then
|
||||||
idpAddFile(PY2, ExpandConstant('{tmp}\python.msi'));
|
idpAddFile(PY2, ExpandConstant('{tmp}\python.msi'));
|
||||||
|
|
||||||
if IsComponentSelected('langs\python\python3') and not CheckDLL('python33.dll') then
|
if IsComponentSelected('langs\python\python3') and not CheckDLL('python33.dll') then
|
||||||
idpAddFile(PY3, ExpandConstant('{tmp}\python.msi'));
|
idpAddFile(PY3, ExpandConstant('{tmp}\python.msi'));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// 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;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
// these are required for x86->x64 or reverse upgrades
|
// these are required for x86->x64 or reverse upgrades
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user