This commit is contained in:
rustdesk
2021-08-29 19:26:33 +08:00
parent b0dfd777fb
commit 0325500ebf
2 changed files with 10 additions and 17 deletions

View File

@@ -58,30 +58,23 @@ fn main() {
if args.is_empty() {
std::thread::spawn(move || start_server(false, false));
} else {
if args[0] == "--uninstall" {
#[cfg(windows)]
{
#[cfg(windows)]
{
if args[0] == "--uninstall" {
if let Err(err) = platform::uninstall_me() {
log::error!("Failed to uninstall: {}", err);
}
return;
}
} else if args[0] == "--update" {
#[cfg(windows)]
{
} else if args[0] == "--update" {
hbb_common::allow_err!(platform::update_me());
return;
}
} else if args[0] == "--reinstall" {
#[cfg(windows)]
{
} else if args[0] == "--reinstall" {
hbb_common::allow_err!(platform::uninstall_me());
hbb_common::allow_err!(platform::install_me(
"desktopicon startmenu",
));
hbb_common::allow_err!(platform::install_me("desktopicon startmenu",));
return;
}
} else if args[0] == "--remove" {
}
if args[0] == "--remove" {
if args.len() == 2 {
// sleep a while so that process of removed exe exit
std::thread::sleep(std::time::Duration::from_secs(1));