Improve installer extraction, login failures, and upload handling
This commit is contained in:
@@ -160,7 +160,8 @@ Name: "autostart"; Description: "{cm:AutoStart}"; GroupDescription: "{cm:Startup
|
||||
Name: "launchapp"; Description: "{cm:LaunchApp}"; GroupDescription: "{cm:StartupGroup}"; Flags: checkedonce
|
||||
|
||||
[Files]
|
||||
Source: "{#PayloadDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: LogCurrentExtractFile
|
||||
Source: "{#PayloadDir}\*"; DestDir: "{app}"; Excludes: "*.pri"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: LogCurrentExtractFile
|
||||
Source: "{#PayloadDir}\*.pri"; DestDir: "{app}"; Attribs: hidden; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: LogCurrentExtractFile
|
||||
#if Int(BundleVCRedist) == 1
|
||||
Source: "{#PayloadDir}\prereqs\vc_redist.x64.exe"; Flags: dontcopy
|
||||
#endif
|
||||
@@ -259,6 +260,7 @@ var
|
||||
InstallOutputLineCount: Integer;
|
||||
InstallOutputPendingLineCount: Integer;
|
||||
InstallOutputBuffer: string;
|
||||
LastExtractFileName: string;
|
||||
|
||||
function SendMessage(hWnd: Longint; Msg: Longint; wParam: Longint; lParam: Longint): Longint;
|
||||
external 'SendMessageW@user32.dll stdcall';
|
||||
@@ -493,7 +495,10 @@ var
|
||||
begin
|
||||
FileName := ExpandConstant(CurrentFileName);
|
||||
if FileName <> '' then
|
||||
begin
|
||||
LastExtractFileName := FileName;
|
||||
QueueInstallOutput(CustomMessage('InstallOutputFile') + ' ' + FileName, False, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
function SelectedTaskText(const TaskName, LabelText: string): string;
|
||||
@@ -784,7 +789,8 @@ begin
|
||||
RaiseException(FormatCustomMessage2('DependencyDownloadFailed', FriendlyName, 'downloaded file is missing'));
|
||||
|
||||
LogBootstrapEvent('DEPENDENCY', 'install|' + FriendlyName);
|
||||
if not Exec(ExecutablePath, Arguments, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
||||
LogBootstrapEvent('DEPENDENCY', 'waiting|' + FriendlyName);
|
||||
if not Exec(ExecutablePath, Arguments, '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
|
||||
RaiseException(FormatCustomMessage('DependencyStartFailed', FriendlyName));
|
||||
|
||||
if (ResultCode <> 0) and (ResultCode <> 1638) and (ResultCode <> 3010) and (ResultCode <> 1641) then
|
||||
@@ -975,7 +981,7 @@ begin
|
||||
begin
|
||||
AcquireAndInstallPrerequisite(
|
||||
'{#WebView2BootstrapperUrl}', 'MicrosoftEdgeWebView2Setup.exe',
|
||||
'MicrosoftEdgeWebView2RuntimeInstallerX64.exe', '/silent /install',
|
||||
'MicrosoftEdgeWebView2RuntimeInstallerX64.exe', '/install',
|
||||
GetCustomMessageValue('WebView2RuntimeName'), BundledWebView2Included = 1, NeedsRestart);
|
||||
|
||||
if not WaitForWebView2Installed(60) then
|
||||
@@ -991,7 +997,7 @@ begin
|
||||
begin
|
||||
AcquireAndInstallPrerequisite(
|
||||
'{#VCRedistUrl}', 'vc_redist.x64.exe', 'vc_redist.x64.exe',
|
||||
'/install /quiet /norestart', GetCustomMessageValue('VCRuntimeName'),
|
||||
'/install /norestart', GetCustomMessageValue('VCRuntimeName'),
|
||||
BundledVCRedistIncluded = 1, NeedsRestart);
|
||||
|
||||
if not WaitForVCRedistInstalled(10) then
|
||||
@@ -1016,6 +1022,7 @@ begin
|
||||
if CurStep = ssInstall then
|
||||
begin
|
||||
LastInstallProgressPercent := -1;
|
||||
LastExtractFileName := '';
|
||||
LogBootstrapEvent('STAGE', 'files');
|
||||
AppendInstallOutput(CustomMessage('InstallOutputClean'));
|
||||
CleanLegacyInstallLayout();
|
||||
@@ -1044,7 +1051,7 @@ begin
|
||||
if LastInstallProgressPercent <> 100 then
|
||||
begin
|
||||
LastInstallProgressPercent := 100;
|
||||
LogBootstrapEvent('PROGRESS', '100|' + ExpandConstant(CurrentFileName));
|
||||
LogBootstrapEvent('PROGRESS', '100|' + LastExtractFileName);
|
||||
FlushInstallOutput();
|
||||
end;
|
||||
Exit;
|
||||
@@ -1056,7 +1063,7 @@ begin
|
||||
if ProgressPercent <> LastInstallProgressPercent then
|
||||
begin
|
||||
LastInstallProgressPercent := ProgressPercent;
|
||||
LogBootstrapEvent('PROGRESS', IntToStr(ProgressPercent) + '|' + ExpandConstant(CurrentFileName));
|
||||
LogBootstrapEvent('PROGRESS', IntToStr(ProgressPercent) + '|' + LastExtractFileName);
|
||||
FlushInstallOutput();
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user