WiX: Building a Patch using the new Patch Building System – Part I


This content was moved here.

Comments (7)

  1. Cosmin says:

    Hi Petre,

    Thanks for your tutorial and your effort to wix project.

    I tested the new system and looks great.

    I need to choose now between this new patching system and the pcp way. The update for my product will be released in ~2 months. The choise depends if the new patching system will include or not delta patching within these 2 months. Can you please advice?

    Regards

    Cosmin

  2. Petermarcu says:

    The Delta patch work is in progress but I cant guarantee that it will be done within 2 months. We are hoping to have something working by mid October but this is just a hope.

  3. Cosmin says:

    Thank you very much. I will prepare the build to use the new patching system.

  4. Preethi Selvaraj says:

    Hi,

    I've created the patch file using the below steps.

    1) Extracted the prev and new msi using msiexec /a TARGETDIR=

    2) Using the below patch.wxs script i created the .pcp file.

    Collapse

    <?xml version="1.0" encoding="utf-8"?>

    <Wix xmlns="schemas.microsoft.com/…/wi">

     <!– Include wxi files –>

     <?include $(sys.CURRENTDIR)includes.wxi ?>

     <PatchCreation

         Id="ENTER_YOUR_GUID_HERE"

         AllowMajorVersionMismatches="no"

         AllowProductCodeMismatches="no"

         CleanWorkingFolder="yes"

         OutputPath="patch.pcp"

         WholeFilesOnly="no"

           >

       <PatchInformation

           Description="$(var.PatchDesc)"

           Comments="$(var.PatchDisplayName)"

           ShortNames="no"

           Languages="1033"

           Compressed="yes"

           Manufacturer="$(var.Manufacturer)"/>

       <PatchMetadata

           AllowRemoval="yes"

           Description="$(var.PatchDesc)"

           ManufacturerName="$(var.Manufacturer)"

           TargetProductName="$(var.ProductName)"

           MoreInfoURL="$(var.OEMUrl)"

           Classification="Service Pack"

           DisplayName="$(var.PatchDisplayName)"

           OptimizedInstallMode="yes"/>

       <Family DiskId="5000"

           MediaSrcProp="$(var.OEMProductLine)"

           Name="$(var.OEMProductLine)"

           SequenceStart="16000">

         <UpgradeImage SourceFile="$(var.UpgradeFileSrc)"

                       Id="UpgradeImage">

           <TargetImage SourceFile="$(var.TargetFileSrc)"

                        Order="2"

                        Id="TargetImage"

                        IgnoreMissingFiles="no" />

         </UpgradeImage>

       </Family>

       <PatchSequence PatchFamily="SCMPatchFamily"

           Sequence="1.0.0.0"

           Supersede="yes" />

     </PatchCreation>

    </Wix>

    Note: Passed the upgrade image and target image through "candle". Using "light" created the .pcp file

    3) After creating the .pcp file, created an msp file by running "msimsp.exe -s patch.pcp -p patch.msp -l patch_scm.log"

    4)patch.msp is successfully created and in log file i can able to see the modified files. In ORCA also, I can able to see the difference. (Open Prev msi, then Transform->View Patch).

    5) But after applying patch, the modifications is not reflected.

    Please add your suggestions and tell me whether i am missing anything. Thanks.