From e5d79e80e1be5711d688610a7ed4aea352eaa01c Mon Sep 17 00:00:00 2001 From: Nikhil <25770025+nikhilhenry@users.noreply.github.com> Date: Tue, 14 Nov 2023 17:28:36 +0530 Subject: [PATCH] create script to package app --- scripts/package_macos.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/package_macos.sh diff --git a/scripts/package_macos.sh b/scripts/package_macos.sh new file mode 100755 index 0000000..9d220b9 --- /dev/null +++ b/scripts/package_macos.sh @@ -0,0 +1,13 @@ +echo "Packaging universal app for MacOS" + +# building for Apple Silicon +cargo build --release --target aarch64-apple-darwin + +# building for Intel macs +cargo build --release --target x86_64-apple-darwin + +# creating universal binary using lipo +lipo -create -output path_finding target/x86_64-apple-darwin/release/path_finding target/aarch64-apple-darwin/release/path_finding + +#packaging into the mac app +mv path_finding ./build/astar.rs.app/Contents/MacOS/.