【问题标题】:WiX root feature without Treelines没有 Treelines 的 WiX 根功能
【发布时间】:2019-01-21 12:00:25
【问题描述】:

是否可以让特征树中的根特征没有树线,从而无法展开和折叠它?

所以下面的特征树:

<Feature Id="root" Level ="1" Title="Root" Display="expand" AllowAdvertise="no"
         ConfigurableDirectory="INSTALLDIR" Absent="disallow" TypicalDefault="install"
         InstallDefault="local">
  <Feature Id="child1" Title="Child 1"
           Level="1" Display="expand" AllowAdvertise="no"
           InstallDefault="local" >
    <ComponentGroupRef Id="SharedComponents" />
  </Feature>
  <Feature Id="child2" Title="Child 2"
           Level="1" Display="expand" AllowAdvertise="no"
           InstallDefault="local" >
    <ComponentGroupRef Id="SharedComponents" />
  </Feature>
  <Feature Id="childgroup1" Title="Child Group 1"
           Level="1" Display="expand" AllowAdvertise="no"
           InstallDefault="local" >
    <Feature Id="groupchild1" Title="Child 1"
             Level="1" Display="expand" AllowAdvertise="no"
             InstallDefault="local" >
      <ComponentGroupRef Id="SharedComponents" />
    </Feature>
    <Feature Id="groupchild2" Title="Child 2"
             Level="1" Display="expand" AllowAdvertise="no"
             InstallDefault="local" >
      <ComponentGroupRef Id="SharedComponents" />
    </Feature>
  </Feature>
</Feature>

给我这个:

但我宁愿在根元素上没有树线。

【问题讨论】:

    标签: wix windows-installer


    【解决方案1】:

    外部 GUI:除了使用 外部 GUI,我不知道有什么方法可以去除虚线 - 这是可能(see this answer)。

    隐藏功能:但是,您可以将功能设置为隐藏,在这种情况下,子功能也不会显示。我不确定你到底想要什么。

    功能四被隐藏:

    <Feature Id="One" Title="One" Level="1" >
      <Feature Id="Two" Title="Two" Level="1"/>
      <Feature Id="Three" Title="Three" Level="1">
        <Feature Id="ThreeOne" Title="ThreeOne" Level="1" >
        </Feature>
        <Feature Id="Four" Title="Four" Level="1"  Display="0" />
      </Feature>
    </Feature>
    

    MSI GUI:作为记录,我应该指出,MSI GUI 从过去的计算时代(90 年代后期)到现在已经是一个古老的遗物。因此,GUI 不是那么容易做的,除了替换上面链接中描述的整个东西(以及来自 MSI SDK:MsiSetExternalUI)。

    Installshield 和 Advanced Installer 等工具将允许您使用具有更现代功能的模板 GUI,而 WiX 也允许您完全编写自己的 GUI:WIX Installer with modern look and feel(与上述相同的链接)。

    所有自定义 GUI 均基于 MsiSetExternalUI MSI API(据我所知)。

    【讨论】:

    • 一个简单的 GUI 更改是完全删除或跳过功能页面。
    • 我认为 Advanced Installer 有一些关于如何使用复选框而不是内置对话框进行功能选择的机制或文档。
    猜你喜欢
    • 1970-01-01
    • 2013-06-22
    • 2018-08-02
    • 2013-08-10
    • 2011-06-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多