From 38a4d4512f3c634e923192f01bbcbd2cc0687634 Mon Sep 17 00:00:00 2001 From: Elysia Date: Wed, 28 Jan 2026 20:33:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0electron-builder.yml?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron-builder.json5 | 63 ------------------------------------------ electron-builder.yml | 50 +++++++++++++++++++++++++++++++++ package.json | 8 +++--- 3 files changed, 54 insertions(+), 67 deletions(-) delete mode 100644 electron-builder.json5 create mode 100644 electron-builder.yml diff --git a/electron-builder.json5 b/electron-builder.json5 deleted file mode 100644 index a1951190..00000000 --- a/electron-builder.json5 +++ /dev/null @@ -1,63 +0,0 @@ -// @see https://www.electron.build/configuration/configuration -{ - "$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json", - "appId": "apm-app-store", - "asar": true, - "productName": "apm-app-store", - "directories": { - "output": "release/${version}" - }, - "files": [ - "dist", - "dist-electron" - ], - "deb": { - "depends": [ - "libgtk-3-0", - "libnotify4", - "libnss3", - "libxss1", - "libxtst6", - "xdg-utils", - "libatspi2.0-0", - "libuuid1", - "libsecret-1-0", - "apm" - ] - }, - "rpm": { - "depends": [ - "gtk3", - "libnotify", - "nss", - "libXScrnSaver", - "libXtst", - "xdg-utils", - "at-spi2-core", - "libuuid", - "libsecret", - "apm" - ] - }, - "linux": { - "icon": "public/amber-pm-logo.icns", - "category": "System", - "executableName": "apm-app-store", - "desktop": { - "entry": { - "Name": "APM AppStore", - "Name[zh_CN]": "APM 应用商店", - "Comment": "Client for APM App Store", - "Comment[zh_CN]": "APM 应用商店客户端", - "StartupWMClass": "apm-app-store", - "MimeType": "x-scheme-handler/apmstore" - } - }, - "target": [ - "AppImage", - "deb", - "rpm" - ], - "artifactName": "${productName}-Linux-${version}.${ext}" - } -} diff --git a/electron-builder.yml b/electron-builder.yml new file mode 100644 index 00000000..5e369b6f --- /dev/null +++ b/electron-builder.yml @@ -0,0 +1,50 @@ +appId: "store.spark-app.apm" +asar: true +productName: "apm-app-store" +artifactName: "apm-app-store_${version}_${os}.${ext}" +directories: + output: "release/${version}" +files: + - "dist" + - "dist-electron" + +linux: + icon: "public/amber-pm-logo.icns" + category: "System" + executableName: "apm-app-store" + desktop: + entry: + Name: "APM AppStore" + Name[zh_CN]: "APM 应用商店" + Type: "Application" + Categories: "System;" + mimeTypes: + - "x-scheme-handler/apmstore" + target: + - "AppImage" + - "deb" + - "rpm" +deb: + depends: + - "libgtk-3-0" + - "libnotify4" + - "libnss3" + - "libxss1" + - "libxtst6" + - "xdg-utils" + - "libatspi2.0-0" + - "libuuid1" + - "libsecret-1-0" + - "apm" +rpm: + depends: + - "gtk3" + - "libnotify" + - "nss" + - "libXScrnSaver" + - "libXtst" + - "xdg-utils" + - "at-spi2-core" + - "libuuid" + - "libsecret" + - "apm" \ No newline at end of file diff --git a/package.json b/package.json index 0d4f4c10..000ee022 100644 --- a/package.json +++ b/package.json @@ -22,17 +22,17 @@ "type": "module", "scripts": { "dev": "vite --mode debug | pino-pretty", - "build": "vue-tsc --noEmit && vite build --mode production && electron-builder", - "build:rpm": "vue-tsc --noEmit && vite build --mode production && electron-builder --linux rpm", - "build:deb": "vue-tsc --noEmit && vite build --mode production && electron-builder --linux deb", + "build": "vue-tsc --noEmit && vite build --mode production && electron-builder --config electron-builder.yml", + "build:rpm": "vue-tsc --noEmit && vite build --mode production && electron-builder --config electron-builder.yml --linux rpm", + "build:deb": "vue-tsc --noEmit && vite build --mode production && electron-builder --config electron-builder.yml --linux deb", "preview": "vite preview --mode debug" }, "devDependencies": { "@dotenvx/dotenvx": "^1.51.4", + "@loongdotjs/electron-builder": "^26.0.12-1", "@vitejs/plugin-vue": "^5.0.4", "electron": "^39.2.7", "electron-app-universal-protocol-client": "github:witcher112/electron-app-universal-protocol-client", - "electron-builder": "^24.13.3", "pino-pretty": "^13.1.3", "typescript": "^5.4.2", "vite": "^5.1.5",