diff --git a/core/src/config.rs b/core/src/config.rs index 11de53f..9599e0d 100644 --- a/core/src/config.rs +++ b/core/src/config.rs @@ -52,14 +52,15 @@ pub struct Config { pub styles: Styles, } +pub static PROJECT_NAME: &'static str = "DEJA-VU"; lazy_static! { - pub static ref PROJECT_NAME: String = env!("CARGO_CRATE_NAME").to_uppercase().to_string(); + //pub static ref PROJECT_NAME: String = env!("CARGO_PKG_NAME").to_uppercase().to_string(); pub static ref DATA_FOLDER: Option = - env::var(format!("{}_DATA", PROJECT_NAME.clone())) + env::var(format!("{}_DATA", PROJECT_NAME)) .ok() .map(PathBuf::from); pub static ref CONFIG_FOLDER: Option = - env::var(format!("{}_CONFIG", PROJECT_NAME.clone())) + env::var(format!("{}_CONFIG", PROJECT_NAME)) .ok() .map(PathBuf::from); } @@ -142,7 +143,8 @@ pub fn get_config_dir() -> PathBuf { } fn project_directory() -> Option { - ProjectDirs::from("com", "Deja-vu", env!("CARGO_PKG_NAME")) + ProjectDirs::from("com", "Deja-vu", "deja-vu") + //ProjectDirs::from("com", "Deja-vu", env!("CARGO_PKG_NAME")) } #[derive(Clone, Debug, Default, Deref, DerefMut)] diff --git a/core/src/logging.rs b/core/src/logging.rs index 2494013..2e8b40d 100644 --- a/core/src/logging.rs +++ b/core/src/logging.rs @@ -20,8 +20,9 @@ use tracing_subscriber::{fmt, prelude::*, EnvFilter}; use crate::config; lazy_static::lazy_static! { - pub static ref LOG_ENV: String = format!("{}_LOG_LEVEL", config::PROJECT_NAME.clone()); - pub static ref LOG_FILE: String = format!("{}.log", env!("CARGO_PKG_NAME")); + pub static ref LOG_ENV: String = format!("{}_LOG_LEVEL", config::PROJECT_NAME); + pub static ref LOG_FILE: String = format!("{}.log", config::PROJECT_NAME); + //pub static ref LOG_FILE: String = format!("{}.log", env!("CARGO_PKG_NAME")); } pub fn init() -> Result<()> {