Inno Setup:如何操作注册部分的进度条?
Inno Setup: How to manipulate progress bar on Registering section?
就像我在 中的问题一样,Martin Prikryl 给了我一个很好的建议,我想在注册部分做同样的事情(改变进度条的样式),我的意思是,就在之前Run
部分,当 Inno Setup 注册 DLL/OCX 时([Files]
中的 regserver
标志)。
我尝试使用一些 PageID
来让它工作,我认为是 wpInstalling
一个,将它与当它的值达到 100 时相比,它变为 Marquee 样式,但是我没有成功。
非常感谢。
注册前没有触发事件。
最接近的是使用 最后安装的文件 (不是 .dll)的 AfterInstall
parameter:
[Files]
Source: "mydll.dll"; DestDir: "{app}"; Flags: regserver
Source: "myfile1"; DestDir: "{app}"
Source: "myfile2"; DestDir: "{app}"
...
Source: "myfileN"; DestDir: "{app}"; AfterInstall: AfterLastFileInstall
[Code]
procedure AfterLastFileInstall;
begin
Log('Last file installed, file registration is starting');
WizardForm.ProgressGauge.Style := npbstMarquee;
end;
另一种选择是处理 CurInstallProgressChanged
event 并等待 CurProgress
= MaxProgress
:
[Code]
procedure CurInstallProgressChanged(CurProgress, MaxProgress: Integer);
begin
if CurProgress >= MaxProgress then
begin
Log('Everything is installed, file registration is starting');
WizardForm.ProgressGauge.Style := npbstMarquee;
end;
end;
就像我在 Run
部分,当 Inno Setup 注册 DLL/OCX 时([Files]
中的 regserver
标志)。
我尝试使用一些 PageID
来让它工作,我认为是 wpInstalling
一个,将它与当它的值达到 100 时相比,它变为 Marquee 样式,但是我没有成功。
非常感谢。
注册前没有触发事件。
最接近的是使用 最后安装的文件 (不是 .dll)的 AfterInstall
parameter:
[Files]
Source: "mydll.dll"; DestDir: "{app}"; Flags: regserver
Source: "myfile1"; DestDir: "{app}"
Source: "myfile2"; DestDir: "{app}"
...
Source: "myfileN"; DestDir: "{app}"; AfterInstall: AfterLastFileInstall
[Code]
procedure AfterLastFileInstall;
begin
Log('Last file installed, file registration is starting');
WizardForm.ProgressGauge.Style := npbstMarquee;
end;
另一种选择是处理 CurInstallProgressChanged
event 并等待 CurProgress
= MaxProgress
:
[Code]
procedure CurInstallProgressChanged(CurProgress, MaxProgress: Integer);
begin
if CurProgress >= MaxProgress then
begin
Log('Everything is installed, file registration is starting');
WizardForm.ProgressGauge.Style := npbstMarquee;
end;
end;