94 lines
2.4 KiB
YAML
94 lines
2.4 KiB
YAML
# Windows Desktop App - Windows桌面应用示例配置
|
|
# 这个示例展示了如何为Windows桌面应用配置MSI安装包
|
|
|
|
name: "WindowsDesktopApp"
|
|
version: "1.2.0"
|
|
description: "A Windows desktop application"
|
|
author: "Windows Developer"
|
|
license: "Proprietary"
|
|
|
|
# 构建目标 - 为Windows生成MSI安装包
|
|
targets:
|
|
- platform: "windows"
|
|
arch: "amd64"
|
|
packageType: "msi"
|
|
outputPath: "dist/windows"
|
|
|
|
# 文件 - 指定要包含在安装包中的文件
|
|
files:
|
|
- source: "bin/win-app.exe"
|
|
destination: "bin/win-app.exe"
|
|
permissions: "0755"
|
|
- source: "assets/icon.ico"
|
|
destination: "assets/icon.ico"
|
|
permissions: "0644"
|
|
- source: "docs/README.md"
|
|
destination: "docs/README.md"
|
|
permissions: "0644"
|
|
|
|
# 目录 - 指定要包含在安装包中的目录
|
|
directories:
|
|
- source: "lib"
|
|
destination: "lib"
|
|
permissions: "0755"
|
|
recursive: true
|
|
|
|
# Windows特定配置
|
|
plugins:
|
|
msi:
|
|
# MSI安装包属性
|
|
productCode: "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" # 必须唯一
|
|
upgradeCode: "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" # 用于升级
|
|
manufacturer: "Windows App Company"
|
|
|
|
# 安装界面配置
|
|
ui:
|
|
banner: "assets/install-banner.bmp"
|
|
background: "assets/install-background.bmp"
|
|
licenseFile: "LICENSE.rtf"
|
|
|
|
# 快捷方式配置
|
|
shortcuts:
|
|
- name: "Windows Desktop App"
|
|
target: "[INSTALLDIR]bin\\win-app.exe"
|
|
workingDirectory: "INSTALLDIR"
|
|
icon: "assets/icon.ico"
|
|
iconIndex: 0
|
|
location: "Desktop"
|
|
|
|
- name: "Windows Desktop App"
|
|
target: "[INSTALLDIR]bin\\win-app.exe"
|
|
workingDirectory: "INSTALLDIR"
|
|
icon: "assets/icon.ico"
|
|
iconIndex: 0
|
|
location: "StartMenu"
|
|
|
|
# 注册表项
|
|
registry:
|
|
- root: "HKCU"
|
|
key: "Software\\WindowsDesktopApp"
|
|
values:
|
|
- name: "InstallPath"
|
|
type: "string"
|
|
value: "[INSTALLDIR]"
|
|
- name: "Version"
|
|
type: "string"
|
|
value: "1.2.0"
|
|
|
|
# 安装前脚本 - 检查系统要求
|
|
preInstall:
|
|
path: "scripts/win-pre-install.ps1"
|
|
type: "powershell"
|
|
args: ["-ExecutionPolicy", "Bypass"]
|
|
|
|
# 安装后脚本 - 注册应用
|
|
postInstall:
|
|
path: "scripts/win-post-install.ps1"
|
|
type: "powershell"
|
|
args: ["-ExecutionPolicy", "Bypass"]
|
|
|
|
# 依赖项 - Windows应用运行所需的依赖
|
|
dependencies:
|
|
- name: ".NET Runtime"
|
|
version: "6.0.0"
|
|
type: "runtime" |