gpt4 book ai didi

installation - 如何在 Inno Setup 中设置 "Typical"和 "Custom"安装选项?

转载 作者:行者123 更新时间:2023-12-04 05:06:32 25 4
gpt4 key购买 nike

我见过很多软件给用户一个选项来安装具有典型设置的软件,或者允许用户选择他们喜欢的设置(比如他们是否想要桌面图标)。如何使用 Inno Setup 做到这一点?

最佳答案

有一个使用 Inno Setup 安装的示例。请参阅 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"

关于installation - 如何在 Inno Setup 中设置 "Typical"和 "Custom"安装选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4502362/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com