独家选择组件(InnoSetup)

时间:2016-10-27 10:55:59

标签: inno-setup

以下代码可以很好地显示两个组件。 如果我选择' Server'组件,然后'客户'组件应该是未选中的。 如果我选择'客户'组件,然后'服务器'组件应该是未选中的。

你能告诉我怎么做吗?

[Files]
Source: "C:\MAEK\bin\MAEK\*.exe";         DestDir: "{app}\bin\"; Flags: ignoreversion ; Components: Server 
Source: "C:\MAEK\bin\MAEK\*.exe";         DestDir: "{app}\bin\"; Flags: ignoreversion ; Components: Client

[Types]
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Components]
Name: "Server"; Description: "Server"; Types: custom; 
Name: "Client"; Description: "Client"; Types: custom;

1 个答案:

答案 0 :(得分:2)

只选择1个组件??

[Components]
Name: "Server"; Description: "Server"; Types: custom; Flags: exclusive
Name: "Client"; Description: "Client"; Types: custom; Flags: exclusive

如果更多:

[Components]
Name: "Mode"; Description: "Installation Mode"; Types: custom; Flags: fixed
Name: "Mode\Server"; Description: "Server"; Types: custom; Flags: exclusive
Name: "Mode\Client"; Description: "Client"; Types: custom; Flags: exclusive