HeatDirectory 仅收获根级文件
有没有一种方法可以指导我的Wixproj中的热门任务仅在根级收获文件而不潜入任何子目录中?可以肯定的是,我可以在输出文件上运行XSL变换,但是我更喜欢一种更干净的方式。如果没有办法,那么如果有人有一个干净的XSL变换片段来处理它的简洁示例(至少可以节省时间)。多谢 :)
Is there a way to direct HeatDirectory task in my wixproj to harvest only files at the root level and not to dive into any sub-directories? For sure I can handle it running XSL transform on the output file, but I would prefer a cleaner way. If there is no way then I'd appreciate if anyone has a clean example of XSL transform snippet to handle it (will save me time at least). Thanks a lot :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
XSLT似乎是最合适的方法。这里提到了其他几个解决方案:如何在Wix Toolset中排除文件,例如制作文件副本以收获或使用外部OpenSource应用程序。
此外,Wix还具有商业扩展包,并具有更强大的heat.exe替换,可以排除文件和文件夹,使用掩码: https://www.firegiant.com/wix/wep-documentation/harvesting/harvestfolder/
XSLT seems to be the most suitable way. A couple of other solutions are mentioned here: How to exclude files in Wix toolset, like making a copy of files to harvest or using external opensource app.
Also Wix has commercial expansion pack with more powerful replacement of heat.exe, which can exclude files and folder, use masks: https://www.firegiant.com/wix/wep-documentation/harvesting/harvestfolder/
由于看起来没有集成的方法可以通过 HeatDirectory 任务输入参数来处理它,因此我将发布我编写的 XSLT 片段,该片段对我有用。无论谁使用它都需要根据需要进行相应修改:
Since it looks like there is no integrated way to handle it through the HeatDirectory task input parameters, then I will post the XSLT snipped I wrote which does that work for me. Whoever uses it needs to modify as per need accordingly: