From 34376d34900f2d98a0f51187424365c74132455f Mon Sep 17 00:00:00 2001 From: ardocrat Date: Fri, 13 Sep 2024 14:56:04 +0300 Subject: [PATCH] build: fix macos --- macos/build_release.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/macos/build_release.sh b/macos/build_release.sh index d9330d1..b1e94fd 100755 --- a/macos/build_release.sh +++ b/macos/build_release.sh @@ -34,11 +34,16 @@ rm -rf target/aarch64-apple-darwin [[ $2 == "arm" ]] && arch+=(aarch64-apple-darwin) [[ $2 == "universal" ]] && arch+=(universal2-apple-darwin) -# Start release build with zig linker for cross-compilation -# zig 0.12+ required -cargo install cargo-zigbuild -cargo zigbuild --release --target ${arch} -rm -rf .intentionally-empty-file.o +if [[ "$OSTYPE" != "darwin"* ]]; then + # Start release build with zig linker for cross-compilation + # zig 0.12+ required + cargo install cargo-zigbuild + cargo zigbuild --release --target ${arch} + rm -rf .intentionally-empty-file.o +else + cargo build --release --target ${arch} +fi + mkdir macos/Grim.app/Contents/MacOS yes | cp -rf target/${arch}/release/grim macos/Grim.app/Contents/MacOS