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

View File

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