mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2025-01-19 09:27:30 +01:00
fix: 🐛 Fix for built-in scrcpy not supporting x64 macos
This commit is contained in:
parent
cb2efef3f9
commit
0d606550d4
@ -2,16 +2,19 @@ import { extraResolve } from '$electron/helpers/index.js'
|
|||||||
import which from 'which'
|
import which from 'which'
|
||||||
|
|
||||||
export const getScrcpyPath = () => {
|
export const getScrcpyPath = () => {
|
||||||
switch (process.platform) {
|
if (['win32'].includes(process.platform)) {
|
||||||
case 'win32':
|
return extraResolve('win/scrcpy/scrcpy.exe')
|
||||||
return extraResolve('win/scrcpy/scrcpy.exe')
|
|
||||||
case 'darwin':
|
|
||||||
return extraResolve(`mac/scrcpy/scrcpy`)
|
|
||||||
case 'linux':
|
|
||||||
return extraResolve('linux/scrcpy/scrcpy')
|
|
||||||
default:
|
|
||||||
return which.sync('scrcpy', { nothrow: true })
|
|
||||||
}
|
}
|
||||||
|
else if (['darwin'].includes(process.platform)) {
|
||||||
|
if (['arm64'].includes(process.arch)) {
|
||||||
|
return extraResolve(`mac/scrcpy/scrcpy`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (['linux'].includes(process.platform)) {
|
||||||
|
return extraResolve('linux/scrcpy/scrcpy')
|
||||||
|
}
|
||||||
|
|
||||||
|
return which.sync('scrcpy', { nothrow: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const scrcpyPath = getScrcpyPath()
|
export const scrcpyPath = getScrcpyPath()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user