From e98145ba554d9e8396dea96e466c14db10e988fc Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 10 May 2024 22:41:19 +0200 Subject: Crappy code fix 12/? --- launcher/src/constants.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 launcher/src/constants.rs (limited to 'launcher/src/constants.rs') diff --git a/launcher/src/constants.rs b/launcher/src/constants.rs new file mode 100644 index 0000000..eaf66fb --- /dev/null +++ b/launcher/src/constants.rs @@ -0,0 +1,24 @@ +// TODO: Rename these to "Atomic" + +#[cfg(target_os = "macos")] +pub const BINARY_PATH: &str = "Contents/MacOS/Electron"; + +#[cfg(target_os = "linux")] +pub const BINARY_PATH: &str = "electron"; + +#[cfg(target_os = "windows")] +pub const BINARY_PATH: &str = "electron.exe"; + +#[cfg(target_os = "macos")] +pub const APP_FOLDER_PATH: &str = "../Resources/app"; + +#[cfg(any(target_os = "linux", target_os = "windows"))] +pub const APP_FOLDER_PATH: &str = "./resources/app"; + +#[cfg(target_os = "macos")] +pub const APP_ASAR_PATH: &str = "../Resources/app.asar"; + +#[cfg(any(target_os = "linux", target_os = "windows"))] +pub const APP_ASAR_PATH: &str = "./resources/app.asar"; + +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); -- cgit