mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2025-02-20 20:21:38 +01:00
perf: ♻️ Reduce build package size by removing redundant dependencies
This commit is contained in:
parent
9777622830
commit
7b61b25f4e
@ -1,29 +1,17 @@
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
import { buildResolve, extraResolve } from '$electron/helpers/index.js'
|
||||
export * from './android-platform-tools/index.js'
|
||||
|
||||
export { adbPath } from './android-platform-tools/index.js'
|
||||
export * from './gnirehtet/index.js'
|
||||
|
||||
export { gnirehtetApkPath, gnirehtetPath } from './gnirehtet/index.js'
|
||||
export * from './logo/index.js'
|
||||
|
||||
export { scrcpyPath } from './scrcpy/index.js'
|
||||
export * from './scrcpy/index.js'
|
||||
|
||||
export * from './tray/index.js'
|
||||
|
||||
export const desktopPath = process.env.DESKTOP_PATH
|
||||
|
||||
export const devPublishPath = resolve('dev-publish.yml')
|
||||
|
||||
export const logoPath = buildResolve('logo.png')
|
||||
export const icoLogoPath = buildResolve('logo.ico')
|
||||
export const icnsLogoPath = buildResolve('logo.icns')
|
||||
|
||||
export const trayPath
|
||||
= process.platform === 'darwin'
|
||||
? extraResolve('mac/tray/iconTemplate.png')
|
||||
: extraResolve('common/tray/icon.png')
|
||||
|
||||
export const logPath = process.env.LOG_PATH
|
||||
|
||||
export function getLogoPath() {
|
||||
const icon = logoPath
|
||||
return icon
|
||||
}
|
||||
|
10
electron/configs/logo/index.js
Normal file
10
electron/configs/logo/index.js
Normal file
@ -0,0 +1,10 @@
|
||||
import { buildResolve } from '$electron/helpers/index.js'
|
||||
|
||||
export const logoPath = buildResolve('logo.png')
|
||||
export const icoLogoPath = buildResolve('logo.ico')
|
||||
export const icnsLogoPath = buildResolve('logo.icns')
|
||||
|
||||
export function getLogoPath() {
|
||||
const icon = logoPath
|
||||
return icon
|
||||
}
|
16
electron/configs/tray/index.js
Normal file
16
electron/configs/tray/index.js
Normal file
@ -0,0 +1,16 @@
|
||||
import { extraResolve } from '$electron/helpers/index.js'
|
||||
|
||||
export function getTrayPath() {
|
||||
switch (process.platform) {
|
||||
case 'win32':
|
||||
return extraResolve('win/tray/icon.png')
|
||||
case 'darwin':
|
||||
return extraResolve('mac/tray/iconTemplate.png')
|
||||
case 'linux':
|
||||
return extraResolve('linux/tray/icon.png')
|
||||
default:
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
export const trayPath = getTrayPath()
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
BIN
electron/resources/extra/win/tray/icon.ico
Executable file
BIN
electron/resources/extra/win/tray/icon.ico
Executable file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
electron/resources/extra/win/tray/icon.png
Executable file
BIN
electron/resources/extra/win/tray/icon.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
x
Reference in New Issue
Block a user