在哪里可以在以下Patch XML中包含升级/目标映像?我需要包含Validate ProductId元素,这就是我不能使用以前的XML结构的原因。
<Patch AllowRemoval="yes"
Classification="Update"
Comments="Patch"
Description="Patch"
DisplayName="Patch"
Manufacturer="..."
MoreInfoURL="http://..."
TargetProductName="Szenario Rechner"
Codepage="1252">
<Media Id="1000"
Cabinet="Patch.cab"
EmbedCab="yes"
Source="Cab1" >
<PatchBaseline Id="RTM">
<Validate ProductId="no" />
</PatchBaseline>
</Media>
<PatchFamily Id='pf1'
Version='1.2.7.0'
Supersede='yes'>
<ComponentRef Id="Szenariorechner" />
</PatchFamily>
</Patch>
以下是我以前的补丁XML。
<PatchCreation Id="224C316C-5894-4771-BABF-21A3AC1F75FF"
CleanWorkingFolder="yes"
WholeFilesOnly="yes">
<PatchInformation Description="Patch 1.0.4475.23974"
Comments="Patch 1.0.4475.23974"
ShortNames="no"
Languages="1033"
Compressed="yes"
Manufacturer="..." />
<PatchMetadata AllowRemoval="yes"
Description="Patch 1.0.4475.23974"
ManufacturerName="..."
TargetProductName="Update"
MoreInfoURL="http://"
Classification="Update"
DisplayName="Patch 1.0.4475.23974" />
<Family DiskId="2"
MediaSrcProp="Sample"
Name="Update"
SequenceStart="600">
<UpgradeImage SourceFile="C:\new.msi"
Id="PatchUpgrade">
<TargetImage SourceFile="C:\old.msi"
Order="2"
Id="PatchUpgrade"
IgnoreMissingFiles="no" />
</UpgradeImage>
</Family>
<PatchSequence PatchFamily="SamplePatchFamily"
Sequence="1.0.4475.23974"
Supersede="yes" />
</PatchCreation>
答案 0 :(得分:1)
您的旧修补程序创作是指修补程序创建using Patch Creation Properties。您引用的新uses purely WiX。如您所见,后者不需要UpgradeImage / TargetImage对。
相反,您应该直接在TargetProductCodes根目录下创建Patch元素,并添加一些TargetProductCode元素作为其直接子元素:
<TargetProductCodes>
<TargetProductCode Id="PUT-PRODUCT-CODE-HERE" />
<TargetProductCode Id="PUT-PRODUCT-CODE-HERE" />
<TargetProductCode Id="PUT-PRODUCT-CODE-HERE" />
...
<TargetProductCode Id="PUT-PRODUCT-CODE-HERE" />
</TargetProductCodes>
构建补丁时,使用基本和更新的MSI(或WIXPDB)文件为torch.exe提供源以生成差异。希望它有用。我建议你再次通过“纯粹的WiX”方法来更好地理解它。