调整打包脚本使用 packaging 资源路径

This commit is contained in:
cat-shark
2026-06-20 18:37:23 +08:00
parent e3d4fd1aa1
commit c703229518
12 changed files with 168 additions and 120 deletions
@@ -13,7 +13,7 @@
"productName": "天英超级IP智能体",
"directories": {
"output": "dist-release-final",
"buildResources": "electron/resources/build"
"buildResources": "packaging/build-resources"
},
"afterPack": "./scripts/build_optimize.cjs",
"files": [
@@ -27,7 +27,17 @@
"*.html"
]
},
"scripts",
{
"from": "scripts",
"to": "scripts",
"filter": [
"**/*",
"!local-auth-server.cjs"
]
},
"!server/**/*",
"!admin-panel/**/*",
"!local-auth-data/**/*",
"!node_modules/date-fns{,/**/*}",
"!node_modules/fluent-ffmpeg{,/**/*}",
"!node_modules/ttf2woff2{,/**/*}",
@@ -102,7 +112,7 @@
"!node_modules/wait-on{,/**/*}"
],
"win": {
"icon": "electron/resources/build/logo.ico",
"icon": "packaging/build-resources/logo.ico",
"target": [
{
"target": "dir",
@@ -114,7 +124,7 @@
"artifactName": "${productName}-${version}-win-${arch}.${ext}",
"extraResources": [
{
"from": "electron/resources/extra",
"from": "packaging/resources",
"to": "extra",
"filter": [
"common/default-config.json",
@@ -157,11 +167,11 @@
]
},
{
"from": "electron/resources/voice-preview-cache",
"from": "packaging/resources/voice-preview-cache",
"to": "voice-preview-cache"
},
{
"from": "electron/resources/build",
"from": "packaging/build-resources",
"to": "build",
"filter": [
"tray.png",
@@ -185,9 +195,9 @@
"warningsAsErrors": false,
"runAfterFinish": true,
"allowElevation": true,
"installerIcon": "electron/resources/build/logo.ico",
"uninstallerIcon": "electron/resources/build/logo.ico",
"installerHeaderIcon": "electron/resources/build/logo.ico"
"installerIcon": "packaging/build-resources/logo.ico",
"uninstallerIcon": "packaging/build-resources/logo.ico",
"installerHeaderIcon": "packaging/build-resources/logo.ico"
},
"appx": {
"identityName": "IP",
@@ -200,7 +210,7 @@
]
},
"mac": {
"icon": "logo.icns",
"icon": "packaging/build-resources/logo.icns",
"target": [
{
"target": "dir",
@@ -213,7 +223,7 @@
"artifactName": "${productName}-${version}-mac-${arch}.${ext}",
"extraResources": [
{
"from": "electron/resources/extra",
"from": "packaging/resources",
"to": "extra",
"filter": [
"common",
@@ -221,7 +231,7 @@
]
},
{
"from": "electron/resources/voice-preview-cache",
"from": "packaging/resources/voice-preview-cache",
"to": "voice-preview-cache"
}
],
@@ -239,7 +249,7 @@
"identity": "Xi'an Yanyi Information Technology Co., Ltd (Q96H3H33RK)"
},
"linux": {
"icon": "logo.icns",
"icon": "packaging/build-resources/logo.icns",
"desktop": "logo",
"maintainer": "天英超级IP智能体",
"category": "Utility",
@@ -262,7 +272,7 @@
"artifactName": "${productName}-${version}-linux-${arch}.${ext}",
"extraResources": [
{
"from": "electron/resources/extra",
"from": "packaging/resources",
"to": "extra",
"filter": [
"common",
@@ -270,7 +280,7 @@
]
},
{
"from": "electron/resources/voice-preview-cache",
"from": "packaging/resources/voice-preview-cache",
"to": "voice-preview-cache"
}
]