我使用heat.exe以产生片段类似于:

<Fragment>
  <DirectoryRef Id="INSTALLDIR">
    <Component Id="id1" Guid="*">
      <File Id="fid1" KeyPath="yes" Source="SourceDir\Foo1.dll" />
    </Component>
    <Component Id="id2" Guid="*">
      <File Id="fid2" KeyPath="yes" Source="SourceDir\Foo2.dll" />
    </Component>
    <Component Id="id3" Guid="*">
      <File Id="fid3" KeyPath="yes" Source="SourceDir\Bar.exe" />
    </Component>
  </DirectoryRef>
</Fragment>

<Fragment>
    <ComponentGroup Id="Components">
        <ComponentRef Id="id1" />
        <ComponentRef Id="id2" />
        <ComponentRef Id="id3" />
    </ComponentGroup>
</Fragment>

这些片段被存储在自动生成的WXS文件。

我然后将它们添加到我的特征(在主维克斯文件)像这样:

<ComponentGroupRef Id="Components"/>

此工作正常。

不过,我也很喜欢的快捷方式添加到Bar.exe到我的开始菜单。 我非常想这样做,在我的主要WiX的文件,与Bar.exe成分仍然居住在自动生成的WXS文件。 我将如何处理这个问题,而无需修改自动生成的代码?

有帮助吗?

解决方案

你一定希望它驻留在定义?你可以把它在一个单独的组件,它展示了手动的方式: HTTP: //wix.sourceforge.net/manual-wix3/create_start_menu_shortcut.htm

否则,你应该变换与XSL热输出通过将定义那里变换。 Heat.exe接受开关申请收获后右XSL变换。

希望这有助于。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top