我应该如何处理 WiX 安装程序中的产品升级? [英] How should I handle product upgrades in a WiX installer?

查看:84
本文介绍了我应该如何处理 WiX 安装程序中的产品升级?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当大的 WiX 安装程序(250 Mb 以上),我正在尝试提出合适的升级策略.

I have a reasonably large WiX installer (250 Mb plus) and I am trying to come up with a suitable upgrade strategy.

安装程序中的大多数文件都不会更改,并且我们不希望在只有一两个文件发生更改时不必分发整个包.

Most of the files in the installer will not change and we would prefer not to have to distribute the whole package when only one or two files have changed.

我研究了主要和次要升级,我的理解是,如果产品 ID 更改,则会发生主要升级,只要升级 ID 保持不变,并且如果这两个值都保持不变,则可以使用次要升级补丁一样.

I have looked into major and minor upgrades and my understanding is that a major upgrade will happen if the Product ID changes, so long as the Upgrade ID stays the same and minor upgrade patches can be used if both of these values stay the same.

我的感觉是,使用补丁进行小幅升级将是处理只有少数文件更改并且仅在大量文件更改时重建整个安装程序的情况的最佳选择.

My feeling is that a minor upgrade using a patch would be the best option to handle the cases where only a few files change and only to rebuild the whole installer when a substantial number of files change.

我已经使用torch"对此进行了测试,以根据两个wixpdb"文件之间的差异生成wixmst"文件,然后从中构建补丁.但是,我发现我只能从一个版本修补到另一个版本(例如 1.0.0 到 1.0.1,然后是 1.0.1 到 1.0.2,但不能从 1.0.0 到 1.0.2).是否有可能针对补丁的最低版本并支持高于它的任何版本?

I have tested this using "torch" to produce a "wixmst" file based on the differences between two "wixpdb" files, then building a patch from that. However, I found that I can only patch from one version to another (e.g. 1.0.0 to 1.0.1, then 1.0.1 to 1.0.2 but not 1.0.0 to 1.0.2). Is it possible to target a minimum version for a patch and support any version above it?

推荐答案

打补丁是一件痛苦的事情,所以在你学会掌握它的同时做好准备.这是另一种可能对您有用的策略.将您的 MSI 拆分为 2 个 MSI(微软称之为 Micropackages).有一个基本 MSI,其中包含您预计不会更改的大部分内容,以及一个小得多的第二个 MSI,其中包含您预计会出现高流失率的文件.

Patching is a pain so get ready for a lot of it as you learn to master it. Here's another strategy that might work for you. Split your MSI out into 2 MSI ( Microsoft calls this Micropackages ). Have a Base MSI that contains the bulk of your content that is expected to not change and a Second MSI that is much smaller that contains your files you expect to be high churn.

然后使用 Burn 是一个引导程序来处理将这些链接在一起并一起卸载它们.这类似于 Visual Studio 所做的.

Then use Burn is a bootstrapper to handle chaining these together and uninstalling them together. This is similar to what Visual Studio does.

现在您可以发布您的第二个 MSI 的主要升级.

Now you can just ship major upgrades of your second MSI.

这篇关于我应该如何处理 WiX 安装程序中的产品升级?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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