我必须复制所有组件以使单个安装项目能够生成x64和x86包吗?

时间:2022-11-16 22:41:09

Instead of maintaining two installation projects for x86 and x64, I would like to use multiple Configurations and Release Flags to build both. I understand marking a component as x64 component prevents the installation from being run on 32-bit machines, however is this absolutely necessary for ALL components, at the Feature level, as described here? Ideally, I would only have to create x64 versions of components which matter, such as those with bitness-sensitive registry settings, COM and registry reflection options. I have over 500 components which would need to be duplicated..and this is just the first of the ten installers I need to maintain.

我不想为x86和x64维护两个安装项目,而是使用多个Configurations和Release Flags来构建这两个项目。我理解将组件标记为x64组件会阻止安装在32位计算机上运行,​​但对于所有组件,在功能级别上这是绝对必要的,如此处所述?理想情况下,我只需要创建重要的组件的x64版本,例如具有位敏感的注册表设置,COM和注册表反射选项的组件。我有500多个组件需要重复...这只是我需要维护的十个安装程序中的第一个。

Is it safe to just make some 64-bit components marked as 64-bit components?

将一些64位组件标记为64位组件是否安全?

1 个解决方案

#1


2  

You only have to duplicate a component and make it 64-bit if something about it needs to be 64-bit. The two fundamental requirements are installation to a 64-bit file location, or installation to a 64-bit registry location. The former includes C:\Program Files, as 32-bit components go to C:\Program Files (x86) instead. The latter also applies to self-registration or COM table entries.

您只需要复制一个组件并使其成为64位,如果有关它的东西需要64位。这两个基本要求是安装到64位文件位置或安装到64位注册表位置。前者包括C:\ Program Files,因为32位组件转到C:\ Program Files(x86)。后者也适用于自注册或COM表条目。

You do not have to use a 64-bit component to place an unregistered 64-bit file in a 32-bit location, and should not use a 64-bit component to deliver a 32-bit file to a 32-bit location. Note that if you've already released the 32-bit equivalent of a component, and are now making a 64-bit one, they each need to have different component codes. You won't feel the pain of breaking this rule if you block installation onto a machine with the other architecture, but you should still follow it.

您不必使用64位组件将未注册的64位文件放在32位位置,也不应使用64位组件将32位文件传送到32位位置。请注意,如果您已经发布了32位等效的组件,并且现在正在制作64位组件,则它们每个都需要具有不同的组件代码。如果阻止安装到具有其他体系结构的计算机上,您将不会感到违反此规则的痛苦,但您仍应遵循它。

#1


2  

You only have to duplicate a component and make it 64-bit if something about it needs to be 64-bit. The two fundamental requirements are installation to a 64-bit file location, or installation to a 64-bit registry location. The former includes C:\Program Files, as 32-bit components go to C:\Program Files (x86) instead. The latter also applies to self-registration or COM table entries.

您只需要复制一个组件并使其成为64位,如果有关它的东西需要64位。这两个基本要求是安装到64位文件位置或安装到64位注册表位置。前者包括C:\ Program Files,因为32位组件转到C:\ Program Files(x86)。后者也适用于自注册或COM表条目。

You do not have to use a 64-bit component to place an unregistered 64-bit file in a 32-bit location, and should not use a 64-bit component to deliver a 32-bit file to a 32-bit location. Note that if you've already released the 32-bit equivalent of a component, and are now making a 64-bit one, they each need to have different component codes. You won't feel the pain of breaking this rule if you block installation onto a machine with the other architecture, but you should still follow it.

您不必使用64位组件将未注册的64位文件放在32位位置,也不应使用64位组件将32位文件传送到32位位置。请注意,如果您已经发布了32位等效的组件,并且现在正在制作64位组件,则它们每个都需要具有不同的组件代码。如果阻止安装到具有其他体系结构的计算机上,您将不会感到违反此规则的痛苦,但您仍应遵循它。