2023-10-17 09:27:08 +02:00
|
|
|
import { resolve } from 'node:path'
|
2023-10-20 15:56:27 +02:00
|
|
|
import which from 'which'
|
2023-10-17 09:27:08 +02:00
|
|
|
|
|
|
|
import { buildResolve, extraResolve } from '@electron/helpers/index.js'
|
|
|
|
|
2023-10-20 08:23:48 +02:00
|
|
|
export const desktopPath = process.env.DESKTOP_PATH
|
|
|
|
|
2023-10-17 09:27:08 +02:00
|
|
|
export const devPublishPath = resolve('dev-publish.yml')
|
|
|
|
|
2023-10-24 05:08:27 +02:00
|
|
|
export const logoPath = buildResolve('logo.png')
|
2023-10-17 09:27:08 +02:00
|
|
|
export const icoLogoPath = buildResolve('logo.ico')
|
|
|
|
export const icnsLogoPath = buildResolve('logo.icns')
|
|
|
|
|
2023-10-24 05:08:27 +02:00
|
|
|
export const trayPath
|
|
|
|
= process.platform === 'darwin'
|
|
|
|
? extraResolve('trayTemplate.png')
|
|
|
|
: extraResolve('tray.png')
|
2023-10-21 10:28:14 +02:00
|
|
|
|
2023-10-20 12:17:58 +02:00
|
|
|
export const adbPath
|
2023-10-20 15:56:27 +02:00
|
|
|
= process.platform === 'win32'
|
2023-10-30 02:56:35 +01:00
|
|
|
? extraResolve('adb/adb.exe')
|
2023-10-20 15:56:27 +02:00
|
|
|
: which.sync('adb', { nothrow: true })
|
2023-10-18 05:34:40 +02:00
|
|
|
|
2023-10-20 12:17:58 +02:00
|
|
|
export const scrcpyPath
|
2023-10-20 15:56:27 +02:00
|
|
|
= process.platform === 'win32'
|
|
|
|
? extraResolve('core/scrcpy.exe')
|
|
|
|
: which.sync('scrcpy', { nothrow: true })
|
|
|
|
|
2023-10-25 12:17:19 +02:00
|
|
|
export const logPath = process.env.LOG_PATH
|
|
|
|
|
2023-10-20 15:56:27 +02:00
|
|
|
// console.log('adbPath', adbPath)
|
|
|
|
// console.log('scrcpyPath', scrcpyPath)
|