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": {