使用 WIX - 基础版本 3 生成版本 1 或版本 2 的补丁吗?
我正在使用 WIX 制作“小升级”包。当涉及到升级包的基础时,我很困惑。
当我生成补丁时,我是否始终基于版本 1,还是基于版本 2 构建版本 3?
简而言之,我无法理解
<UpgradeImage SourceFile="$(var.ProjNew)" Id="Upgrade1_$(var.NewID)">
<TargetImage SourceFile="$(var.ProjOld)" Order="2" Id="Target1_$(var.NewID)" IgnoreMissingFiles="no" />
</UpgradeImage>
ProjNew 应该指向新的 MSI,ProjOld 应该指向什么?第一个 MSI,还是 n-1 MSI?
有人可以帮助我了解发生了什么事以及如何正确执行此操作吗?理想情况下,当版本 3 发布时,运行版本 1 的人只能获得一个更新包,这让我相信我应该始终以版本 1 为基础。但如果我这样做,如果有人安装了版本 2 会发生什么?他们是吐司吗?
我认为我的问题的核心是假设我已经构建了三个版本 1、2 和 3。假设每个版本都基于版本 1。如果有人安装版本 1,然后安装版本 2。然后他们获得版本 3 补丁,会发生什么? msiexec 会删除补丁 2 然后应用补丁 3 吗?请记住,补丁 3 是基于版本 1 的。
I'm making 'minor upgrade' packages using WIX. I'm confused when it comes to basing the upgrade packages.
When I generate a patch do I always base off version 1, or do I base version 3 off of version 2?
in short, I'm having trouble understanding the
<UpgradeImage SourceFile="$(var.ProjNew)" Id="Upgrade1_$(var.NewID)">
<TargetImage SourceFile="$(var.ProjOld)" Order="2" Id="Target1_$(var.NewID)" IgnoreMissingFiles="no" />
</UpgradeImage>
ProjNew should point to the new MSI, what should ProjOld point to? the first MSI, or the n-1 MSI?
could someone help me understand whats going on and how to do this correctly? Ideally someone who's running version1 when version 3 comes out could just get one update package, that leads me to believe I should always base off version1. But if I do that what happens if someone has version 2 installed? are they toast?
I think the heart of my question is assume I've built three versions 1, 2, and 3. Assume each is based on version 1. If someone installs version 1 and then version 2. They then get version 3 patch what will happen? will msiexec remove patch 2 and then apply patch 3? keep in mind patch 3 is based off of version 1.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,除非您绝对必须使用 WiX v2,否则不要使用 PatchCreation 元素。切换到使用 WiX v3 的 Patch 元素。它更容易使用、更强大并且具有更好的错误检查功能。
现在听起来您想要做的是创建一个针对多个产品的补丁。换句话说,您需要一个可以同时针对 v1 和 v2 的补丁,将它们转换为 v3。实现此目的的方法是创建一个从 v1 到 v3 的转换以及另一个从 v2 到 v3 的转换。
为此,请首先阅读 WiX.chm 中的“使用纯粹的 WiX”主题。当您到达“创建产品之间的转换”部分时,执行该步骤两次以创建 v1tov3.wixmst 和 v2tov3.wixmst。然后在“构建补丁”步骤中,在命令行上提供两个 .wixmst 文件。 Pyro 会处理剩下的事情。
Patch 元素中有很多选项。如果你不这样做,就不要打开它们。当您按照步骤进行操作并进行一点练习时,其实并没有那么复杂。
First, unless you absolutely must use WiX v2 don't use the PatchCreation element. Switch to using WiX v3's Patch element. It si far easier to use, more powerful and has much better error checking.
Now what it sounds like you want to do is to create a patch that targets multiple products. In other words, you want a single patch that can target both v1 and v2 to turn them into v3. The way you accomplish this is creating a transform from v1 to v3 and another transfrom from v2 to v3.
To do that start by reading the "Using Purely WiX" topic in the WiX.chm. When you get to the part that says "Create the transform between your products" do that step twice to create a v1tov3.wixmst and a v2tov3.wixmst. Then in the "Build the patch" step, provide both .wixmst files on the commandline. Pyro will take care of the rest.
There are a lot of options in the Patch element. If you don't them don't turn them on. It really isn't that complicated when you follow the step by step and practice a little bit.