From 7607fb25168735d5a3c93945d6514fb3383258da Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Tue, 10 Dec 2024 10:12:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B8=E5=B7=9D2=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron-builder-yc2.yml | 54 ++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 electron-builder-yc2.yml diff --git a/electron-builder-yc2.yml b/electron-builder-yc2.yml new file mode 100644 index 0000000..e405225 --- /dev/null +++ b/electron-builder-yc2.yml @@ -0,0 +1,54 @@ +appId: com.electron.app.yc2 +productName: 实训教学 +directories: + output: dist + buildResources: build +win: + executableName: 实训教学 + icon: resources/logo2.ico +files: + - '!**/.vscode/*' + - '!src/*' + - '!electron.vite.config.{js,ts,mjs,cjs}' + - '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' + - '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' +asarUnpack: + - resources/** +nsis: + oneClick: false + allowToChangeInstallationDirectory: true + artifactName: ${name}-yc-${version}-setup.${ext} + shortcutName: ${productName} + uninstallDisplayName: ${productName} + createDesktopShortcut: always +mac: + entitlementsInherit: build/entitlements.mac.plist + extendInfo: + - NSCameraUsageDescription: Application requests access to the device's camera. + - NSMicrophoneUsageDescription: Application requests access to the device's microphone. + - NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. + - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. + notarize: false +dmg: + artifactName: ${name}-yc-${version}.${ext} +linux: + target: + - AppImage + - snap + - deb + maintainer: electronjs.org + category: Utility +appImage: + artifactName: ${name}-yc-${version}.${ext} +npmRebuild: false +publish: + provider: generic + url: https://prev.ysaix.com:7868/src/assets/smarttalkyc/ +electronDownload: + mirror: https://npmmirror.com/mirrors/electron/ +# 额外依赖打包到输出目录 +extraFiles: + - from: ./node_modules/im_electron_sdk/lib/ + to: ./resources + filter: + - '**/*' diff --git a/package.json b/package.json index 1705d80..167bf54 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:test": "electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml", "build:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml", "build:yc": "electron-vite build --mode yc && electron-builder --win --config ./electron-builder-yc.yml", - "build:yc2": "electron-vite build --mode yc2 && electron-builder --win --config ./electron-builder-yc.yml", + "build:yc2": "electron-vite build --mode yc2 && electron-builder --win --config ./electron-builder-yc2.yml", "build:mac": "electron-vite build --mode production && electron-builder --mac --config ./electron-builder-prod.yml", "build:linux": "npm run build && electron-builder --linux" },