Inno-setup 32 位和 64 位合二为一

Posted

技术标签:

【中文标题】Inno-setup 32 位和 64 位合二为一【英文标题】:Inno-setup 32bit and 64bit in one 【发布时间】:2011-06-17 13:22:26 【问题描述】:

是否可以在 64 位安装时添加“x64.dll”文件,在 32 位安装时添加“x86.dll”文件?

【问题讨论】:

【参考方案1】:

这是可能的。看看 64BitTwoArch.iss 示例(尤其是 Is64BitInstallMode 布尔值):

; -- 64BitTwoArch.iss --
; Demonstrates how to install a program built for two different
; architectures (x86 and x64) using a single installer.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName=pf\My Program
DefaultGroupName=My Program
UninstallDisplayIcon=app\MyProg.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
; On all other architectures it will install in "32-bit mode".
ArchitecturesInstallIn64BitMode=x64
; Note: We don't set ProcessorsAllowed because we want this
; installation to run on all architectures (including Itanium,
; since it's capable of running 32-bit code too).

[Files]
; Install MyProg-x64.exe if running in 64-bit mode (x64; see above),
; MyProg.exe otherwise.
Source: "MyProg-x64.exe"; DestDir: "app"; DestName: "MyProg.exe"; Check: Is64BitInstallMode
Source: "MyProg.exe"; DestDir: "app"; Check: not Is64BitInstallMode
Source: "MyProg.chm"; DestDir: "app"
Source: "Readme.txt"; DestDir: "app"; Flags: isreadme

[Icons]
Name: "group\My Program"; Filename: "app\MyProg.exe"

【讨论】:

看来还有一个相关的IsWin64布尔方法***.com/questions/3618049/…

以上是关于Inno-setup 32 位和 64 位合二为一的主要内容,如果未能解决你的问题,请参考以下文章

电脑32位和64位有啥区别 电脑32位和64位的区别

32位和64位系统的区别

64位和32位是啥?

navicat for mysql 64位和32位区别,win7 64位下用32位和64位有区别吗??

目前计算机上主流的Windows操作系统分为32位和多少位?

TestComplete 64位和32位之间的区别