【发布时间】:2016-03-30 16:02:11
【问题描述】:
在 Inno Setup wpInstalling 页面中,如何防止 [Files] 部分中定义的文件的初始提取将进度条设置为(几乎)100%?
我的安装脚本主要包括从“[运行]”部分安装一些第三方安装文件。示例如下:
[Run]
Filename: "{tmp}\vcredist_x86-2010-sp1.exe"; Parameters: "/q /norestart"; Check: InstallVCRedist; BeforeInstall: UpdateProgress(10, 'Installing Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219...');
Filename: "{tmp}\openfire_3_8_1.exe"; Check: InstallOpenFire; BeforeInstall: UpdateProgress(25, 'Installing OpenFire 3.8.1...');
Filename: "{tmp}\postgresql-8.4.16-2-windows.exe"; Parameters: "--mode unattended --unattendedmodeui none --datadir ""{commonappdata}\PostgreSQL\8.4\data"" --install_runtimes 0"; Check: InstallPostgreSQL; BeforeInstall: UpdateProgress(35, 'Installing PostgreSQL 8.4...'); AfterInstall: UpdateProgress(50, 'Setting up database...');
安装这些第三方组件所需的时间比安装的任何其他部分都要长(到目前为止),但不幸的是,在这些文件的初始提取过程中,进度条从 0% 变为接近 100%。然后,我可以使用以下过程将进度条重置为我选择的数量:
procedure UpdateProgress(Position: Integer; StatusMsg: String);
begin
WizardForm.StatusLabel.Caption := StatusMsg;
WizardForm.ProgressGauge.Position := Position * WizardForm.ProgressGauge.Max div 100;
end;
不过,理想情况下,我希望初始提取率从 0-10%(大约)变为更接近实际发生的情况。
是否有任何事件可以捕获文件提取的进度,或者有一种方法可以防止或阻止文件提取更新进度条?
【问题讨论】:
标签: installation inno-setup pascalscript