一个32位MSI内的Wix 32和64位组件

时间:2017-05-04 16:43:21

标签: x86 wix 64-bit installer

我尝试了几个小时来创建一个32位安装程序,它集成了32位和64位版本的exe文件。但似乎64位exe从未集成到安装程序中。

应该可以将两个版本集成到一个安装程序中吗?如果两者都使用相同的路径和一切。我只希望根据安装32位或64位版本的条件。

wix文件如下所示:

<?xml version="1.0" encoding="UTF-8"?>

  ...

                       
<Product Id="0E69C1BC-D9CD-4886-83D6-6240AEDC4D4F" Name="!(loc.ApplicationName)" Language="!(loc.Language)" Version="$(var.VersionNumber)" Manufacturer="!(loc.ManufacturerFullName)" UpgradeCode="$(var.UpgradeCode)">
   …

  <Property Id="OFFICEVERSION">
    <RegistrySearch Id="OfficeVersion"
                    Root="HKCR"
                    Key="Outlook.Application\CurVer"
                  Type="raw" />
  </Property>

<Property Id="Office64" Value="no"/>

…

<Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">

...

      <!-- 32-Bit -->
      <Component Id="ml.32" Guid="{8739FAD5-28ED-4F19-B25A-8CC05BA87174}"  >
        <File Source="$(var.ProjectDir)..\build\x86\ml.exe" Id="mlExe" KeyPath="yes"/>
         <Condition><![CDATA[NOT Office64]]></Condition>
      </Component>

      <!-- 64-Bit -->
      <Component Id="ml.64" Guid="{8B6345EE-689D-4E13-882D-CF5B4F97252A}" >
        <File Source="$(var.ProjectDir)..\build\x64\ml.exe" Id="mlExe64" KeyPath="yes" />
       <Condition><![CDATA[Office64]]></Condition>
      </Component>

      …

    </ComponentGroup>
</Fragment>

有人对此有所了解吗?

1 个答案:

答案 0 :(得分:1)

32-bit packages do not support 64-bit components.要安装64位组件,您必须使用64-bit package