【发布时间】:2017-01-09 14:16:51
【问题描述】:
我已经制作了自定义页面来管理特定的 redist 工具安装,具体取决于用户的选择。
如果用户想要或不安装这些工具,这些工具会链接到用户选中的复选框。 然后只在那里出现一个页面,向用户显示每个工具的安装进度。
我在这里遇到的问题是进度页面仅在工具设置的第一个ExtractTemporaryFile 完成时显示,显示最后一页好像它已冻结。
在ExtractTemporaryFile 发生之前,我必须让进度页面显示的唯一方法是在任何安装功能之前放置一个MsgBox。
但即使在这种情况下,当ExtractTemporaryFile 启动时,进度条动画也会冻结,直到ExtractTemporaryFile 完成...
这是执行此操作的代码部分:
procedure CurPageChanged(CurPageID: Integer);
begin
If CurPageID=PageInstallationPersonnalisee.ID then
begin
ProgressBarLabelPageInstPerso.Caption := 'Initialisation...';
if InstallTool1 = True then
begin
ProgressBarLabelPageInstPerso.Caption := 'Installing InstallTool1...';
F_InstallTool1();
end;
if InstallTool2 = True then
begin
ProgressBarLabelPageInstPerso.Caption := 'Installing InstallTool2...';
F_InstallTool2();
end;
if InstallTool3 = True then
begin
ProgressBarLabelPageInstPerso.Caption := 'Installing InstallTool3...';
F_InstallTool3();
end;
ProgressBarPageInstPerso.Style := npbstMarquee;
//ProgressBarPageInstPerso.Style := npbstNormal;
ProgressBarPageInstPerso.Position := 100;
CancelWithoutPrompt:=True;
WizardForm.Close;
end;
end;
请注意,ExtractTemporaryFile() 是在每个 F_InstallTooln() 函数中生成的。
设置和文件部分的其他部分可能会有所帮助:
[Setup]
SolidCompression=no
[Files]
;Temporary redists
Source: "{#MyRessourcesPath}InstallTool1_Setup.exe"; DestDir: "{tmp}"; \
Flags: deleteafterinstall noencryption dontcopy
Source: "{#MyRessourcesPath}InstallTool2_Setup.exe"; DestDir: "{tmp}"; \
Flags: deleteafterinstall noencryption dontcopy
Source: "{#MyRessourcesPath}InstallTool3_Setup.exe"; DestDir: "{tmp}"; \
Flags: deleteafterinstall noencryption dontcopy
在这里,页面PageInstallationPersonnalisee 直到第一个ExtractTemporaryFile 完成后才会显示...
我知道ExtractTemporaryFile 可能会导致安装过程出现一些延迟,但为什么会导致向导冻结?
所以我的问题是:在我的场景中,有没有办法强制向导刷新,以便他在任何ExtractTemporaryFile 程序启动之前出现?
【问题讨论】:
标签: installation inno-setup freeze pascalscript