inno-setup – Inno Setup – 避免显示子安装程序的文件名
|
我试图使用
Inno Setup – How to hide certain filenames while installing? (FilenameLabel)的想法
但是我要隐藏的文件在[Run]部分中使用: [Files]
Source: "_RedistDXWebSetup.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
[Run]
Filename: "{tmp}DXWebSetup.exe"; Components: DirectX; StatusMsg: "Installing DirectX...";
BeforeInstall: StartWaitingForDirectXWindow; AfterInstall: StopWaitingForDirectXWindow
如何使用[Files]部分,ExtractTemporaryFile和FileCopy函数隐藏(在filenamelabel中安装时)? 解决方法
最简单的是放弃标准的[文件]和[运行]部分,并在
CurStepChanged event fuction中自行编码:
[Files]
Source: "dxwebsetup.exe"; Flags: dontcopy
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
ProgressPage: TOutputProgressWizardPage;
ResultCode: Integer;
begin
if CurStep = ssInstall then { or maybe ssPostInstall }
begin
if IsComponentSelected('DirectX') then
begin
ProgressPage := CreateOutputProgressPage('Installing prerequsities','');
ProgressPage.SetText('Installing DirectX...','');
ProgressPage.Show;
try
ExtractTemporaryFile('dxwebsetup.exe');
StartWaitingForDirectXWindow;
Exec(ExpandConstant('{tmp}dxwebsetup.exe'),'',SW_SHOW,ewWaitUntilTerminated,ResultCode);
finally
StopWaitingForDirectXWindow;
ProgressPage.Hide;
end;
end;
end;
end;
这甚至让您有机会检查子安装程序的结果.你可以,例如当子安装程序失败或被取消时,防止安装继续. 然后使用 另一种选择是在提取子安装程序时显示自定义标签. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
