The Windows Installer SDK ships a library named patchwiz.dll. This contains the logic to build a patch from pairs of database packages (.msi files, or simply MSIs) along with other configuration properties. Another tool that the SDK ships is msimsp.exe which uses patchwiz.dll and parses command line options. These tools consume an input file with the same format as a database package but with a different set of tables. This is known as a PCP file (because of the .pcp extension).
When we started planning a patch build system for Windows Installer XML (WiX), we considered building a new system that is completely under our control but without using any undocumented APIs or formats. The result was the WiX patch build system that first shipped in version 3.0 and is used by many divisions and other groups throughout Microsoft.
Even while WiX v3 retains the ability to build PCP files for use with patchwiz.dll, it provides new support using the <Patch> element a two tools: torch.exe and pyro.exe, which builds transforms and patches respectively. This gives us the ability to add validation for common problems and the ability to easily filter most changes, though you need to fragment your authoring properly.
The following table is a comparison of patchwiz.dll and the WiX patch build system.
Feature | PatchWiz | WiX |
---|---|---|
Ignore certain files to be upgraded by the patch. | Yes | Yes |
Ignore certain other resource types to be upgraded by the patch (ex: registry values, components, etc.). | Yes | |
Produces binary delta patches. | Yes | Yes |
Creates patches between MSIs. | Yes | Yes |
Maintains relationships between groups of authored resources (ex: files and registry values in the same fragment). | Yes | |
Supports authoring of validation flags. | Yes | Yes |
Supports authoring of error flags. | Yes | |
Consumes tertiary MSIs to include additional data in the patch transform. | Yes | |
Produces easily parsable output for diagnosing authoring issues. | Yes | |
Can automatically extract compressed files when creating transforms. | Yes |
What’s more, if you’re already building with WiX 3.0 or newer, you already have these tools.
0 comments