escrcpy/electron/configs/scrcpy/index.js

18 lines
491 B
JavaScript
Raw Normal View History

2024-05-15 05:16:02 +02:00
import { extraResolve } from '$electron/helpers/index.js'
2024-09-07 19:55:54 +02:00
import which from 'which'
export const getScrcpyPath = () => {
switch (process.platform) {
case 'win32':
return extraResolve('win/scrcpy/scrcpy.exe')
case 'darwin':
return extraResolve(`mac-${process.arch}/scrcpy/scrcpy`)
// case 'linux':
// return extraResolve('linux/scrcpy/scrcpy')
default:
return which.sync('scrcpy', { nothrow: true })
}
}
export const scrcpyPath = getScrcpyPath()