mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Merge branch 'hwcodec' into master
This commit is contained in:
23
src/main.rs
23
src/main.rs
@@ -70,6 +70,15 @@ fn main() {
|
||||
}
|
||||
if args.is_empty() {
|
||||
std::thread::spawn(move || start_server(false));
|
||||
#[cfg(feature = "hwcodec")]
|
||||
if let Ok(exe) = std::env::current_exe() {
|
||||
std::thread::spawn(move || {
|
||||
std::process::Command::new(exe)
|
||||
.arg("--check-hwcodec-config")
|
||||
.status()
|
||||
.ok()
|
||||
});
|
||||
}
|
||||
} else {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
@@ -109,6 +118,9 @@ fn main() {
|
||||
} else if args[0] == "--extract" {
|
||||
#[cfg(feature = "with_rc")]
|
||||
hbb_common::allow_err!(crate::rc::extract_resources(&args[1]));
|
||||
} else if args[0] == "--check-hwcodec-config" {
|
||||
#[cfg(feature = "hwcodec")]
|
||||
ipc::check_hwcodec_config();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -197,7 +209,7 @@ fn main() {
|
||||
.about("RustDesk command line tool")
|
||||
.args_from_usage(&args)
|
||||
.get_matches();
|
||||
use hbb_common::{env_logger::*, config::LocalConfig};
|
||||
use hbb_common::{config::LocalConfig, env_logger::*};
|
||||
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "info"));
|
||||
if let Some(p) = matches.value_of("port-forward") {
|
||||
let options: Vec<String> = p.split(":").map(|x| x.to_owned()).collect();
|
||||
@@ -225,6 +237,13 @@ fn main() {
|
||||
}
|
||||
let key = matches.value_of("key").unwrap_or("").to_owned();
|
||||
let token = LocalConfig::get_option("access_token");
|
||||
cli::start_one_port_forward(options[0].clone(), port, remote_host, remote_port, key, token);
|
||||
cli::start_one_port_forward(
|
||||
options[0].clone(),
|
||||
port,
|
||||
remote_host,
|
||||
remote_port,
|
||||
key,
|
||||
token,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user