2012-11-09 242 views
4

我有一個Inno Script安裝程序,它給了用戶只安裝Firebird 32位版本的選項。現在我有一臺64位機器,並且已經使用6位Firebird來確認我的應用程序可以使用它,我希望我的安裝程序在32位平臺上顯示32位Firebird安裝程序,並在64位平臺上顯示64位安裝程序。用Inno Setup安裝正確版本的Firebird(32bit或64bit)

在「安裝操作」部分,我顯示了Firebird安裝程序的複選框,因此如果未安裝Firebird安裝程序或未運行Firebird安裝(如果已安裝Firebird安裝程序),則可以選擇安裝它。

這是我的腳本:

[Run] 

Filename: {app}\Firebird-2.5.1.26351_1_x64.exe; Parameters: "/SILENT /NOCPL"; WorkingDir: {app}; Flags: postinstall skipifsilent 64bit; Check: Is64BitInstallMode; 

Filename: {app}\Firebird-2.5.1.26351_1_Win32.exe; Parameters: "/SILENT /NOCPL"; WorkingDir: {app}; Flags: postinstall skipifsilent 32bit; Check: "not Is64BitInstallMode"; 

的問題是,只有32位安裝程序將顯示對話框形式。

兩個文件都包括在內,以便我的應用程序中都提供安裝:

[Files] 

Source: ..\Firebird-2.5.1.26351_1_x64.exe; DestDir: {app} 

Source: ..\Firebird-2.5.1.26351_1_Win32.exe; DestDir: {app} 

我怎樣才能讓我的安裝程序,以顯示在64位平臺上的64位火鳥安裝?

感謝

回答

5

有完全這樣做(安裝在Win32或32位版本的Win64上64位)中所安裝的用InnoSetup的Examples\64BitTwoArch.iss文件的例子。

; -- 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"