diff --git a/Cargo.lock b/Cargo.lock index fa8625b..e041b17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -993,7 +993,7 @@ dependencies = [ [[package]] name = "geode" -version = "3.0.5" +version = "3.0.6" dependencies = [ "ansi_term", "cfg-if 1.0.0", diff --git a/Cargo.toml b/Cargo.toml index 666a017..0cc55d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "geode" -version = "3.0.5" +version = "3.0.6" authors = [ "HJfod ", "Camila314 ", diff --git a/src/project_build.rs b/src/project_build.rs index 0659cd7..087dd7c 100644 --- a/src/project_build.rs +++ b/src/project_build.rs @@ -22,7 +22,20 @@ pub fn build_project( s @ ("android32" | "android64") => String::from(s), s => fatal!("Unknown platform {s}"), }) - .unwrap_or_else(|| String::from("win")); + .unwrap_or_else(|| { + if cfg!(target_os = "windows") { + String::from("win") + } else if cfg!(target_os = "android") { + String::from("android64") + } else if cfg!(target_os = "linux") { + // maybe default to win whenever it can cross compile + String::from("android64") + } else if cfg!(target_os = "macos") { + String::from("mac") + } else { + fatal!("Unknown platform, please specify one with --platform"); + } + }); let cross_compiling = if cfg!(target_os = "windows") { platform != "win" } else if cfg!(target_os = "linux") {