使用 WIX 生成补丁 - 版本 1 或版本 2 的基础版本 3? [英] generating patches with WIX - base version 3 off version 1 or version 2?

查看:27
本文介绍了使用 WIX 生成补丁 - 版本 1 或版本 2 的基础版本 3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 WIX 制作小升级"软件包.当涉及到升级包的基础时,我很困惑.

I'm making 'minor upgrade' packages using WIX. I'm confused when it comes to basing the upgrade packages.

当我生成补丁时,我总是基于版本 1,还是基于版本 2 的版本 3?

When I generate a patch do I always base off version 1, or do I base version 3 off of version 2?

简而言之,我无法理解

<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?

ProjNew should point to the new MSI, what should ProjOld point to? the first MSI, or the n-1 MSI?

有人可以帮助我了解发生了什么以及如何正确执行此操作吗?理想情况下,当版本 3 发布时运行版本 1 的人可以获得一个更新包,这让我相信我应该始终以版本 1 为基础.但是如果我这样做,如果有人安装了版本 2 会发生什么?他们是敬酒吗?

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?

我认为我的问题的核心是假设我已经构建了三个版本 1、2 和 3.假设每个版本都基于版本 1.如果有人安装了版本 1,然后安装了版本 2.然后他们会得到版本 3 补丁什么会发生吗?msiexec 会删除补丁 2 然后应用补丁 3 吗?请记住,补丁 3 基于版本 1.

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.

推荐答案

首先,除非您绝对必须使用 WiX v2,否则不要使用 PatchCreation 元素.切换到使用 WiX v3 的 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.

现在听起来您想要做的是创建一个针对多个产品的补丁.换句话说,您需要一个可以同时针对 v1 和 v2 的补丁来将它们转换为 v3.完成此操作的方法是创建一个从 v1 到 v3 的转换以及另一个从 v2 到 v3 的转换.

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.

首先阅读 WiX.chm 中的使用纯粹的 WiX"主题.当您到达在您的产品之间创建转换"部分时,请执行该步骤两次以创建一个 v1tov3.wixmst 和一个 v2tov3.wixmst.然后在构建补丁"步骤中,在命令行上提供两个 .wixmst 文件.Pyro 会处理剩下的事情.

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.

Patch 元素中有很多选项.如果您不这样做,请不要打开它们.循序渐进,稍微练习一下,其实没那么复杂.

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.

这篇关于使用 WIX 生成补丁 - 版本 1 或版本 2 的基础版本 3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆