mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:45:22 +00:00
Installer: Refactor url opening
This commit is contained in:
parent
74f6f05b86
commit
d641d4596a
@ -125,9 +125,9 @@ begin
|
|||||||
Result := ActiveLanguage;
|
Result := ActiveLanguage;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetUninstallString(): string;
|
function GetUninstallString(): String;
|
||||||
var
|
var
|
||||||
UninstallKey: string;
|
UninstallKey: String;
|
||||||
begin
|
begin
|
||||||
UninstallKey := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppName")}_is1');
|
UninstallKey := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppName")}_is1');
|
||||||
if not RegQueryStringValue(HKLM, UninstallKey, 'UninstallString', Result) then
|
if not RegQueryStringValue(HKLM, UninstallKey, 'UninstallString', Result) then
|
||||||
@ -320,6 +320,13 @@ begin
|
|||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function OpenUrl(Url: String): Boolean;
|
||||||
|
var
|
||||||
|
ErrCode: Integer;
|
||||||
|
begin
|
||||||
|
Result := ShellExec('open', Url, '', '', SW_SHOW, ewNoWait, ErrCode);
|
||||||
|
end;
|
||||||
|
|
||||||
function InitializeSetup: Boolean;
|
function InitializeSetup: Boolean;
|
||||||
begin
|
begin
|
||||||
if Unpack() then
|
if Unpack() then
|
||||||
@ -350,12 +357,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
#else
|
#else
|
||||||
if not VCRedist86Exists() then
|
if not VCRedist86Exists() then
|
||||||
var
|
|
||||||
ErrorCode: Integer;
|
|
||||||
begin
|
begin
|
||||||
if SuppressibleMsgBox('{cm:InstallVCRedist}', mbCriticalError, MB_OKCANCEL, IDCANCEL) = IDOK then
|
if SuppressibleMsgBox(ExpandConstant('{cm:InstallVCRedist}'), mbCriticalError, MB_OKCANCEL, IDCANCEL) = IDOK then
|
||||||
ShellExec('open', 'https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads',
|
OpenUrl('https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads');
|
||||||
'', '', SW_SHOW, ewNoWait, ErrCode);
|
|
||||||
|
|
||||||
Result := False;
|
Result := False;
|
||||||
Exit;
|
Exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user