Add freerdp detection

This commit is contained in:
LDprg
2023-09-10 20:07:03 +02:00
parent d8bffd817d
commit cd5c0f146c
4 changed files with 29 additions and 19 deletions

View File

@@ -1,4 +1,6 @@
use clap::Command;
use winapps::RemoteClient;
use winapps::freerdp::freerdp_back::Freerdp;
fn cli() -> Command {
Command::new("winapps-cli")
@@ -14,14 +16,20 @@ fn main() {
let cli = cli();
let matches = cli.clone().get_matches();
let client: &dyn RemoteClient = &Freerdp{};
match matches.subcommand() {
Some(("check", _)) => {
println!("Checking remote connection");
let _config = winapps::load_config(None);
let config = winapps::load_config(None);
client.check_depends(config);
}
Some(("connect", _)) => {
println!("Connecting to remote");
let config = winapps::load_config(None);
client.run_app(config, "explorer");
}
Some((_, _)) => {
cli.about("Command not found, try existing ones!")