perf: ♻️ 补充依赖及目录结构调整

This commit is contained in:
viarotel 2023-10-30 11:04:43 +08:00
parent 93ad83689f
commit b18256b6fc
59 changed files with 60841 additions and 19 deletions

View File

@ -26,7 +26,8 @@
"artifactName": "${productName}-${version}-win-${arch}.${ext}",
"extraResources": {
"from": "electron/resources/extra",
"to": "extra"
"to": "extra",
"filter": ["common", "win"]
}
},
"nsis": {
@ -58,7 +59,7 @@
"extraResources": {
"from": "electron/resources/extra",
"to": "extra",
"filter": ["**/*", "!core", "!adb"]
"filter": ["common", "mac"]
},
"entitlementsInherit": "entitlements.mac.plist",
"extendInfo": {
@ -89,7 +90,7 @@
"extraResources": {
"from": "electron/resources/extra",
"to": "extra",
"filter": ["**/*", "!core", "!adb"]
"filter": ["common", "linux"]
}
},
"asar": true,

14
electron/configs/adb.js Normal file
View File

@ -0,0 +1,14 @@
import { extraResolve } from '@electron/helpers/index.js'
export const getAdbPath = () => {
switch (process.platform) {
case 'win32':
return extraResolve('win/platform-tools/adb.exe')
case 'darwin':
return extraResolve('mac/platform-tools/adb')
case 'linux':
return extraResolve('linux/platform-tools/adb')
}
}
export const adbPath = getAdbPath()

View File

@ -1,8 +1,11 @@
import { resolve } from 'node:path'
import which from 'which'
import { buildResolve, extraResolve } from '@electron/helpers/index.js'
export { adbPath } from './adb.js'
export { scrcpyPath } from './scrcpy.js'
export const desktopPath = process.env.DESKTOP_PATH
export const devPublishPath = resolve('dev-publish.yml')
@ -13,20 +16,7 @@ export const icnsLogoPath = buildResolve('logo.icns')
export const trayPath
= process.platform === 'darwin'
? extraResolve('trayTemplate.png')
: extraResolve('tray.png')
export const adbPath
= process.platform === 'win32'
? extraResolve('adb/adb.exe')
: which.sync('adb', { nothrow: true })
export const scrcpyPath
= process.platform === 'win32'
? extraResolve('core/scrcpy.exe')
: which.sync('scrcpy', { nothrow: true })
? extraResolve('mac/tray/iconTemplate.png')
: extraResolve('common/tray/icon.png')
export const logPath = process.env.LOG_PATH
// console.log('adbPath', adbPath)
// console.log('scrcpyPath', scrcpyPath)

View File

@ -0,0 +1,17 @@
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()

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,53 @@
[defaults]
base_features = sparse_super,large_file,filetype,dir_index,ext_attr
default_mntopts = acl,user_xattr
enable_periodic_fsck = 0
blocksize = 4096
inode_size = 256
inode_ratio = 16384
reserved_ratio = 1.0
[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extent,huge_file,dir_nlink,extra_isize,uninit_bg
inode_size = 256
}
ext4dev = {
features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
inode_size = 256
options = test_fs=1
}
small = {
blocksize = 1024
inode_size = 128
inode_ratio = 4096
}
floppy = {
blocksize = 1024
inode_size = 128
inode_ratio = 8192
}
big = {
inode_ratio = 32768
}
huge = {
inode_ratio = 65536
}
news = {
inode_ratio = 4096
}
largefile = {
inode_ratio = 1048576
blocksize = -1
}
largefile4 = {
inode_ratio = 4194304
blocksize = -1
}
hurd = {
blocksize = 4096
inode_size = 128
}

View File

@ -0,0 +1,2 @@
Pkg.UserSrc=false
Pkg.Revision=34.0.5

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,53 @@
[defaults]
base_features = sparse_super,large_file,filetype,dir_index,ext_attr
default_mntopts = acl,user_xattr
enable_periodic_fsck = 0
blocksize = 4096
inode_size = 256
inode_ratio = 16384
reserved_ratio = 1.0
[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extent,huge_file,dir_nlink,extra_isize,uninit_bg
inode_size = 256
}
ext4dev = {
features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
inode_size = 256
options = test_fs=1
}
small = {
blocksize = 1024
inode_size = 128
inode_ratio = 4096
}
floppy = {
blocksize = 1024
inode_size = 128
inode_ratio = 8192
}
big = {
inode_ratio = 32768
}
huge = {
inode_ratio = 65536
}
news = {
inode_ratio = 4096
}
largefile = {
inode_ratio = 1048576
blocksize = -1
}
largefile4 = {
inode_ratio = 4194304
blocksize = -1
}
hurd = {
blocksize = 4096
inode_size = 128
}

View File

@ -0,0 +1,2 @@
Pkg.UserSrc=false
Pkg.Revision=34.0.5

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 242 B

View File

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 445 B

View File

Before

Width:  |  Height:  |  Size: 1008 B

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
[defaults]
base_features = sparse_super,large_file,filetype,dir_index,ext_attr
default_mntopts = acl,user_xattr
enable_periodic_fsck = 0
blocksize = 4096
inode_size = 256
inode_ratio = 16384
reserved_ratio = 1.0
[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extent,huge_file,dir_nlink,extra_isize,uninit_bg
inode_size = 256
}
ext4dev = {
features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
inode_size = 256
options = test_fs=1
}
small = {
blocksize = 1024
inode_size = 128
inode_ratio = 4096
}
floppy = {
blocksize = 1024
inode_size = 128
inode_ratio = 8192
}
big = {
inode_ratio = 32768
}
huge = {
inode_ratio = 65536
}
news = {
inode_ratio = 4096
}
largefile = {
inode_ratio = 1048576
blocksize = -1
}
largefile4 = {
inode_ratio = 4194304
blocksize = -1
}
hurd = {
blocksize = 4096
inode_size = 128
}

Binary file not shown.

View File

@ -0,0 +1,2 @@
Pkg.UserSrc=false
Pkg.Revision=34.0.5

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB