任务组条件inno设置

时间:2017-07-05 12:39:30

标签: inno-setup

我很难将任务中的条件与GroupDescription结合起来。如果我不使用GroupDescription,它可以工作。如果选择了任务[2],我需要自动选择任务[0]。我试过了:

[Tasks]
Name: InstallDS; Description: Install DServer?; GroupDescription: InsDS
Name: InstallTG; Description: Install TServer?; GroupDescription: InsDS
Name: InstallOP; Description: Install Optionals?; GroupDescription: InsDS

[Code]
procedure TasksListClickCheck(Sender: TObject);
begin
    WizardForm.TasksList.Checked[0] := WizardForm.TasksList.Checked[2];
end;

procedure InitializeWizard;
begin
    WizardForm.TasksList.OnClickCheck := @TasksListClickCheck
end;

procedure CurPageChanged(CurPageID: Integer);
begin
    if CurPageID = wpSelectTasks then
    begin
        TasksListClickCheck(WizardForm.TasksList);
    end;
end;

1 个答案:

答案 0 :(得分:2)

添加GroupDescription后,组下方的连续任务将被安排为元素1,2,3。 Inno Tasks section description

procedure TasksListClickCheck(Sender: TObject);
begin
    if (WizardForm.TasksList.Checked[3] = True) then
    begin
      WizardForm.TasksList.Checked[1] := True;
    end;  
end;