Skip to content

Commit

Permalink
fix: 🐛 修复 Linux 平台启动白屏无法正常使用的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Oct 22, 2023
1 parent b350da2 commit 54e713b
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 28 deletions.
59 changes: 34 additions & 25 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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.",
Expand All @@ -73,9 +70,9 @@
"hardenedRuntime": false
},
"linux": {
"desktop": "logo",
"maintainer": "[email protected]",
"category": "Utility",
"icon": "logo.png",
"target": [
{
"target": "AppImage",
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion electron/configs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion electron/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Binary file removed electron/resources/build/logo.png
Binary file not shown.
Binary file added electron/resources/build/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified electron/resources/extra/tray-Template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified electron/resources/extra/tray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 54e713b

Please sign in to comment.