From 16835bb61d5b58da6d207f577c3cb29a817a7f20 Mon Sep 17 00:00:00 2001 From: dankmeme01 <42031238+dankmeme01@users.noreply.github.com> Date: Sun, 14 Jul 2024 15:18:22 +0200 Subject: [PATCH] fix xwin downloading on macos --- src/sdk.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/sdk.rs b/src/sdk.rs index 317936c..90cbd97 100644 --- a/src/sdk.rs +++ b/src/sdk.rs @@ -738,8 +738,16 @@ fn download_xwin(dest: &Path) -> Result<(), Box> { .iter() .find(|value| { value.get("name").is_some_and(|v| { - v.as_str() - .is_some_and(|v| v.ends_with("x86_64-unknown-linux-musl.tar.gz")) + v.as_str().is_some_and(|v| { + v.ends_with( + #[cfg(all(target_os = "macos", target_arch = "aarch64"))] + "aarch64-apple-darwin.tar.gz", + #[cfg(all(target_os = "macos", target_arch = "x86_64"))] + "x86_64-apple-darwin.tar.gz", + #[cfg(not(target_os = "macos"))] + "x86_64-unknown-linux-musl.tar.gz", + ) + }) }) });