zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    NOIP模拟题 管道
    NOIP模拟题 序列
    NOIP模拟题 栅栏
    NOIP模拟题 斐波那契数列
    CodeForces 797F Mice and Holes
    CodeForces 589H Tourist Guide
    CERC2016 爵士之旅 Jazz Journey
    BZOJ3832 Rally
    BZOJ1061 NOI2008 志愿者招募
    js数组的操作
  • 原文地址:https://www.cnblogs.com/zzj-suxiao/p/3622412.html
Copyright © 2011-2022 走看看