如何为32及以上版本实施单个安装程序64个平台 [英] How to implement single installer for 32 & 64 platforms

查看:73
本文介绍了如何为32及以上版本实施单个安装程序64个平台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究基于WIX的安装程序.

I work on an WIX based installer.

安装程序将分别构建到32和64个平台.这两个平台的安装程序版本非常相似,但是有一些条件步骤,例如避免在32位安装程序中注册x64本机dll.

The installer builds to 32 and 64 platforms separately. The installers versions are very similar in both platforms but few conditional steps like avoid registering x64 native dlls in the 32 bit installer.

有没有办法将两个安装程序统一为一个?

Is there a way to unite both of the installers to one?

推荐答案

无法完成.这是Windows Installer的局限性,如果您希望这样做而又不做两倍大,那么您将需要两个带有外部CAB文件的MSI和一个引导程序来执行正确的安装.

It can't be done. It's a limitation of Windows Installer, if you want to do this without making it twice as large, then you'll need two MSI's with external CAB files and a bootstrapper to execute the correct installation.

如果您不需要MSI,请尝试 NSIS .您可以非常轻松地基于OS体系结构进行条件安装.

If you don't need an MSI, try NSIS. You can do conditional installation based on OS architecture pretty easily.

无论如何,

Anyway, this has been also asked on the WiX-users list a number of times in recent weeks, the best response I can find is this one from Blair:

标记为64位的MSI根本不会安装在32位系统上.没有 你可以的.

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

标记为32位的MSI根本无法将文件放入"64位目录" (它们将被重定向到32位等效"文件夹).你无能为力 做.

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.

MSI不能同时标记为32位和64位.您也无能为力.

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

正确"的方法是生成两个MSI,一个用于32位平台,另一个用于 另一个用于64位平台.他们可以共享相同的外部cab文件,如果 您需要将它们一起运送以节省空间.如果这样做,您可以使用 引导程序,用您的CAB提取适当的一个并安装它.

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.

这篇关于如何为32及以上版本实施单个安装程序64个平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆