2010-12-21 90 views

回答

6

有这样做只是这与创新安装安装的样本。查看Inno Setup自带的Inno Setup 5 \ Examples \ Components.iss文件。

的例子显示了打造“全”,“紧凑型”,并在一个单一的Setup.exe文件“自定义”安装选项。

; -- Components.iss -- 
; Demonstrates a components-based installation. 

; 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 
OutputDir=userdocs:Inno Setup Examples Output 

[Types] 
Name: "full"; Description: "Full installation" 
Name: "compact"; Description: "Compact installation" 
Name: "custom"; Description: "Custom installation"; Flags: iscustom 

[Components] 
Name: "program"; Description: "Program Files"; Types: full compact custom; Flags: fixed 
Name: "help"; Description: "Help File"; Types: full 
Name: "readme"; Description: "Readme File"; Types: full 
Name: "readme\en"; Description: "English"; Flags: exclusive 
Name: "readme\de"; Description: "German"; Flags: exclusive 

[Files] 
Source: "MyProg.exe"; DestDir: "{app}"; Components: program 
Source: "MyProg.chm"; DestDir: "{app}"; Components: help 
Source: "Readme.txt"; DestDir: "{app}"; Components: readme\en; Flags: isreadme 
Source: "Readme-German.txt"; DestName: "Liesmich.txt"; DestDir: "{app}"; Components: readme\de; Flags: isreadme 

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

我认为你应该使用[Code]

由肯·怀特只有作品与文件提供给包括/从安装中排除的答案。

它不会禁用目录页或询问用户,如果他愿意与否桌面图标的页面。 (例如)

退房的例子:CodeClasses.issC:\Program Files\Inno Setup 5\Examples

+0

没有一个提到的禁止目录。页。 OP询问如何进行设置,使用户能够选择他们喜欢的设置(比如他们是否需要桌面图标)。“*这正是Ken在答案中所展示的。此外,您不需要使用`[Code]`部分来禁用dir。页。 – TLama 2014-11-18 11:19:13

相关问题