使用 nant 创建 MSI 的最快途径
我有一个当前的构建过程,它使用 MSBuild 进行 .NET 构建,然后我最终将所有项目 DLL/EXE 和第 3 方 DLL 放在同一目录中,并在子目录中放置一些资源。
我想将此捆绑包打包到 MSI 中。我环顾四周,发现 WiX,它有很多可用的任务。不过,我似乎需要维护一个 .wxs 文件,其中包含对 DLL 完整列表的引用。我真的很想避免手动维护此文件或任何其他文件。
实际上,我有许多项目使用共享构建脚本,因此每个项目都以一致的方式构建。因此,我希望 MSI 步骤也能够自动化,否则每个项目都必须使用当前 DLL 列表 + 任何资源文件来维护 .wxs 文件。
是否可以使用 WiX 或其他任何工具,我可以将其指向一个目录并让它打包每个文件/子目录,而不需要配置文件?
I have a current build process which does a .NET build using MSBuild and then I end up with all my project DLLs/EXEs and 3rd party DLLs in the same directory with some resources in a sub-directory.
I would like to package this bundle up into an MSI. I have looked around and found WiX and it has nant tasks available. However it appears I need to maintain a .wxs file with references to the full list of DLLs. I would really like to avoid having to manual maintain this file or any other file.
I actually have many projects that use a shared build script so every project builds in a consistent fashion. I would therefore like the MSI step to be automated as well otherwise every project has to maintain the .wxs file with the current DLL list + any resource files.
Is it possible to use WiX or another any tool where I can just point it at a directory and get it to package every file/sub-directory without needing a config file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅Heat 文档(Wix 的一部分)并在您的构建中使用它过程。
举个例子,类似这样的东西应该可以工作:
然后
AutoHarvest.wxs
将自动生成,并包含ComponentGroup< 下的
C:\Source\Release
中的所有文件/code> 称为AutoHarvestCG
,您可以将其与ComponentGroupRef
元素一起包含在任何功能元素中。您仍然需要维护一个 .wxs 文件,其中包含您的产品、包和功能信息,以及您可能拥有的任何自定义操作。
Refer to the documentation for Heat (part of Wix) and use that in your build process.
As an example, something like this should work:
Then
AutoHarvest.wxs
will be automatically generated and contain all files fromC:\Source\Release
under aComponentGroup
calledAutoHarvestCG
which you can include with aComponentGroupRef
element in any Feature element.You'll still have to maintain a .wxs file with your Product, Package, and Feature information, along with any custom actions you might have.