menu E4b9a6's blog
rss_feed
E4b9a6's blog
有善始者实繁,能克终者盖寡。

Inno打包配置文件示例

作者:E4b9a6, 创建:2021-06-15, 字数:2238, 已阅:114, 最后更新:2024-03-10

这篇文章更新于 258 天前,文中部分信息可能失效,请自行甄别无效内容。

Inno Setup是Jordan Russell和Martijn Laan的Windows程序的免费安装程序

Inno Setup is a free installer for Windows programs by Jordan Russell and Martijn Laan. First introduced in 1997, Inno Setup today rivals and even surpasses many commercial installers in feature set and stability.

下面是仅供参考的配置文件,请注意时效性,随着Inno Setup版本更迭配置文件中的部分信息可能失效

INI
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "HelloWorld"
#define MyAppVersion "0.9"
#define MyAppPublisher "chancel's company"
#define MyAppURL "https://www.chancel.me/"
#define MyAppExeName "helloworld.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{8435E930-A931-4967-8844-46X547X3BD8D}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={userappdata}\{#MyAppName}
DisableProgramGroupPage=yes
DisableDirPage=no
;安装包的输出目录
OutputDir=D:\inno\output\{#MyAppName}
OutputBaseFilename={#MyAppName}_v{#MyAppVersion}
; 安装包的图标
;SetupIconFile=D:\inno\input\ico\_logo.ico
Compression=lzma
SolidCompression=yes
;此处 限制Windows最低版本为Windows 7
MinVersion=0.0,6.0


[Languages]
;安装语言许选择
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"

[Tasks]
;创建桌面快捷键
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone

[Files]
;打包源文件与要安装的目标文件夹,DestDir需要参考官网文档,有多个枚举可选择
Source: "D:\inno\input\Release\*"; DestDir: "{app}\"; Flags: recursesubdirs ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
;图标选择
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
;程序安装成功后入口执行程序
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

[[replyMessage== null?"发表评论":"发表评论 @ " + replyMessage.m_author]]

account_circle
email
web_asset
textsms

评论列表([[messageResponse.total]])

还没有可以显示的留言...
gravatar
[[messageItem.m_author]] [[messageItem.m_author]]
[[messageItem.create_time]]
[[getEnviron(messageItem.m_environ)]]
[[subMessage.m_author]] [[subMessage.m_author]] @ [[subMessage.parent_message.m_author]] [[subMessage.parent_message.m_author]]
[[subMessage.create_time]]
[[getEnviron(messageItem.m_environ)]]