WiX和合并模块 - 包含或不包含策略文件?

时间:2016-09-06 18:38:49

标签: wix windows-installer merge-module wix3.10

我将VS 2005合并模块包含在MSI中。代码到位,MSI构建。

<Fragment>
  <DirectoryRef Id="TARGETDIR">

    <!-- 
    WiX docs say "There is generally no need to include the policy MSMs as part of the installation.", but, the former Installshield 
    project did include it, so, including here now. Remove it if it's actually not required. 
    http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_vcredist.html
    -->
    <Merge Id="VCRedist2005_32" SourceFile="$(var.RESOURCES)\MergeModules\VS2005\Microsoft_VC80_CRT_x86.msm" DiskId="1" Language="0"/>
    <Merge Id="VCRedist2005_64" SourceFile="$(var.RESOURCES)\MergeModules\VS2005\Microsoft_VC80_CRT_x86_x64.msm" DiskId="1" Language="0"/>
    <!--
    <Merge Id="VCRedistPolicy2005_32" SourceFile="$(var.RESOURCES)\MergeModules\VS2005\policy_8_0_Microsoft_VC80_CRT_x86.msm" DiskId="1" Language="0"/>
    <Merge Id="VCRedistPolicy2005_64" SourceFile="$(var.RESOURCES)\MergeModules\VS2005\policy_8_0_Microsoft_VC80_CRT_x86_x64.msm" DiskId="1" Language="0"/>
    -->

  </DirectoryRef>
</Fragment>

在我的Product.wxs中:

    <Feature ...>
        <ComponentRef Id="Client_Registry" />
        <?if $(var.Product) = xx ?>
            <MergeRef Id="VCRedist2005_32"/>
            <MergeRef Id="VCRedist2005_64"/>
            <!--
            <MergeRef Id="VCRedistPolicy2005_32"/>
            <MergeRef Id="VCRedistPolicy2005_64"/>
            -->
        <?endif?>
    </Feature>

我担心两个警告:

1>light.exe(0,0): warning LGHT1076: ICE25: Possible dependency failure as we do not find CRT.Policy.63E949F6_03BC_5C40_FF1F_C8B3B9A1E18E@0 v in ModuleSignature table
1>light.exe(0,0): warning LGHT1076: ICE25: Possible dependency failure as we do not find CRT.Policy.4F6D20F0_CCE5_1492_FF1F_C8B3B9A1E18E@0 v in ModuleSignature table

两条消息,因为我包括32位和64位合并模块。

我没有添加政策文件,因为wix page suggests not to。 MS博客页面也是backs that up。但是,有一些页面如this one,其中建议是包括它们。

所以,我不确定如何继续。是否应包含政策文件?如果没有,为什么不呢?

1 个答案:

答案 0 :(得分:0)

我总是喜欢引导vcredist运行时。保持我的MSI一切都很好,干净无问题。