From da8216e2caa580b1881b5352613b2e1874f44113 Mon Sep 17 00:00:00 2001 From: alger Date: Tue, 21 May 2024 08:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20refactor:=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=89=93=E5=8C=85=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/win32.json | 31 +++++++++++++++++++++++++++++++ build/win64.json | 31 +++++++++++++++++++++++++++++++ build/winarm64.json | 31 +++++++++++++++++++++++++++++++ package.json | 19 +++++++++---------- 4 files changed, 102 insertions(+), 10 deletions(-) create mode 100644 build/win32.json create mode 100644 build/win64.json create mode 100644 build/winarm64.json diff --git a/build/win32.json b/build/win32.json new file mode 100644 index 0000000..a1d095d --- /dev/null +++ b/build/win32.json @@ -0,0 +1,31 @@ +{ + "appId": "com.alger.music", + "productName": "AlgerMusic", + "artifactName": "${productName}_${version}_Setup_x86.${ext}", + "directories": { + "output": "dist_electron/win-x86" + }, + "files": ["dist/**/*", "package.json", "app.js", "electron/**/*"], + "win": { + "icon": "public/icon.png", + "target": [ + { + "target": "nsis", + "arch": ["ia32"] + } + ], + "extraFiles": [ + { + "from": "installer/installer.nsh", + "to": "$INSTDIR" + } + ] + }, + "nsis": { + "oneClick": false, + "language": "2052", + "allowToChangeInstallationDirectory": true, + "differentialPackage": true, + "shortcutName": "Alger Music" + } +} diff --git a/build/win64.json b/build/win64.json new file mode 100644 index 0000000..98dfb45 --- /dev/null +++ b/build/win64.json @@ -0,0 +1,31 @@ +{ + "appId": "com.alger.music", + "productName": "AlgerMusic", + "artifactName": "${productName}_${version}_Setup_x64.${ext}", + "directories": { + "output": "dist_electron/win-x64" + }, + "files": ["dist/**/*", "package.json", "app.js", "electron/**/*"], + "win": { + "icon": "public/icon.png", + "target": [ + { + "target": "nsis", + "arch": ["x64"] + } + ], + "extraFiles": [ + { + "from": "installer/installer.nsh", + "to": "$INSTDIR" + } + ] + }, + "nsis": { + "oneClick": false, + "language": "2052", + "allowToChangeInstallationDirectory": true, + "differentialPackage": true, + "shortcutName": "Alger Music" + } +} diff --git a/build/winarm64.json b/build/winarm64.json new file mode 100644 index 0000000..d0ea633 --- /dev/null +++ b/build/winarm64.json @@ -0,0 +1,31 @@ +{ + "appId": "com.alger.music", + "productName": "AlgerMusic", + "artifactName": "${productName}_${version}_Setup_arm64.${ext}", + "directories": { + "output": "dist_electron/win-arm64" + }, + "files": ["dist/**/*", "package.json", "app.js", "electron/**/*", "!node_modules/**/*"], + "win": { + "icon": "public/icon.png", + "target": [ + { + "target": "nsis", + "arch": ["arm64"] + } + ], + "extraFiles": [ + { + "from": "installer/installer.nsh", + "to": "$INSTDIR" + } + ] + }, + "nsis": { + "oneClick": false, + "language": "2052", + "allowToChangeInstallationDirectory": true, + "differentialPackage": true, + "shortcutName": "Alger Music" + } +} diff --git a/package.json b/package.json index 5550899..604ae13 100644 --- a/package.json +++ b/package.json @@ -8,21 +8,22 @@ "dev": "vite", "build": "vite build", "serve": "vite preview", - "es": "vite && electron .", "start": "set NODE_ENV=development&&electron .", - "sp": "electron .", - "e:b": "electron-builder --config ./electron.config.json", - "eb": "vite build && e:b", - "lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0" + "lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0", + "b:win:x64": "electron-builder --config ./build/win64.json", + "b:win:x86": "electron-builder --config ./build/win32.json", + "b:win:arm": "electron-builder --config ./build/winarm64.json" }, "dependencies": { + "electron-store": "^8.1.0" + }, + "devDependencies": { "@tailwindcss/postcss7-compat": "^2.2.4", "@vue/runtime-core": "^3.3.4", "@vueuse/core": "^10.7.1", "@vueuse/electron": "^10.9.0", "autoprefixer": "^9.8.6", "axios": "^0.21.1", - "electron-store": "^8.1.0", "lodash": "^4.17.21", "naive-ui": "^2.34.4", "postcss": "^7.0.36", @@ -31,15 +32,13 @@ "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.4", "vue": "^3.3.4", "vue-router": "^4.2.4", - "vuex": "^4.1.0" - }, - "devDependencies": { + "vuex": "^4.1.0", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "@vitejs/plugin-vue": "^4.2.3", "@vue/compiler-sfc": "^3.3.4", "@vue/eslint-config-typescript": "^12.0.0", - "electron": "^30.0.6", + "electron": "^30.0.0", "electron-builder": "^24.13.0", "eslint": "^8.56.0", "eslint-config-airbnb-base": "^15.0.0",