【问题标题】:How can I install two products with one Inno Setup script?如何使用一个 Inno Setup 脚本安装两个产品?
【发布时间】:2015-10-15 19:17:43
【问题描述】:

我有两个产品:一个客户端和一个管理员产品。可能存在用户想要安装一个、另一个或两者的情况。如何在 Inno Setup 中执行此操作?

我对 Inno Setup 比较陌生。我曾尝试使用ComponentsTypes,但到目前为止只能得到一个下拉列表。我想要一组复选框(或其他),允许用户选择他们正在安装的内容。

【问题讨论】:

    标签: installation inno-setup


    【解决方案1】:

    [Types] section 中,配置一种自定义类型(iscustom 标志)。

    然后在Components section中,添加自定义安装的两个组件。

    [Types]
    Name: "custom"; Description: "Custom installation"; Flags: iscustom
    
    [Components]
    Name: client; Description: "Client product"; Types: custom
    Name: admin; Description: "Admin product"; Types: custom
    
    [Files]
    Source: "client.exe"; DestDir: "{app}"; Components: client
    Source: "admin.exe"; DestDir: "{app}"; Components: admin
    


    iscustom 设置类型的替代方法是使用 AlwaysShowComponentsList 指令。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-29
      • 1970-01-01
      • 2010-11-06
      • 2011-11-29
      相关资源
      最近更新 更多