Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I handle product upgrades in a WiX installer?

Tags:

patch

wix

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.

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.

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?

like image 473
Alan Spark Avatar asked Feb 28 '12 13:02

Alan Spark


People also ask

How do I run as administrator in WiX Installer?

Setup tab > Run after execution input: your msi file name. Advanced tab > Mark Request Administrative access option checkbox.

How do I add custom dialogues to WiX installers?

You can add custom dialogs to the UI sequence in a built-in WixUI dialog set. To do so, you must define a <UI/> element for your new dialog. Then, you must copy the contents of the <Fragment/> that includes the definition of the dialog set that you want to customize from the WiX source code to your project.

What is Directoryref in WiX?

Description. Create a reference to a Directory element in another Fragment.


1 Answers

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.

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

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

like image 195
Christopher Painter Avatar answered Sep 28 '22 08:09

Christopher Painter