How can I handle product updates in the WiX installer?

I have a fairly large WiX installer (250 MB plus) and I'm trying to find a suitable upgrade strategy.

Most files in the installer will not change, and we would prefer not to distribute the entire package if only one or two files were changed.

I reviewed major and minor updates, and I understand that a major update will happen if the Product ID changes, if the update identifier remains the same, and minor updates can be used if both of these values ​​remain the same.

I feel that a small update using the patch would be the best option to handle cases where only a few files have changed and only to restore the entire installation when a significant number of files change.

I tested this with a torch to create a wixmst file based on the differences between the two wixpdb files, and then created a patch from that. However, I found that I can only fix one version (for example, from 1.0.0 to 1.0.1, then from 1.0.1 to 1.0.2, but not from 1.0.0 to 1.0.2). Is it possible to configure a minimal version of a patch and support any version above it?

+8
wix patch
source share
3 answers

A patch is a pain, so get ready for a lot of it when you learn to master it. Here is another strategy that may work for you. Divide the MSI into 2 MSI (Microsoft calls it Micropackages). You have a basic MSI that contains the bulk of your content, which is not expected to change, and a second MSI, which is much smaller, that contains your files that you expect high outflows.

Then use Burn - this is a boot block to process them together and uninstall them together. This is similar to what Visual Studio does.

Now you can simply send the main updates to the second MSI.

+8
source share

I believe that you can pay in the scenario described above if the patches are not removed. Example script:

  • Install msi (v1.0)
  • Install msp (v1.0 - v1.1)
  • Remove msp (back to v1.0), then install msp (v1.0 - v1.2)

For more information about patches to be removed, see the wix documentation: http://wix.sourceforge.net/manual-wix3/patch_restrictions.htm and the Windows documentation: http://msdn.microsoft.com/en-us/library/aa372102 .aspx .

Please note that there are certain limitations to creating removable patches, and you must be on WiX 3.0 or higher.

As Christopher mentioned, correction can be pain. I found that in many cases, my managers may ask for the possibility of updating patches, when all of them really mean that the user can upgrade without manual installation first, which can be achieved by a major update. / p>

However, if you have clients who need a lot of small updates that are often downloaded, the fix can be worth the extra effort.

+2
source share

While Christophers are responding, this is awesome, as he offers the wix bootloader, I would discourage the route for major updates for a high-drain package. The problem is that after you have made your boot patch that internally performs a major upgrade of your volatile libs in HighChurn.msi from version v1.0 to v1.1, the bootloader will not, as far as I know, reinstall the previous HighChurn package. msi in version 1.0.

There is another way: you can, of course, create patches intended for the release of the main package. Given what you wrote, I'm not quite sure, but if your patch 1.2 can only be applied to 1.1, then you probably changed your 1.2 to 1.1 only, not 1.0.

Here's a neat guide to creating patches: https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/patchwork/

Follow this guide, replace the fixes ([PatchFamily / @ Supersede], it will invalidate everything sent v1.1 v1.2, so you basically have to do v1.2 patch v1.0, not v1.1) and add this flag in the patch element to configure the main release, even if higher versions are present: Patch / @ MinorUpdateTargetRTM = "yes" . Always disconnect patches from the release installer (HighChurn.msi v1.0), never use the installer that you used for the patch (HighChurn.msi v1.1).

Of course, there are situations where you may need a specific update installed for patches: a well-planned package scheme for packpack / servicepack, for example, where patch 1.1.1 requires service pack 1.1 installed on top of version 1.0.

Last word for fixing your volatile data (I assume these are libraries with versions here). Perhaps you should take a look at which libraries you could replace in the patch. Then you can create patches with very little data, only providing the changed libraries with a higher version. If you increase the version in all your libraries, all libraries will be fixed, which will lead to large patches. This may require a slightly more complex build workflow (God knows this was for us).

0
source share

All Articles