문제 설명
하위 설치 다운로드 및 실행 ‑ Inno Download Plugin 다운로드 중에 진행률 표시줄이 이동하지 않음 (Download and run sub install ‑ Inno Download Plugin progress bar does not move during download)
그래서 다음 iss를 만들었지만 진행률 표시줄이 움직이지 않습니다. 설치 파일을 다운로드하여 다른 설치 프로그램을 실행하고 싶습니다. 진행률 표시줄이 움직이지 않는 것을 제외하고는 모든 것이 잘 작동합니다.
#define MyAppName "My Program Setup Downloader"
#define MySetupAppName "My Program Setup.exe"
#define MySetupUrlFolder "https://www.example.com/folder/"
#pragma include __INCLUDE__ + ";" + "c:\Program Files (x86)\Inno Download Plugin\"
[Setup]
AppName={#MyAppName}
AppVerName={#MyAppName}
DisableReadyPage=yes
DisableFinishedPage=yes
CreateAppDir=no
Uninstallable=no
#include <idp.iss>
[Code]
var FileName: string;
procedure InitializeWizard;
var DownloadUrl: String;
begin
FileName := ExpandConstant('{tmp}\{#MySetupAppName}');
DownloadUrl := '{#MySetupUrlFolder}{#MySetupAppName}';
idpAddFile(DownloadUrl, FileName);
idpDownloadAfter(wpSelectDir);
end;
function NextButtonClick(CurPageID: Integer) : boolean;
var ResultCode: Integer;
begin
if CurPageID = IDPForm.Page.ID then
begin
Result := Exec(FileName, '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
if not Result then MsgBox('Error Running Downloaded Setup File', mbError, MB_OK);
Result := True;
end
else Result := True;
end;
아이디어가 있습니까? 다른 모든 것은 잘 작동합니다.
편집: 세부 정보 섹션을 표시하는 해결 방법이 있습니다. 어쨌든 이것이 더 적절할 수 있습니다. 전체 진행 상황이 업데이트되지 않는 이유를 여전히 모르겠습니다.
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = IDPForm.Page.ID then
begin
idpShowDetails(True);
IDPForm.TotalProgressBar.Visible := false;
IDPForm.TotalProgressLabel.Visible := false;
IDPForm.TotalDownloaded.Visible := false;
IDPForm.CurrentFileLabel.Caption := 'Downloading...';
IDPForm.DetailsButton.Visible := False;
WizardForm.NextButton.Visible := False;
WizardForm.PageNameLabel.Caption := 'Downloading Setup File';
WizardForm.PageDescriptionLabel.Caption := 'Please wait while the Setup file is being downloaded.';
end;
end;
참조 솔루션
방법 1:
I indeed get the same behavior. I do not understand why.
But as you have a single file, you can replace the total progress bar with file progress bar:
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = IDPForm.Page.ID then
begin
IDPForm.TotalProgressBar.Visible := False;
IDPForm.FileProgressBar.Top := IDPForm.TotalProgressBar.Top;
IDPForm.FileProgressBar.Visible := True;
IDPForm.DetailsButton.Visible := False;
IDPForm.DetailsVisible := True;
end;
end;
(by user1819780、Martin Prikryl)