Revert "feat: macos, update dmg (#13539)" (#13577)

This reverts commit a6571e71e4.
This commit is contained in:
RustDesk
2025-11-20 23:18:00 +08:00
committed by GitHub
parent 3787b45b49
commit 3c0be4e40e
3 changed files with 19 additions and 82 deletions

View File

@@ -300,35 +300,14 @@ pub fn core_main() -> Option<Vec<String>> {
{
use crate::platform;
if args[0] == "--update" {
if args.len() > 1 && args[1].ends_with(".dmg") {
// Version check is unnecessary unless downgrading to an older version
// that lacks "update dmg" support. This is a special case since we cannot
// detect the version before extracting the DMG, so we skip the check.
let dmg_path = &args[1];
println!("Updating from DMG: {}", dmg_path);
match platform::update_from_dmg(dmg_path) {
Ok(_) => {
println!("Update process from DMG started successfully.");
// The new process will handle the rest. We can exit.
}
Err(err) => {
eprintln!("Failed to start update from DMG: {}", err);
}
let _text = match platform::update_me() {
Ok(_) => {
log::info!("{}", translate("Update successfully!".to_string()));
}
} else {
println!("Starting update process...");
log::info!("Starting update process...");
let _text = match platform::update_me() {
Ok(_) => {
println!("{}", translate("Update successfully!".to_string()));
log::info!("Update successfully!");
}
Err(err) => {
eprintln!("Update failed with error: {}", err);
log::error!("Update failed with error: {err}");
}
};
}
Err(err) => {
log::error!("Update failed with error: {err}");
}
};
return None;
}
}