[wix-users] Wix patch can't detect changes

Souren souren at gmail.com
Fri Jun 10 14:16:38 PDT 2016


This is my component:

     <Component Id="ServiceComponent" Directory="INSTALLFOLDER">
          <File Id="ServiceExecutable"
              Name="$(var.LoggerService.TargetFileName)"
              Source="$(var.LoggerService.TargetPath)"
              Vital="yes"
              KeyPath="yes"
              DiskId="1" />
      ...

This is my patch:

    <?xml version="1.0" encoding="UTF-8"?>
>>     <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
>>       <Patch AllowRemoval='yes' Manufacturer='Test Ltd.' MoreInfoURL='
>> www.test.com'
>>         DisplayName='Test Patch' Description='Small Update Patch'
>> Classification='Update'>
>>
>>         <Media Id='5000' Cabinet='Patch.cab'>
>>           <PatchBaseline Id='Sample' />
>>         </Media>
>>
>>         <PatchFamilyRef Id="SamplePatchFamily"/>
>>
>>       </Patch>
>>
>>       <Fragment>
>>         <PatchFamily Id='SamplePatchFamily' Version='1.0.0.0'
>> Supersede='yes'>
>>           <ComponentRef Id='ServiceComponent' />
>>         </PatchFamily>
>>       </Fragment>
>>     </Wix>
>>
>
This is my patch generator script:

    torch.exe -p -xi bin\Debug\1.1\SetupLogger.wixpdb
> bin\Debug\1.2\SetupLogger.wixpdb -out diff.wixmst
>     candle.exe patch.wxs
>     light.exe patch.wixobj -out patch.wixmsp
>     pyro.exe patch.wixmsp -out patch.msp -t Sample diff.wixmst
>

If I modify the file `ServiceExecutable` in the same path
`$(var.LoggerService.TargetPath)` then Wix doesn't detect any change and
saying to me:

    warning PYRO1079 : The cabinet 'Patch.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.
>     diff.wixmst : error PYRO0227 : The transform being built did not
> contain any differences so it could not be created.
>

However, if I modify the file `ServiceExecutable` and put it in the new
dir, then specify that new dir in the File source tag, then the change is
picked up by Wix and everything is fine.

Question: how can I make Wix to detect the change without changing source
path? I think Wix should be able to detect change because the checksum of
the `KeyPath` file has been changed.

Best regards,
Souren


More information about the wix-users mailing list