[wix-users] How do you patch files that is gathered by heat.exe?

Tyler Gustafson tgustafson at solacom.com
Fri Sep 23 06:32:56 PDT 2016


Glad to hear it!
You could probably run the commands as project Post-build events if you get fancy. I'm currently working on a powershell script that hunts down all .msi files in a folder tree and creates a patch that goes from any of them to the latest one with the intent of keeping a folder of all released to the wild builds somewhere and then integrating my powershell script into the build process. It's only mostly done at the moment but I can pass along what I have if you are interested.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Shintaro Takechi
Sent: September-22-16 9:40 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] How do you patch files that is gathered by heat.exe?

Thank you very much Tyler. I was able to create a msp file with the change properly affected the installed folder.
It is unfortunate that I have to make a batch file rather than running these on post-build events.
However, I achieved what I wanted and I am extremely grateful.

On Wed, Sep 21, 2016 at 5:32 AM, Tyler Gustafson <tgustafson at solacom.com>
wrote:

> I don't think you use heat to create patches, instead you use 
> previously authored installers. I am pulling them apart using an 
> administrative install. Apparently there is a way to not have to do 
> that and just use one of the pre-compile things from those installers 
> but I couldn't get that to work as it was always looking in the wrong 
> spot for the artifacts. This is my quick and dirty code but there are 
> lots of tutorials online. If you don't specify any component refs it 
> just assumes you want to use everything and the torch.exe figures out what differences to actually include.
>
> I have a patch.wxs that looks like this:
> <?xml version="1.0" encoding="utf-8"?> <Wix 
> xmlns="http://schemas.microsoft.com/wix/2006/wi">
>   <Patch AllowRemoval="yes" Manufacturer="Acme Corp" MoreInfoURL="
> http://www.dynamocorp.com/" DisplayName="Sample Patch" 
> Description="Small Update Patch" Classification="Update" MinorUpdateTargetRTM="yes">
>     <Media Id="5000" Cabinet="Patch.cab">
>       <PatchBaseline Id="Patch" />
>     </Media>
>     <PatchFamilyRef Id="SamplePatchFamily" />
>     <PatchFamily Id="SamplePatchFamily" Version="1.1.0.0000"
> Supersede="yes">
>       <!--<ComponentRef Id=MainExecutable/>-->
>     </PatchFamily>
>   </Patch>
> </Wix>
>
> And then two .msi here
> C:\1.0.0.0000\UpgradeScriptFiles.msi
> C:\1.1.0.0000\UpgradeScriptFiles.msi
>
> And then I run the following command lines to make a patch that will 
> upgrade from 1.0 to 1.1
>
> msiexec /a "C: \1.0.0.0000\UpgradeScriptFiles.msi" /qn /l*v 
> "%temp%\admin_1.0.log" TARGETDIR="%~dp0\Admin\1.0.0.0000"
> msiexec /a "C:\ 1.1.0.0000\UpgradeScriptFiles.msi" /qn /l*v 
> "%temp%\admin_1.1.log" TARGETDIR="%~dp0\Admin\1.1.0.0000"
>
> torch.exe -p -ax "Admin\Bin" -xo "Admin\1.0.0.0000\UpgradeScriptFiles.msi"
> "Admin\1.1.0.0000\UpgradeScriptFiles.msi" -out diff1.wixmst
>
> candle.exe patch.wxs
> light.exe Patch.wixobj
>
> pyro.exe patch.wixmsp -ext WixUIExtension -delta -v -out patch.msp -t 
> Patch diff1.wixmst
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of Shintaro Takechi
> Sent: September-20-16 5:12 PM
> To: WiX Toolset Users Mailing List
> Subject: [wix-users] How do you patch files that is gathered by heat.exe?
>
> Hi all,
>
> I am trying to make a patch for my product. I gather all of my built 
> files using the heat.
> From what I gathered patching is done via specifying ComponentRefs in 
> the PatchFamily.
> However, that is not realistic as it takes extremely long time to 
> track the change one by one.
> Is there any way to find the difference between the previous built and 
> gather just those files in the patch installer?
>
> Thank you
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
> --
> Scanned by Total Defense Email Cloud Security 
> http://cloud.totaldefense.com
>
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
--
Scanned by Total Defense Email Cloud Security http://cloud.totaldefense.com





More information about the wix-users mailing list