diff --git a/Cargo.lock b/Cargo.lock index 675405b..439eb07 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -898,24 +898,6 @@ dependencies = [ "litrs", ] -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "dotenvy_macro" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0235d912a8c749f4e0c9f18ca253b4c28cfefc1d2518096016d6e3230b6424" -dependencies = [ - "dotenvy", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "dtoa" version = "1.0.9" @@ -1442,7 +1424,6 @@ dependencies = [ "base64 0.21.5", "chacha20poly1305", "clap", - "dotenvy_macro", "log", "md5", "open", diff --git a/Cargo.toml b/Cargo.toml index 5e25e5a..f641a47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,6 @@ uzers = "0.11" whoami = "1" thiserror = "1" redact-engine = "0.1" -dotenvy_macro = "0.15" compile-time = "0.2" serde_urlencoded = "0.7" md5="0.7" diff --git a/apps/gpclient/src/cli.rs b/apps/gpclient/src/cli.rs index dcad0b8..24a399d 100644 --- a/apps/gpclient/src/cli.rs +++ b/apps/gpclient/src/cli.rs @@ -19,7 +19,7 @@ pub(crate) struct SharedArgs { #[derive(Subcommand)] enum CliCommand { #[command(about = "Connect to a portal server")] - Connect(ConnectArgs), + Connect(Box), #[command(about = "Disconnect from the server")] Disconnect, #[command(about = "Launch the GUI")] diff --git a/crates/gpapi/Cargo.toml b/crates/gpapi/Cargo.toml index 58e9337..35e7187 100644 --- a/crates/gpapi/Cargo.toml +++ b/crates/gpapi/Cargo.toml @@ -25,7 +25,6 @@ chacha20poly1305 = { version = "0.10", features = ["std"] } redact-engine.workspace = true url.workspace = true regex.workspace = true -dotenvy_macro.workspace = true uzers.workspace = true serde_urlencoded.workspace = true md5.workspace = true diff --git a/crates/gpapi/build.rs b/crates/gpapi/build.rs new file mode 100644 index 0000000..5cd164d --- /dev/null +++ b/crates/gpapi/build.rs @@ -0,0 +1,19 @@ +use std::path::Path; + +fn main() { + let manifest_dir = env!("CARGO_MANIFEST_DIR"); + let workspace_dir = Path::new(manifest_dir).ancestors().nth(2).unwrap(); + let gpgui_dir = workspace_dir.parent().unwrap().join("gpgui"); + + let gp_service_binary = workspace_dir.join("target/debug/gpservice"); + let gp_client_binary = workspace_dir.join("target/debug/gpclient"); + let gp_auth_binary = workspace_dir.join("target/debug/gpauth"); + let gp_gui_helper_binary = workspace_dir.join("target/debug/gpgui-helper"); + let gp_gui_binary = gpgui_dir.join("target/debug/gpgui"); + + println!("cargo:rustc-env=GP_SERVICE_BINARY={}", gp_service_binary.display()); + println!("cargo:rustc-env=GP_CLIENT_BINARY={}", gp_client_binary.display()); + println!("cargo:rustc-env=GP_AUTH_BINARY={}", gp_auth_binary.display()); + println!("cargo:rustc-env=GP_GUI_HELPER_BINARY={}", gp_gui_helper_binary.display()); + println!("cargo:rustc-env=GP_GUI_BINARY={}", gp_gui_binary.display()); +} diff --git a/crates/gpapi/src/lib.rs b/crates/gpapi/src/lib.rs index dc82fc7..63bd13b 100644 --- a/crates/gpapi/src/lib.rs +++ b/crates/gpapi/src/lib.rs @@ -29,12 +29,12 @@ pub const GP_GUI_HELPER_BINARY: &str = "/usr/bin/gpgui-helper"; pub(crate) const GP_AUTH_BINARY: &str = "/usr/bin/gpauth"; #[cfg(debug_assertions)] -pub const GP_CLIENT_BINARY: &str = dotenvy_macro::dotenv!("GP_CLIENT_BINARY"); +pub const GP_CLIENT_BINARY: &str = env!("GP_CLIENT_BINARY"); #[cfg(debug_assertions)] -pub const GP_SERVICE_BINARY: &str = dotenvy_macro::dotenv!("GP_SERVICE_BINARY"); +pub const GP_SERVICE_BINARY: &str = env!("GP_SERVICE_BINARY"); #[cfg(debug_assertions)] -pub const GP_GUI_BINARY: &str = dotenvy_macro::dotenv!("GP_GUI_BINARY"); +pub const GP_GUI_BINARY: &str = env!("GP_GUI_BINARY"); #[cfg(debug_assertions)] -pub const GP_GUI_HELPER_BINARY: &str = dotenvy_macro::dotenv!("GP_GUI_HELPER_BINARY"); +pub const GP_GUI_HELPER_BINARY: &str = env!("GP_GUI_HELPER_BINARY"); #[cfg(debug_assertions)] -pub(crate) const GP_AUTH_BINARY: &str = dotenvy_macro::dotenv!("GP_AUTH_BINARY"); +pub(crate) const GP_AUTH_BINARY: &str = env!("GP_AUTH_BINARY");