• Wix 使用总结(续)--关于Feature和Component的状态判断安装过程(转)


    安装过程中,有时候需要根据用户的设置来进行不同的安装,其中一个方面就是根据用户选择安装的Feature或者Component,来判断下一步的操作。
        Wix中提供了相关的判断方法和内置的状态值。
        Prepending some special characters to the names will give them extra meaning:
        %  environment variable (name is case insensitive)
        $   action state of component
        ?   installed state of component
        &   action state of feature
        !   installed state of feature

        The last four can return the following integer values:
       -1   no action to be taken
       1   advertised (only for components)
       2   not present
       3   on the local computer
       4   run from the source

    A few examples to make things clearer:

    (&FeatureName = 3) AND NOT (!FeatureName = 3)

    Run action only if the product will be installed locally. Do not run action on a reinstallation.

    The term &FeatureName = 3 means the action is to install the feature locally.

    The term NOT (!FeatureName = 3) means the feature is not installed locally.

     (&FeatureName = 2) AND (!FeatureName = 3)

    Run action only if the feature will be uninstalled.

    This condition only checks for a transition of the feature from an installed state of local to the absent state.

    (?ComponentName = 3) AND ($ComponentName = 2 OR $ComponentName = 4)

    Run action only if the component was installed locally, but is transitioning out of state.

    The term ?ComponentName = 3 means the component is installed locally.

    The term $ComponentName = 2 means that the action state on the component is absent.

    The term $ComponentName = 4 means that the action state on the component is run from source. Note that an action state of advertise is not valid for a component.

    ?ComponentName = $ComponentName

    Run action only on the reinstallation of a component.

    原文链接:http://blog.csdn.net/salever/article/details/4820931

  • 相关阅读:
    小数据池,bytes
    不会的知识总结:
    nginx低版本不支持pathinfo模式,thinkphp针对此问题的解决办法
    备份了一个nginx的虚拟主机配置文件报错
    centos修改ssh端口
    CentOS安装配置Git服务器(gitosis)
    干货CentOS6.5_Nginx1.40_Php5.57_MySQL5.5.35编译安装全记录
    编译升级php
    php源代码安装常见错误与解决办法分享
    兼容IE,Firefox,Opera等浏览器的添加到收藏夹js代码实现
  • 原文地址:https://www.cnblogs.com/zzj-suxiao/p/3622412.html
Copyright © 2020-2023  润新知