feat: Integrate scrcpy binaries for macos

This commit is contained in:
viarotel 2024-11-06 18:56:34 +08:00
parent 3190d0d296
commit 85bf0961e5
30 changed files with 5 additions and 17 deletions

View File

@ -13,25 +13,13 @@
{
"target": "nsis",
"arch": ["x64", "arm64"]
},
{
"target": "zip",
"arch": ["x64", "arm64"]
},
{
"target": "portable",
"arch": ["x64", "arm64"]
},
{
"target": "appx",
"arch": ["x64", "arm64"]
}
],
"artifactName": "${productName}-${version}-win-${arch}.${ext}",
"extraResources": {
"from": "electron/resources/extra",
"to": "extra",
"filter": ["common", "win"]
"filter": ["common", "win", "win-${arch}"]
}
},
"nsis": {
@ -65,7 +53,7 @@
"extraResources": {
"from": "electron/resources/extra",
"to": "extra",
"filter": ["common", "mac"]
"filter": ["common", "mac", "mac-${arch}"]
},
"x64ArchFiles": "Contents/Resources/extra/**/*",
"entitlementsInherit": "entitlements.mac.plist",
@ -96,7 +84,7 @@
"extraResources": {
"from": "electron/resources/extra",
"to": "extra",
"filter": ["common", "linux"]
"filter": ["common", "linux", "linux-${arch}", "linux-${target}"]
}
},
"asar": true,

View File

@ -5,8 +5,8 @@ export const getScrcpyPath = () => {
switch (process.platform) {
case 'win32':
return extraResolve('win/scrcpy/scrcpy.exe')
// case 'darwin':
// return extraResolve('mac/scrcpy/scrcpy')
case 'darwin':
return extraResolve(`mac-${process.arch}/scrcpy/scrcpy`)
// case 'linux':
// return extraResolve('linux/scrcpy/scrcpy')
default:

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Binary file not shown.