From bd1da0aa3f910f5c65d3df3aada66ff29347d287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20K=2E=20Rekucki?= Date: Sat, 28 Sep 2019 18:34:31 +0200 Subject: [PATCH 1/3] fix:scan current diractory for plugins on windows --- gu-provider/src/exec_plugin.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gu-provider/src/exec_plugin.rs b/gu-provider/src/exec_plugin.rs index 2b011d788..33f0c199b 100644 --- a/gu-provider/src/exec_plugin.rs +++ b/gu-provider/src/exec_plugin.rs @@ -452,7 +452,8 @@ impl Module for ExecPlugModule { .unwrap_or_else(|e| log::debug!("on scan /usr/lib/golemu/plugins: {}", e)); #[cfg(windows)] { - let _ = scan_for_plugins("plugins".as_ref(), config); + let cur_dir = std::env::current_dir().unwrap(); + let _ = scan_for_plugins(cur_dir.as_ref(), config).unwrap_or_else(|e| log::error!("on scan {:?}/plugins: {}", work_dir, e)); } #[cfg(target_os = "macos")] { From d2f404308e37a2522e709cc30e1d5db5730afe64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20K=2E=20Rekucki?= Date: Sat, 28 Sep 2019 18:46:01 +0200 Subject: [PATCH 2/3] reformat --- gu-provider/src/exec_plugin.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gu-provider/src/exec_plugin.rs b/gu-provider/src/exec_plugin.rs index 33f0c199b..cb8123b71 100644 --- a/gu-provider/src/exec_plugin.rs +++ b/gu-provider/src/exec_plugin.rs @@ -453,7 +453,8 @@ impl Module for ExecPlugModule { #[cfg(windows)] { let cur_dir = std::env::current_dir().unwrap(); - let _ = scan_for_plugins(cur_dir.as_ref(), config).unwrap_or_else(|e| log::error!("on scan {:?}/plugins: {}", work_dir, e)); + let _ = scan_for_plugins(cur_dir.as_ref(), config) + .unwrap_or_else(|e| log::error!("on scan {:?}/plugins: {}", work_dir, e)); } #[cfg(target_os = "macos")] { From d0635ce49ca90c15fe3b9d47f48027ff420a6e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20K=2E=20Rekucki?= Date: Mon, 30 Sep 2019 13:32:18 +0200 Subject: [PATCH 3/3] HD man as optional feature --- gu-provider/Cargo.toml | 1 + gu-provider/src/main.rs | 1 + gu-provider/src/server.rs | 3 +++ 3 files changed, 5 insertions(+) diff --git a/gu-provider/Cargo.toml b/gu-provider/Cargo.toml index fb84a4882..b5bac88f8 100644 --- a/gu-provider/Cargo.toml +++ b/gu-provider/Cargo.toml @@ -54,6 +54,7 @@ default = ["env-docker"] win-service = ["windows-service"] clinfo = ["gu-hardware/clinfo"] env-docker = ["async_docker"] +env-hd = [] ssl=["openssl/vendored", "actix-web/ssl"] [package.metadata.deb] diff --git a/gu-provider/src/main.rs b/gu-provider/src/main.rs index 1725e9470..b8bdacb60 100644 --- a/gu-provider/src/main.rs +++ b/gu-provider/src/main.rs @@ -9,6 +9,7 @@ mod connect; mod deployment; pub mod envman; mod fchain; +#[cfg(feature = "env-hd")] mod hdman; mod id; mod permission; diff --git a/gu-provider/src/server.rs b/gu-provider/src/server.rs index d53ed435c..182a8b0db 100644 --- a/gu-provider/src/server.rs +++ b/gu-provider/src/server.rs @@ -30,6 +30,7 @@ use crate::connect::{ self, AutoMdns, Connect, ConnectManager, ConnectModeMessage, ConnectionChange, ConnectionChangeMessage, Disconnect, ListSockets, }; +#[cfg(feature = "env-hd")] use crate::hdman::HdMan; #[derive(Serialize, Deserialize, Clone)] @@ -184,6 +185,8 @@ impl Module for ServerModule { gu_base::run_once(move || { let dec = decorator.to_owned(); let config_module: &ConfigModule = dec.extract().unwrap(); + + #[cfg(feature = "env-hd")] let _ = HdMan::start(config_module); ProviderServer::from_registry().do_send(InitServer {