我想知道如何在设置时创建所选组件的日志。
我已经上网找到它,但没有任何成功。
最佳答案
要打印出用户选择的组件,您需要迭代 ComponentsList
检查列表框,检查项目是否处于选中状态,如果是,则打印其属性,很可能是 ItemCaption
.以下脚本显示了如何将所选组件记录为简单列表:
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
I: Integer;
begin
if CurStep = ssInstall then
begin
Log('Selected components:');
for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do
if WizardForm.ComponentsList.Checked[I] then
Log('Component: ' + WizardForm.ComponentsList.ItemCaption[I]);
end;
end;
以及 Inno Setup 组件脚本示例登录 IDE 的屏幕截图:
关于inno-setup - 创新设置 : create a log of selected items,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22118920/