From f39b665f865ad6fa392662d1be492a0b4461b2a0 Mon Sep 17 00:00:00 2001 From: farion1231 Date: Wed, 6 Aug 2025 23:09:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=BA=94=E7=94=A8=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=EF=BC=9A=E6=94=AF=E6=8C=81=20Windows=20NSIS=20?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=8C=85=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加跨平台图标配置(Windows .ico、macOS .icns、Linux .png) - 配置 Windows 双重构建目标:NSIS 安装程序 + Portable 版本 - 解决 Windows 下 exe 文件显示默认图标的问题 - NSIS 安装程序版本可正确显示自定义图标 --- package.json | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5dff7bc..22033e7 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "directories": { "output": "release" }, + "icon": "build/icon.ico", "files": [ "dist/**/*", "node_modules/**/*", @@ -50,13 +51,25 @@ "!node_modules/.bin" ], "mac": { - "category": "public.app-category.developer-tools" + "category": "public.app-category.developer-tools", + "icon": "build/icon.icns" }, "win": { - "target": "portable" + "target": [ + { + "target": "nsis", + "arch": ["x64"] + }, + { + "target": "portable", + "arch": ["x64"] + } + ], + "icon": "build/icon.ico" }, "linux": { - "target": "AppImage" + "target": "AppImage", + "icon": "build/icon.png" } } } \ No newline at end of file