From 5fdeb1a73cafcf8ead8e91830d171724291f1d9f Mon Sep 17 00:00:00 2001 From: Yehor Melnykov Date: Sun, 24 Mar 2024 17:08:26 +0100 Subject: Add macos (unified) build script --- build-macos.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 build-macos.sh (limited to 'build-macos.sh') diff --git a/build-macos.sh b/build-macos.sh new file mode 100755 index 0000000..7b9ff34 --- /dev/null +++ b/build-macos.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +set -xe + +gnatmake -f -O3 -Wall -Wextra -gnat2022 eepers.adb -bargs -static -largs -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL ./raylib/raylib-5.0_macos/lib/libraylib.a + +# Bundle executable in an Application +rm -rf ./eepers.app +mkdir -p ./eepers.app/Contents +mkdir ./eepers.app/Contents/MacOS +mkdir ./eepers.app/Contents/Resources +touch ./eepers.app/Contents/Info.plist + +# copy binary +cp ./eepers ./eepers.app/Contents/MacOS/ + +#copy assets +cp -r ./assets ./eepers.app/Contents/MacOS/ + +# copy app icon +cp assets/icon.ico ./eepers.app/Contents/Resources/ + +# fill required plist file +echo ' + + + + CFBundleExecutable + eepers + CFBundleIconFile + icon.ico + +' > eepers.app/Contents/Info.plist \ No newline at end of file -- cgit v1.2.3