配置应用图标:支持 Windows NSIS 安装包正确显示图标

- 添加跨平台图标配置(Windows .ico、macOS .icns、Linux .png)
- 配置 Windows 双重构建目标:NSIS 安装程序 + Portable 版本
- 解决 Windows 下 exe 文件显示默认图标的问题
- NSIS 安装程序版本可正确显示自定义图标
This commit is contained in:
farion1231
2025-08-06 23:09:29 +08:00
parent 1a7c3fcec5
commit f39b665f86

View File

@@ -41,6 +41,7 @@
"directories": { "directories": {
"output": "release" "output": "release"
}, },
"icon": "build/icon.ico",
"files": [ "files": [
"dist/**/*", "dist/**/*",
"node_modules/**/*", "node_modules/**/*",
@@ -50,13 +51,25 @@
"!node_modules/.bin" "!node_modules/.bin"
], ],
"mac": { "mac": {
"category": "public.app-category.developer-tools" "category": "public.app-category.developer-tools",
"icon": "build/icon.icns"
}, },
"win": { "win": {
"target": "portable" "target": [
{
"target": "nsis",
"arch": ["x64"]
},
{
"target": "portable",
"arch": ["x64"]
}
],
"icon": "build/icon.ico"
}, },
"linux": { "linux": {
"target": "AppImage" "target": "AppImage",
"icon": "build/icon.png"
} }
} }
} }