fix: 🐛 修复 Linux 平台启动白屏无法正常使用的问题

This commit is contained in:
viarotel 2023-10-23 00:43:52 +08:00
parent b350da2bcc
commit 54e713b1df
8 changed files with 37 additions and 28 deletions

View File

@ -2,33 +2,13 @@
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
"productName": "Escrcpy",
"appId": "org.viarotel.escrcpy",
"asar": true,
"directories": {
"output": "dist-release",
"buildResources": "electron/resources/build"
},
"icon": "logo",
"files": ["dist", "dist-electron"],
"publish": {
"provider": "github",
"owner": "viarotel-org",
"repo": "escrcpy",
"updaterCacheDirName": "escrcpy-updater"
},
"nsis": {
"artifactName": "${productName}-${version}-win-setup-${arch}.${ext}",
"shortcutName": "${productName}",
"uninstallDisplayName": "${productName}",
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": false
},
"portable": {
"artifactName": "${productName}-${version}-win-portable-${arch}.${ext}",
"requestExecutionLevel": "user"
},
"win": {
"icon": "logo.ico",
"target": [
{
"target": "nsis",
@ -49,8 +29,20 @@
"to": "extra"
}
},
"nsis": {
"artifactName": "${productName}-${version}-win-setup-${arch}.${ext}",
"shortcutName": "${productName}",
"uninstallDisplayName": "${productName}",
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": false
},
"portable": {
"artifactName": "${productName}-${version}-win-portable-${arch}.${ext}",
"requestExecutionLevel": "user"
},
"mac": {
"icon": "logo.icns",
"target": [
{
"target": "dmg",
@ -62,6 +54,11 @@
}
],
"artifactName": "${productName}-${version}-mac-${arch}.${ext}",
"extraResources": {
"from": "electron/resources/extra",
"to": "extra",
"filter": ["**/*", "!core"]
},
"entitlementsInherit": "electron/resources/build/entitlements.mac.plist",
"extendInfo": {
"NSDocumentsFolderUsageDescription": "Application requests access to the user's Documents folder.",
@ -73,9 +70,9 @@
"hardenedRuntime": false
},
"linux": {
"desktop": "logo",
"maintainer": "viarotel@qq.com",
"category": "Utility",
"icon": "logo.png",
"target": [
{
"target": "AppImage",
@ -86,7 +83,19 @@
"arch": ["x64", "arm64"]
}
],
"artifactName": "${productName}-${version}-linux-${arch}.${ext}"
"artifactName": "${productName}-${version}-linux-${arch}.${ext}",
"extraResources": {
"from": "electron/resources/extra",
"to": "extra",
"filter": ["**/*", "!core"]
}
},
"npmRebuild": false
"asar": true,
"npmRebuild": false,
"publish": {
"provider": "github",
"owner": "viarotel-org",
"repo": "escrcpy",
"updaterCacheDirName": "escrcpy-updater"
}
}

View File

@ -7,7 +7,7 @@ export const desktopPath = process.env.DESKTOP_PATH
export const devPublishPath = resolve('dev-publish.yml')
export const logoPath = buildResolve('logo.png')
export const logoPath = buildResolve('logo@256x256.png')
export const icoLogoPath = buildResolve('logo.ico')
export const icnsLogoPath = buildResolve('logo.icns')

View File

@ -10,7 +10,7 @@ export const extraResolve = (value) => {
}
export const buildResolve = value =>
resolve(process.env.CWD, `electron/resources/build/${value}`)
resolve(`electron/resources/build/${value}`)
export function exposeContext(key, value) {
if (process.contextIsolated) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -30,7 +30,7 @@
"@viarotel-org/unocss-config": "^0.7.4",
"@vitejs/plugin-vue": "^4.3.4",
"dayjs": "^1.11.10",
"electron": "^26.1.0",
"electron": "^27.0.2",
"electron-builder": "^24.6.4",
"electron-store": "^8.1.0",
"electron-updater": "^6.1.4",