Inno Setup sub-options/sub-components for different setup types (server/client)

前端 未结 2 1864
长发绾君心
长发绾君心 2021-01-16 05:39

I\'m trying to prepare a setup for my app with server and client installation type. Server type is easy with some code, but Client installation have many options too. I\'m t

相关标签:
2条回答
  • 2021-01-16 06:02

    If you want everything in one place, you can make use of parent components:

    [Types]
    Name: custom; Description: "Custom"; Flags: iscustom
    
    [Components]
    Name: server; Description: "Server"; Types: custom; Flags: exclusive
    Name: client; Description: "Client"; Flags: exclusive
    Name: client\feature1; Description: "Feature 1"
    Name: client\feature2; Description: "Feature 2"
    

    (Whichever one you put Types: custom on is selected by default.)

    You can then condition things on Components: client for all clients, or Components: client\feature1 for only when feature 1 is selected, etc.

    There are some other variations depending on whether the client features are mutually exclusive or not.

    0 讨论(0)
  • 2021-01-16 06:05

    Your question is rather broad. But if I understand correctly what you need, you can make use of the standard Inno Setup Types – Components – Tasks system:

    [Types]
    Name: server; Description: "Server";
    Name: client; Description: "Client";
    
    [Components]
    ; The "descriptions" are not visible in this setup
    Name: server; Description: "Server"; Types: server;
    Name: client; Description: "Client"; Types: client;
    
    [Tasks]
    Name: client1; Description: "Client feature 1"; Components: client;
    Name: client2; Description: "Client feature 2"; Components: client;
    
    [Files]
    Source: "Server.exe"; DestDir: "{app}"; Components: server;
    Source: "ClientFeature1.exe"; DestDir: "{app}"; Tasks: client1;
    Source: "ClientFeature2.exe"; DestDir: "{app}"; Tasks: client2;
    

    0 讨论(0)
提交回复
热议问题