From 1df32ee4a4716cf1c3cc34ad8d0ffe92eacd6972 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Fri, 2 May 2025 08:45:32 +0100 Subject: [PATCH] feat: use the same app name for log output and GUI title --- src/main.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index ec6803f..e9c0920 100755 --- a/src/main.rs +++ b/src/main.rs @@ -9,23 +9,21 @@ pub(crate) mod console; mod errors; mod logging; +pub const APP_NAME: &str = concat!(env!("CARGO_PKG_NAME"), " v", env!("CARGO_PKG_VERSION")); + fn main() -> eyre::Result<()> { let process_mode = ProcessMode::from_current_process()?; crate::errors::init()?; crate::logging::init(process_mode)?; - tracing::info!(concat!( - env!("CARGO_PKG_NAME"), - " v", - env!("CARGO_PKG_VERSION") - )); + tracing::info!("{APP_NAME}"); match process_mode { ProcessMode::Console(_) => process_mode.detach_to_gui()?, ProcessMode::Gui => { tracing::info!("Attempting to natively render UI"); eframe::run_native( - "portable-msvc-rs", + APP_NAME, NativeOptions { viewport: ViewportBuilder::default() .with_resizable(false)