mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-12-20 11:25:58 +01:00
18 lines
481 B
JavaScript
18 lines
481 B
JavaScript
|
import { extraResolve } from '@electron/helpers/index.js'
|
||
|
import which from 'which'
|
||
|
|
||
|
export const getScrcpyPath = () => {
|
||
|
switch (process.platform) {
|
||
|
case 'win32':
|
||
|
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 })
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export const scrcpyPath = getScrcpyPath()
|