diff options
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/.cargo/config.toml | 2 | ||||
-rw-r--r-- | launcher/Cargo.toml | 6 | ||||
-rwxr-xr-x | launcher/build.sh | 12 | ||||
-rw-r--r-- | launcher/src/lib.rs | 4 | ||||
-rw-r--r-- | launcher/src/main.rs | 4 |
5 files changed, 24 insertions, 4 deletions
diff --git a/launcher/.cargo/config.toml b/launcher/.cargo/config.toml new file mode 100644 index 0000000..71f0e23 --- /dev/null +++ b/launcher/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target = ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "x86_64-pc-windows-gnu", "x86_64-apple-darwin", "aarch64-apple-darwin"] diff --git a/launcher/Cargo.toml b/launcher/Cargo.toml index a2cdfee..69ba84c 100644 --- a/launcher/Cargo.toml +++ b/launcher/Cargo.toml @@ -6,3 +6,9 @@ edition = "2021" [dependencies] dirs = "5.0.1" rustc_version_runtime = "0.3.0" + +[profile.release] +strip = "symbols" +lto = "fat" +panic = "abort" +codegen-units = 1 diff --git a/launcher/build.sh b/launcher/build.sh new file mode 100755 index 0000000..cf47f3c --- /dev/null +++ b/launcher/build.sh @@ -0,0 +1,12 @@ +#!/bin/zsh +rm -rf release +mkdir release + +cargo clean +cargo build --release --all + +cp target/x86_64-pc-windows-gnu/release/launcher.exe release/launcher-windows-x64.exe +cp target/x86_64-unknown-linux-gnu/release/launcher release/launcher-linux-x64 +cp target/x86_64-apple-darwin/release/launcher release/launcher-darwin-x64 +cp target/aarch64-unknown-linux-musl/release/launcher release/launcher-linux-arm64 +cp target/aarch64-apple-darwin/release/launcher release/launcher-darwin-arm64 diff --git a/launcher/src/lib.rs b/launcher/src/lib.rs index 32ae8ee..16b90a3 100644 --- a/launcher/src/lib.rs +++ b/launcher/src/lib.rs @@ -1,9 +1,9 @@ -pub mod constants; - use std::ffi::OsStr; use std::path::PathBuf; use crate::AppDataError::NotFound; +pub mod constants; + pub enum AppData { Folder(PathBuf), Asar(PathBuf) diff --git a/launcher/src/main.rs b/launcher/src/main.rs index 4e61592..441219f 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -1,9 +1,9 @@ -mod search_path; - use std::path::PathBuf; use std::process; use launcher::{AppData, AppDataError, constants}; +mod search_path; + fn show_system_info() { println!( "atomic-launcher: Starting atomic-launcher {} on {} ({})", |