就像我在Inno Setup: How to manipulate progress bar on Run section?中的问题一样,Martin Prikryl 给了我一个很好的建议,我想在注册部分做同样的事情(改变进度条的样式),我的意思是,就在 Run
部分之前,当 Inno Setup 注册时DLL/OCX([Files]
中的regserver
标志)。
我尝试使用一些 PageID
使其工作,我认为是 wpInstalling
一个,将它与值变为 100 时的值进行比较,它变为选框样式,但我没有让它起作用。
非常感谢。
最佳答案
注册前没有触发事件。
最接近的是使用 AfterInstall
parameter 最后安装的文件(不是 .dll):
[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;
关于installation - Inno 安装程序 : How to manipulate progress bar on Registering section?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34590420/