mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-04 06:07:19 +02:00
Fix stdout freerdp and clean up after merge of #26
This commit is contained in:
parent
61374be7ad
commit
25889959ae
@ -1,4 +1,4 @@
|
||||
use clap::Command;
|
||||
use clap::{arg, Command};
|
||||
use winapps::freerdp::freerdp_back::Freerdp;
|
||||
use winapps::quickemu::{create_vm, kill_vm, start_vm};
|
||||
use winapps::RemoteClient;
|
||||
@ -33,28 +33,26 @@ fn main() {
|
||||
let matches = cli.clone().get_matches();
|
||||
|
||||
let client: &dyn RemoteClient = &Freerdp {};
|
||||
let config = winapps::load_config(None);
|
||||
|
||||
match matches.subcommand() {
|
||||
Some(("check", _)) => {
|
||||
println!("Checking remote connection");
|
||||
|
||||
client.check_depends(config);
|
||||
}
|
||||
Some(("connect", _)) => {
|
||||
println!("Connecting to remote");
|
||||
|
||||
let config = winapps::load_config(None);
|
||||
|
||||
client.run_app(config, None);
|
||||
}
|
||||
Some(("app", sub_matches)) => {
|
||||
println!("Connecting to app on remote");
|
||||
|
||||
let config = winapps::load_config(None);
|
||||
client.run_app(config, sub_matches.get_one::<String>("APP"));
|
||||
}
|
||||
|
||||
Some(("vm", command)) => {
|
||||
let config = winapps::load_config(None);
|
||||
|
||||
match command.subcommand() {
|
||||
Some(("create", _)) => {
|
||||
println!("Creating windows 10 vm..");
|
||||
|
@ -9,6 +9,7 @@ pub mod freerdp_back {
|
||||
fn check_depends(&self, config: Config) {
|
||||
let mut xfreerdp = Command::new("xfreerdp");
|
||||
xfreerdp.stdout(Stdio::null());
|
||||
xfreerdp.stderr(Stdio::null());
|
||||
xfreerdp.args(["-h"]);
|
||||
xfreerdp
|
||||
.spawn()
|
||||
@ -17,6 +18,7 @@ pub mod freerdp_back {
|
||||
|
||||
println!("All dependencies found!");
|
||||
println!("Running explorer as test!");
|
||||
println!("Check yourself if it appears correctly!");
|
||||
|
||||
self.run_app(config, Some(&"explorer.exe".to_string()));
|
||||
|
||||
@ -25,6 +27,8 @@ pub mod freerdp_back {
|
||||
|
||||
fn run_app(&self, config: Config, app: Option<&String>) {
|
||||
let mut xfreerdp = Command::new("xfreerdp");
|
||||
xfreerdp.stdout(Stdio::null());
|
||||
xfreerdp.stderr(Stdio::null());
|
||||
match app {
|
||||
Some(exe) => {
|
||||
xfreerdp.args([
|
||||
|
Loading…
x
Reference in New Issue
Block a user