[wix-users] Patching
Steve Ogilvie
sogilvie at msn.com
Fri Nov 16 14:26:58 PST 2018
Hi folks,
I am trying patching… I created a patch.wxs and specified just 4 binaries instead of all 11. But when creating the patch it stuff all the binaries in the patch…
Using WiX 3.11.1 and use melt/torch/candle/light/pyro to create the patch:
Used info from:
https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/patchwork/
http://wixtoolset.org/documentation/manual/v3/patching/wix_patching.html
https://www.joyofsetup.com/2013/07/16/easy-pure-wix-patching-with-melt/
patch_en.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
Id="*"
TargetProductName="My Product"
AllowRemoval="yes"
Manufacturer="My Company"
DisplayName="My Patch 1.0.35.0"
Description="Patch from RTM"
Comments="Patch from RTM"
Classification="Update"
Codepage="1251"
>
<Media Id="5000"
Cabinet="media1.cab"
CompressionLevel="high">
<PatchBaseline Id="media1"/>
</Media>
<PatchFamily Id='media1PatchFamily'
Version='1.0.0.0'
Supersede='no'>
<ComponentRef Id="ComponentEXE"/>
<ComponentRef Id="cmp_one.dll"/>
<ComponentRef Id="cmp_two.dll"/>
<ComponentRef Id="cmp_three.dll"/>
</PatchFamily>
</Patch>
</Wix>
Used this script to create patch:
set INTERMEDIATE_DIRECTORY=D:\SomePath\Installation\Patch
set OLD_INSTALLER=%INTERMEDIATE_DIRECTORY%\MyProduct\old\bin\Release\en-US
set NEW_INSTALLER=%INTERMEDIATE_DIRECTORY%\MyProduct\new\bin\Release\en-US
rem old and new folders has the “old/new” versions of the .MSI and .wixpdb files
rem Use melt.exe to create a better .wixpdb: https://www.joyofsetup.com/2013/07/16/easy-pure-wix-patching-with-melt/
call "C:\SomePath\WiX\3.11.1\Melt.exe" -v %OLD_INSTALLER%\MyProduct.msi -out %INTERMEDIATE_DIRECTORY%\MyProduct.Old.corrected.wixpdb -pdb %OLD_INSTALLER%\MyProduct.wixpdb -x %INTERMEDIATE_DIRECTORY%\ProductOldbits
call "C:\SomePath\WiX\3.11.1\Melt.exe" -v %NEW_INSTALLER%\MyProduct.msi -out %INTERMEDIATE_DIRECTORY%\MyProduct.New.corrected.wixpdb -pdb %NEW_INSTALLER%\MyProduct.wixpdb -x %INTERMEDIATE_DIRECTORY%\ProductNewbits
call "C:\SomePath\WiX\3.11.1\torch.exe" -p -v -xi "%INTERMEDIATE_DIRECTORY%\MyProduct.Old.corrected.wixpdb" "%INTERMEDIATE_DIRECTORY%\MyProduct.New.corrected.wixpdb" -out "%INTERMEDIATE_DIRECTORY%\patch_en.wixmst"
call "C:\SomePath\WiX\3.11.1\candle.exe" -v "%INTERMEDIATE_DIRECTORY%\patch_en.wxs"
call "C:\SomePath\WiX\3.11.1\light.exe" -v "%INTERMEDIATE_DIRECTORY%\patch_en.wixobj" -out "%INTERMEDIATE_DIRECTORY%\patch_en.wixmsp"
call "C:\SomePath\WiX\3.11.1\pyro.exe" -v "%INTERMEDIATE_DIRECTORY%\patch_en.wixmsp" -out "%INTERMEDIATE_DIRECTORY%\patch_en.msp" -t media1 "%INTERMEDIATE_DIRECTORY%\patch_en.wixmst"
Any idea why it is picking up ALL the binaries instead of just the 4 that I listed in the patch_en.wxs file (yes the compentref id are the same in the new/old installer)
Thanks,
Steve
Steve Ogilvie
Builds and Release
More information about the wix-users
mailing list