From 56e3a193560bfde0d765f00be220d2195653392e Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Thu, 27 Feb 2025 17:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/development.json | 57 ++++++++++++++++++++++++++ config/{build.json => production.json} | 0 config/xy.json | 3 +- package.json | 4 +- 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 config/development.json rename config/{build.json => production.json} (100%) diff --git a/config/development.json b/config/development.json new file mode 100644 index 0000000..61d5366 --- /dev/null +++ b/config/development.json @@ -0,0 +1,57 @@ +{ + "appId": "agora.io.ElectronApiExample", + "asar": true, + "asarUnpack": [ + "node_modules/agora-electron-sdk" + ], + "buildDependenciesFromSource": true, + "compression": "normal", + "productName": "智汇享", + "publish": [ + { + "provider": "generic", + "url": "http://192.168.2.9:8827" + } + ], + "files": [ + "!*.log" + ], + "win": { + "icon": "build/start.ico", + "requestedExecutionLevel": "highestAvailable", + "target": [ + { + "target": "nsis", + "arch": [ + "ia32" + ] + } + ] + }, + "directories": { + "output": "electron" + }, + "extraResources": [ + { + "from": "src/assets/virtualBackground", + "to": "images", + "filter": [ + "**/*" + ] + } + ], + "nsis": { + "oneClick": false, + "installerIcon": "build/install.ico", + "uninstallerIcon": "build/install.ico", + "installerHeaderIcon": "build/install.ico", + "allowToChangeInstallationDirectory": true, + "createDesktopShortcut": true, + "createStartMenuShortcut": true, + "deleteAppDataOnUninstall": true, + "shortcutName": "智汇享", + "allowElevation": true, + "perMachine": true, + "include": "build/install.nsh" + } +} \ No newline at end of file diff --git a/config/build.json b/config/production.json similarity index 100% rename from config/build.json rename to config/production.json diff --git a/config/xy.json b/config/xy.json index 643c891..2acb33e 100644 --- a/config/xy.json +++ b/config/xy.json @@ -51,6 +51,7 @@ "deleteAppDataOnUninstall": true, "shortcutName": "湖北襄阳四中教研平台", "allowElevation": true, - "perMachine": true + "perMachine": true, + "include": "build/install.nsh" } } \ No newline at end of file diff --git a/package.json b/package.json index af3da00..7d1214f 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "build:prod": "vite build --mode production", "build:xy": "vite build --mode xy", "preview": "vite preview", - "build:dev-win": "vite build --mode development & electron-builder -w --config=./config/build.json", - "build:prod-win": "vite build --mode production & electron-builder -w --config=./config/build.json", + "build:dev-win": "vite build --mode development & electron-builder -w --config=./config/development.json", + "build:prod-win": "vite build --mode production & electron-builder -w --config=./config/production.json", "build:prod-win-xy": "vite build --mode xy & electron-builder -w --config=./config/xy.json" }, "agora_electron": {