[wix-users] Patching
Christopher Painter
chrpai at iswix.com
Mon Nov 19 07:54:28 PST 2018
Are all your components each in their own fragment?
http://wixtoolset.org/documentation/manual/v3/patching/wix_patching.html
"A sample product is created which puts different resources into fragments. You put resources into separate fragments so that the resources in each fragment can be filtered out of a patch. You might filter some resources out of a patch if you want to limit the patch to update only parts of your product or products."
I'm not a patching expert but recently went through this whole story and got it working all the way to digitally signed patches that install/uninstall without UAC prompts. I'm still not sure why my customer wanted this as his MSI was only 9MB and 30 files but so be it. He really wanted to be able to create 30KB - 300KB patches even though AFAIK he's not installing to a huge amount of machines at a time.
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Steve Ogilvie via wix-users <wix-users at lists.wixtoolset.org>
Sent: Friday, November 16, 2018 4:26 PM
To: wix-users at lists.wixtoolset.org
Cc: Steve Ogilvie
Subject: [wix-users] Patching
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/
Patchwork - WiX Experts and Resources from FireGiant<https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/patchwork/>
www.firegiant.com
Patchwork. It wouldn't be terribly effective to create an upgrade installation package with megabytes of files in it just because one or two small files inside have to be renewed.
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
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list