gpt4 book ai didi

installation - 使用 Wix 安装 32 位和 64 位驱动程序?

转载 作者:行者123 更新时间:2023-12-04 01:57:35 25 4
gpt4 key购买 nike

我有一个 Wix 项目,当使用 x86 发布配置构建时,我想从中安装 32 位驱动程序,并在使用 x64 构建时安装 64 位驱动程序。

我刚才这样做的方式是使用两个相同的项目,但一个引用 diffxapp_x86,另一个引用 diffxapp_x64。我可以改进吗?

另外,如果我引用 diffxapp_x86 并构建 64 位版本,那么不出所料,我会收到 msi 错误:

"DIFXAPP: ERROR - You need to use the 64-bit version of DIFXAPP.DLL to install drivers on this machine."



是否可以根据所选的构建配置有条件地引用这些?

谢谢,
艾伦

最佳答案

我设法找到了一个解决方案,其中涉及手动编辑项目文件。

我更改了以下部分:

<ItemGroup>
<WixLibrary Include="difxapp_x86">
<HintPath>C:\Program Files\Windows Installer XML v3.5\bin\difxapp_x86.wixlib</HintPath>
<Name>difxapp_x86</Name>
</WixLibrary>
</ItemGroup>

对以下内容:
<ItemGroup>
<WixLibrary Include="difxapp_$(Platform)">
<HintPath>C:\Program Files\Windows Installer XML v3.5\bin\difxapp_$(Platform).wixlib</HintPath>
<Name>difxapp_x86</Name>
</WixLibrary>
</ItemGroup>

现在引用的路径将由 Platform 变量的状态决定。希望它可以帮助其他有相同要求的人。

艾伦

关于installation - 使用 Wix 安装 32 位和 64 位驱动程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8713683/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com