refactor
This commit is contained in:
parent
b0dfd777fb
commit
0325500ebf
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -517,7 +517,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "cpal"
|
||||
version = "0.13.4"
|
||||
source = "git+https://github.com/rustaudio/cpal#959733011607148100032fca5fd18c48c98d5d92"
|
||||
source = "git+https://github.com/open-trade/cpal#6b0b769f3d8ea22abdc3a6ea0c74311bf0cfbac3"
|
||||
dependencies = [
|
||||
"alsa",
|
||||
"core-foundation-sys 0.8.2",
|
||||
@ -2852,7 +2852,7 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||
|
||||
[[package]]
|
||||
name = "rustdesk"
|
||||
version = "1.1.6"
|
||||
version = "1.1.8"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"arboard",
|
||||
|
23
src/main.rs
23
src/main.rs
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user