包括所有依赖项
我刚刚开始使用 WiX,因为我需要能够在我们的 CI 服务器上自动构建 MSI。 有没有办法自动包含项目的所有依赖项?
I'm just starting out with WiX as I need to be able to automate building an MSI on our CI server. Is there anyway to automatically include all the dependencies of a project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
heat.exe 的“proj”扩展变得越来越好。 Heat 尚未完全准备好用于自动化生产时尚。 这是一种将初始结构放在一起的非常合理的方法,但在重复运行时并不能完全做到正确的事情(例如,Component/@Guids 还不稳定......)。
当上述问题在 heat.exe 中得到解决后,然后将其合并到您的构建过程中肯定会省去上面人们提到的所有麻烦。 在核心工具集中修复最严重的错误后,我们的目标是做得更好。
The "proj" extension to heat.exe is getting better. Heat isn't quite ready to be used for production in an automated fashion. It's a very reasonable way to get the initial structure put together but doesn't quite do the right thing with repeated runs (for example, Component/@Guids aren't stable, yet...).
When the above issues are solved in heat.exe then incorporating it into your build process will certainly save all the trouble that people mention above. It's on our list to do better after the most egregious bugs are fixed in the core toolset.
我也刚刚开始使用 WIX,我做了一个快速而肮脏的技巧来自动添加引用。 这个想法是扫描要打包的项目的输出文件夹中的所有 .dll。
在预构建 WIX 项目时,
在 WIX 项目中添加 Add aGenerateDependency.bat 文件,其中包含
根据需要修改“WixServiceInstallerExample\bin\Debug”。 该文件夹是您要打包的项目的输出文件夹。
注意:请注意 VisualStudio 经常会搞乱编码。 最好使用 Notepad++ 编辑此文件,并确保其格式为 ANSI,而不是 UTF8。
这将生成一个 Dependency.wxs,您可以将其包含在项目中。 如果您处于源代码管理之下,请将其排除在外。
每次构建都会在实际制作包之前重新扫描 .dll 并重建 Dependency.wxs。
I just started with WIX also and I did a quick-and-dirty trick to add references automaticaly. The idea is to scan all .dll in the output folder of the project you want to package.
In pre-build of your WIX project, add
Add a GenerateDependency.bat file in your WIX project containing
Modify the "WixServiceInstallerExample\bin\Debug" according to your need. This soulhd be the output folder of the project you want to package
Note : Beware that often VisualStudio mess around with encoding. Better edit this file with Notepad++ and make sure its in ANSI, not UTF8.
This will generate a Dependencies.wxs that you can include in your project. If you are under source control, exclude it from it.
Each build will rescan .dll and rebuild the Dependencies.wxs before actually making the package.
看看石蜡< /a>,来自 Wintellect。
Have a look at paraffin, from Wintellect.
根据我的经验,Wix 仍然是一个非常手动的过程。 您必须单独添加每个依赖项 - 我认为这个想法是您在构建项目的同时构建 Wix 安装程序,并在将每个项目添加到代码中时添加它。 这样一来,看起来就不像必须回去回顾项目那么令人畏惧了。 不过,这无疑是一个很好的增强建议!
In my experience, Wix is a still a very manual process. You have to add each dependency singly - I think the idea was that you would build the Wix installer at the same time you are building your project and add each item in as you are adding it in the code. This way it seems less daunting than having to go back and do a retrospect on the project. It certainly would be a great suggestion for an enhancement though!
我还没有在 WIX 中看到可以做到这一点的东西,您应该知道您的解决方案/项目所需的所有依赖项。 阅读此博客,里面有一段引用:
我发现确保 MSI 中没有忘记任何内容的最佳方法是在干净安装的虚拟 PC 上测试安装程序。
我见过的最接近的,对于你想要的东西是这个人的 博客。
目前,我们只能手工完成。
I haven't seen something in WIX that can do that, you are supposed to know all the dependencies that your solution/project requires. Read this blog, inside is a quote:
The best way I found to make sure nothing was forgotten in the MSI, was to test the Installer on a clean installed virtual PC.
The closest I've seen, for something you want is this guy's blog.
For now, we are stuck to do it by hand.
我刚刚开始使用 WIX,认为 WixEdit(http://wixedit.sourceforge.net/) 非常适合添加多个文件/dll,解决了我对 Wix 轻松获取文件的挫败感。 只需保持文件井井有条,然后使用导入文件夹功能即可。 当然,它不支持每个文件一个组件的新 3.0 建议。
Heat 也很好,支持每个文件一个组件。 我的列表中的下一步是实现一些自动化,以便这些文件能够像视觉工作室一样自动更新。
I just started with WIX and think that WixEdit(http://wixedit.sourceforge.net/) rocks for adding multiple files/dlls, solved my frustration with Wix of getting the files in easily. Just keep your files organized and then use the import folder function. Of course it doesnt support the new 3.0 recommendations of having one component per file.
Heat is good also and supports one component per file. Next on my list is to get some automation so these files are updated automatically a la visual studio.