mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-12 11:51:27 +03:00
Merge remote-tracking branch 'rustdesk/master' into flutter_desktop
# Conflicts: # .github/workflows/ci.yml # Cargo.lock # Cargo.toml # flutter/lib/common.dart # flutter/lib/mobile/pages/remote_page.dart # flutter/lib/mobile/pages/server_page.dart # flutter/lib/mobile/pages/settings_page.dart # flutter/lib/mobile/widgets/dialog.dart # flutter/lib/models/model.dart # flutter/lib/models/server_model.dart # src/client.rs # src/common.rs # src/ipc.rs # src/mobile_ffi.rs # src/rendezvous_mediator.rs # src/ui.rs
This commit is contained in:
16
src/main.rs
16
src/main.rs
@@ -108,6 +108,10 @@ fn main() {
|
||||
args.len() > 1,
|
||||
));
|
||||
return;
|
||||
} else if args[0] == "--extract" {
|
||||
#[cfg(feature = "with_rc")]
|
||||
hbb_common::allow_err!(crate::rc::extract_resources(&args[1]));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if args[0] == "--remove" {
|
||||
@@ -148,9 +152,13 @@ fn main() {
|
||||
return;
|
||||
} else if args[0] == "--password" {
|
||||
if args.len() == 2 {
|
||||
ipc::set_password(args[1].to_owned()).unwrap();
|
||||
ipc::set_permanent_password(args[1].to_owned()).unwrap();
|
||||
}
|
||||
return;
|
||||
} else if args[0] == "--check-hwcodec-config" {
|
||||
#[cfg(feature = "hwcodec")]
|
||||
scrap::hwcodec::check_config();
|
||||
return;
|
||||
}
|
||||
}
|
||||
ui::start(&mut args[..]);
|
||||
@@ -164,18 +172,18 @@ fn import_config(path: &str) {
|
||||
let path = std::path::Path::new(path);
|
||||
log::info!("import config from {:?} and {:?}", path, path2);
|
||||
let config: Config = load_path(path.into());
|
||||
if config.id.is_empty() || config.key_pair.0.is_empty() {
|
||||
if config.is_empty() {
|
||||
log::info!("Empty source config, skipped");
|
||||
return;
|
||||
}
|
||||
if get_modified_time(&path) > get_modified_time(&Config::file()) {
|
||||
if Config::set(config) {
|
||||
if store_path(Config::file(), config).is_err() {
|
||||
log::info!("config written");
|
||||
}
|
||||
}
|
||||
let config2: Config2 = load_path(path2.into());
|
||||
if get_modified_time(&path2) > get_modified_time(&Config2::file()) {
|
||||
if Config2::set(config2) {
|
||||
if store_path(Config2::file(), config2).is_err() {
|
||||
log::info!("config2 written");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user