mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-07-12 18:25:14 +03:00
fix(update): win aarch64 (#15389)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -2852,8 +2852,16 @@ pub fn main_get_common(key: String) -> String {
|
|||||||
crate::platform::windows::is_msi_installed(),
|
crate::platform::windows::is_msi_installed(),
|
||||||
crate::common::is_custom_client(),
|
crate::common::is_custom_client(),
|
||||||
) {
|
) {
|
||||||
(Ok(true), false) => format!("rustdesk-{_version}-x86_64.msi"),
|
(Ok(true), false) => match crate::platform::windows::release_arch_suffix() {
|
||||||
(Ok(true), true) | (Ok(false), _) => format!("rustdesk-{_version}-x86_64.exe"),
|
Some(arch) => format!("rustdesk-{_version}-{arch}.msi"),
|
||||||
|
None => "error:unsupported".to_owned(),
|
||||||
|
},
|
||||||
|
(Ok(true), true) | (Ok(false), _) => {
|
||||||
|
match crate::platform::windows::release_arch_suffix() {
|
||||||
|
Some(arch) => format!("rustdesk-{_version}-{arch}.exe"),
|
||||||
|
None => "error:unsupported".to_owned(),
|
||||||
|
}
|
||||||
|
}
|
||||||
(Err(e), _) => {
|
(Err(e), _) => {
|
||||||
log::error!("Failed to check if is msi: {}", e);
|
log::error!("Failed to check if is msi: {}", e);
|
||||||
format!("error:update-failed-check-msi-tip")
|
format!("error:update-failed-check-msi-tip")
|
||||||
|
|||||||
@@ -3944,6 +3944,14 @@ pub fn is_x64() -> bool {
|
|||||||
unsafe { sys_info.u.s().wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 }
|
unsafe { sys_info.u.s().wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn release_arch_suffix() -> Option<&'static str> {
|
||||||
|
match std::env::consts::ARCH {
|
||||||
|
"x86_64" => Some("x86_64"),
|
||||||
|
"aarch64" => Some("aarch64"),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn try_kill_rustdesk_main_window_process() -> ResultType<()> {
|
pub fn try_kill_rustdesk_main_window_process() -> ResultType<()> {
|
||||||
// Kill rustdesk.exe without extra arg, should only be called by --server
|
// Kill rustdesk.exe without extra arg, should only be called by --server
|
||||||
// We can find the exact process which occupies the ipc, see more from https://github.com/winsiderss/systeminformer
|
// We can find the exact process which occupies the ipc, see more from https://github.com/winsiderss/systeminformer
|
||||||
|
|||||||
@@ -136,10 +136,17 @@ fn check_update(manually: bool) -> ResultType<()> {
|
|||||||
let version = download_url.split('/').last().unwrap_or_default();
|
let version = download_url.split('/').last().unwrap_or_default();
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
let download_url = if cfg!(feature = "flutter") {
|
let download_url = if cfg!(feature = "flutter") {
|
||||||
|
let Some(arch) = crate::platform::windows::release_arch_suffix() else {
|
||||||
|
bail!(
|
||||||
|
"Unsupported Windows release architecture: {}",
|
||||||
|
std::env::consts::ARCH
|
||||||
|
);
|
||||||
|
};
|
||||||
format!(
|
format!(
|
||||||
"{}/rustdesk-{}-x86_64.{}",
|
"{}/rustdesk-{}-{}.{}",
|
||||||
download_url,
|
download_url,
|
||||||
version,
|
version,
|
||||||
|
arch,
|
||||||
if update_msi { "msi" } else { "exe" }
|
if update_msi { "msi" } else { "exe" }
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user