0

I have a automated Setup creation on our build server, and try to create a patch between the released version and the current build version.

Sadly i can't get it working.

This is my Patch.wxs:

  <Patch  AllowRemoval="no" Manufacturer="Company" DisplayName="Product Patch" Description="Patch" Classification="Update">
    <Media Id="5000" Cabinet="RTM.cab">
      <PatchBaseline Id="RTM"/>
    </Media>
    <PatchFamily Id="SampleFamily" Version="1.0.0.0" Supersede="yes">
      <FeatureRef Id="ProductFeature"/>
    </PatchFamily>
  </Patch>

i use a postBuild to compile&link the patchfile:

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" $(ProjectDir)Patch.wxs -dDebug -dOutDir=$(TargetDir) -o Patch.wixobj 
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" $(TargetDir)Patch.wixobj -o  $(TargetDir)Patch.wixmsp

Until here everything works fine i guess. I create a transform using torch after a sucessfull build:

torch -p -xi release.wixpdb latestBuild.wixpdb -out diff.wixmst 

The diff is created successfully. Then pyro gives me an warning that no files are different:

pyro Patch.wixmsp -t RTM diff.wixmst -out patch.msp"
warning PYRO1079 : The cabinet 'RTM.cab' does not contain any files.  If this patch contains no files, this warning can likely be safely ignored.  Otherwise, try passing -p to torch.exe when first building the transforms, or add a ComponentRef to your PatchFamily authoring to pull changed files into the cabinet.

The files are different if i install the msi files i get two different installations. but if i install the patch nothing changes. I played around with the PatchFamily but i can't get it working.

How can i get the Patch file including my changes?

quadroid
  • 8,444
  • 6
  • 49
  • 82
  • The difference that counts is that the files in the updated MSI have incremented file versions, well the ones you want updated anyway. The rule that Windows Installer applies during patch install depends on file version changes, so there's no point in WiX tools looking for other differences. – PhilDW Sep 16 '14 at 18:11
  • How does the sample http://wixtoolset.org/documentation/manual/v3/patching/wix_patching.html work without having a changed file version? – quadroid Sep 16 '14 at 19:30
  • Test files aren't versioned. They are hashed, so if the file has changed it has the same hash and won't be updated. Look at this: http://msdn.microsoft.com/en-us/library/aa368267(v=vs.85).aspx – PhilDW Sep 17 '14 at 16:07

2 Answers2

0

The wix tools is seen to be failing to recognize file content change. To work properly do exactly as described in the WIX tutorial.

Here take special care to add version part in the source of the components, i.e 1.0 take component files from 1.0 source and say 2.0 takes source files from 2.0 root folder. This way file it is creating the patch as expected.

DiAgo
  • 351
  • 4
  • 6
-1

I found out what is causing this problem.

The Build server does not create a separate folder for each Build (just for the Drop, not for the Build itself) so at the time i create a patch both wixpdb files reference the same files of the build folder, thats why there are no differences found. I now changed the buildserver to create a administrative installation inside the drop folder and create a transform using the final msi files.

using the so created transform for pyro creates the msp as expected containing the changed files.

quadroid
  • 8,444
  • 6
  • 49
  • 82
  • can you explain what you did to solve this issue? I am also facing similar problem. I do not have automated build process but error is same. – Chaitanya Gadkari Oct 10 '15 at 11:19