0

我在以下补丁 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>
4

1 回答 1

1

您的旧补丁创作是指使用 Patch Creation Properties创建补丁。您作为新引用的那个纯粹使用 WiX。如您所见,后一个不需要UpgradeImage / TargetImage对。

相反,您应该直接在Patch根下创作一个TargetProductCodes元素,并添加许多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>

当您构建补丁时,您向 torch.exe 提供基本和更新的 MSI(或 WIXPDB)文件以生成差异。希望它有帮助。我建议您再次查看“纯 WiX”方法以更好地理解它。

于 2012-04-03T19:16:48.003 回答