Inno Setup:如何在注册部分操作进度条?

3
就像我在Inno Setup: How to manipulate progress bar on Run section?中提出的问题一样,Martin Prikryl给了我一个很好的建议,我想在注册部分做同样的事情(更改进度条的样式),也就是在Run部分之前,当Inno Setup注册DLL / OCX([Files]中的regserver标志)时。

我尝试使用一些PageID来使它工作,我认为其中之一是wpInstalling,与它的值变为100时,它会更改为Marquee样式,但我没有成功。

非常感谢。

1个回答

3

在注册之前没有触发的事件。


你最接近的方法是使用最后安装的文件(而不是.dll)的AfterInstall参数
[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事件并等待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;

马丁,再次感谢。我使用了CurInstallProgressChanged过程。 - KurayamiArai

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接