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

  • 相关阅读:
    new一个对象的时候,实际做了些什么
    ES6 class——getter setter音乐播放器
    vue中引入公用过滤器?
    this详解下
    012天this详解上
    011天之跨域资源共享CORS
    010天JSON.stringify()详解
    009天之跨浏览器的事件处理程序
    使用XHR上传文件要不要了解一下?
    简单化最小化语句数
  • 原文地址:https://www.cnblogs.com/zzj-suxiao/p/3622412.html
Copyright © 2011-2022 走看看