escrcpy/electron/configs/scrcpy/index.js
2024-05-14 19:16:46 +08:00

18 lines
481 B
JavaScript

import which from 'which'
import { extraResolve } from '#electron/helpers/index.js'
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()