Skip to content

Commit

Permalink
fix default platform on geode build
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Jun 30, 2024
1 parent 9ade13c commit 0b31d79
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "geode"
version = "3.0.5"
version = "3.0.6"
authors = [
"HJfod <dreadrollmusic@gmail.com>",
"Camila314 <ilaca314@gmail.com>",
Expand Down
15 changes: 14 additions & 1 deletion src/project_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 0b31d79

Please sign in to comment.