如何实现32和64平台的单一安装程序

前端之家收集整理的这篇文章主要介绍了如何实现32和64平台的单一安装程序前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用基于WIX的安装程序。

安装程序分别构建到32和64个平台。安装程序版本在两个平台上都非常相似,但很少的条件步骤,例如避免在32位安装程序中注册x64本机dll。

有没有办法将两个安装人员统一到一个?

它不能完成这是Windows Installer的一个限制,如果你想做到这一点不要两倍,那么你需要两个MSI的外部CAB文件和一个引导程序来执行正确的安装。

如果您不需要MSI,请尝试使用NSIS.您可以轻松地基于OS架构进行有条件的安装。

无论如何,this has been also asked on the WiX-users list在最近几周的很多次,最好的反应,我可以找到这是从布莱尔:

An MSI marked as 64-bit simply will not install on a 32-bit system. Nothing
you can do.

An MSI marked as 32-bit simply cannot place files into a “64-bit directory”
(they will be redirected to 32-bit “equivalent” folders). Nothing you can
do.

An MSI cannot be marked as both 32- and 64-bit. Also nothing you can do.

The “correct” method is to generate two MSIs,one for 32-bit platforms and another for 64-bit platforms. They can share the same external cab files if you need to ship them together to save space. If you do that,you can use a bootstrapper to extract the appropriate one with your CAB(s) and install it.

猜你在找的设计模式相关文章