Inno Setup 编译器打包多个exe和msi作为组件安装包的代码。效果如图:
脚本代码如下:
//创建于2020/11/27 www.baihang.design
[Setup]
#define MyAppName "XXX"
#define MyAppVersion "1.0.0.1"
#define MyAppPublisher "xxxxxx"
#define MyAppURL "http://www.baihang.desig"
#define MyAppExeName "XXX.exe"
#define AppSupportURL "www.baihang.design"
//定义安装包信息
AppId={
{47A165D0-6237-4B7D-915E-4C3779A70F93}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
LicenseFile={#file AddBackslash(SourcePath) + "soft\License.txt"}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName=RVIPlatform
DisableProgramGroupPage=yes
OutputBaseFilename=Install
OutputDir=C:\Users\lbwslzx\Desktop\Output
SetupIconFile=C:\Users\lbwslzx\Desktop\soft\installlogo.ico
//Uninstallable=yes
//UninstallDisplayName=卸载{#MyAppName}
//UninstallDisplayIcon=C:\Users\lbwslzx\Desktop\soft\uninstalllogo.ico
Compression=lzma
SolidCompression=yes
PrivilegesRequired=userappdata
WizardStyle=modern
VersionInfoCopyright=Copyright (C) 2020-2021 深圳市罗博威视科技有限公司
//安装语言
[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
//创建附加任务
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkable