fix(adb): adb for linux

This commit is contained in:
AkiChase 2024-05-14 09:50:07 +08:00
parent 6bcaca105f
commit e9f1547093
8 changed files with 24 additions and 9 deletions

Binary file not shown.

View File

@ -28,9 +28,11 @@ impl ResHelper {
pub fn get_file_path(dir: &PathBuf, file_name: ResourceName) -> PathBuf { pub fn get_file_path(dir: &PathBuf, file_name: ResourceName) -> PathBuf {
match file_name { match file_name {
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
ResourceName::Adb => dir.join("adb.exe"), ResourceName::Adb => dir.join("adb-win.exe"),
#[cfg(not(target_os = "windows"))] #[cfg(target_os = "linux")]
ResourceName::Adb => dir.join("adb"), ResourceName::Adb => dir.join("adb-linux"),
#[cfg(target_os = "macos")]
ResourceName::Adb => dir.join("adb-mac"),
ResourceName::ScrcpyServer => dir.join("scrcpy-server-v2.4"), ResourceName::ScrcpyServer => dir.join("scrcpy-server-v2.4"),
ResourceName::DefaultKeyConfig => dir.join("default-key-config.json"), ResourceName::DefaultKeyConfig => dir.join("default-key-config.json"),

View File

@ -30,11 +30,6 @@
"icons/128x128@2x.png", "icons/128x128@2x.png",
"icons/icon.icns", "icons/icon.icns",
"icons/icon.ico" "icons/icon.ico"
],
"resources": [
"resource/default-key-config.json",
"resource/scrcpy-server-v2.4",
"resource/adb"
] ]
} }
} }

View File

@ -0,0 +1,9 @@
{
"bundle": {
"resources": [
"resource/default-key-config.json",
"resource/scrcpy-server-v2.4",
"resource/adb-linux"
]
}
}

View File

@ -0,0 +1,9 @@
{
"bundle": {
"resources": [
"resource/default-key-config.json",
"resource/scrcpy-server-v2.4",
"resource/adb-mac"
]
}
}

View File

@ -3,7 +3,7 @@
"resources": [ "resources": [
"resource/default-key-config.json", "resource/default-key-config.json",
"resource/scrcpy-server-v2.4", "resource/scrcpy-server-v2.4",
"resource/adb.exe", "resource/adb-win.exe",
"resource/AdbWinApi.dll", "resource/AdbWinApi.dll",
"resource/AdbWinUsbApi.dll" "resource/AdbWinUsbApi.dll"
] ]