【问题标题】:Feature dependencies in the Feature Selection Tree in WixWix 中的特征选择树中的特征依赖关系
【发布时间】:2015-01-27 13:56:01
【问题描述】:

如果在功能选择树中选择了另一个功能,是否有任何方法可以强制安装特定功能?那就是没有特性成为其依赖项的子项?

【问题讨论】:

    标签: wix wix3.9


    【解决方案1】:

    是的,这应该是可能的,如果您在 Feature 元素下使用 Condition 元素,您可以从条件控制功能安装级别。

        <Feature Id="MyDependentFeature">
          <Condition Level="1">(NOT INSTALLED AND &MyMasterFeature=3) OR (INSTALLED AND !MyMasterFeature=3)</Condition> 
        </Feature>
    
        <Feature Id="MyMasterFeature"> 
        </Feature>
    

    这里需要解释几件事:

    • Condition Level="1" 告诉 Wix 将父功能安装级别设置为 1(安装)(Info
    • (NOT INSTALLED AND &amp;MyMasterFeature=3) 如果产品尚未安装,并且 MyMasterFeature 请求的操作是安装
    • (INSTALLED AND !MyMasterFeature=3) 如果产品已经安装,并且 MyMasterFeature 的安装状态为 Installed。 (Info)

    【讨论】:

    • 这将不起作用,因为在评估条件时未初始化功能状态。
    猜你喜欢
    • 2019-09-17
    • 1970-01-01
    • 2018-06-01
    • 2022-08-20
    • 1970-01-01
    • 2011-01-10
    • 1970-01-01
    • 2017-12-10
    • 1970-01-01
    相关资源
    最近更新 更多