在不同片段中添加WiX文件的快捷方式
我正在使用heat.exe生成类似以下内容的片段:在不同片段中添加WiX文件的快捷方式,wix,shortcut,heat,Wix,Shortcut,Heat,我正在使用heat.exe生成类似以下内容的片段: <Fragment> <DirectoryRef Id="INSTALLDIR"> <Component Id="id1" Guid="*"> <File Id="fid1" KeyPath="yes" Source="SourceDir\Foo1.dll" /> </Component> <Component Id="id2" Guid=
<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文件中
然后我将它们添加到我的功能中(在主WiX文件中),如下所示:
这个很好用
但是,我还想将Bar.exe的快捷方式添加到“开始”菜单中。
理想情况下,我希望在主wix文件中执行此操作,而Bar.exe组件仍驻留在自动生成的wxs文件中。
如何在不修改自动生成的代码的情况下解决此问题?您是否一定希望它驻留在定义中?您可以将其放在单独的组件中,如手册中所示: 否则,您可能应该通过在其中添加定义,使用XSL转换来转换热输出。Heat.exe在获取后立即接受应用XSL转换的开关 希望这有帮助
<ComponentGroupRef Id="Components"/>