diff options
author | Alexey Kutepov <reximkut@gmail.com> | 2024-03-25 20:25:49 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 20:25:49 +0700 |
commit | 2757c3cf458d8b5a7aa3ff965242339d46d86836 (patch) | |
tree | 8271926aa3963c8ad7aa13cbd61708ab695e50ec /build-macos.sh | |
parent | 9fa0728f721988fb482566237733784a1c2f67d1 (diff) | |
parent | 438d3771c0738690f25ead1dceacc22a688d23eb (diff) |
Merge pull request #13 from Eropi4/macos-build
Add macos (unified) build script
Diffstat (limited to 'build-macos.sh')
-rwxr-xr-x | build-macos.sh | 33 |
1 files changed, 33 insertions, 0 deletions
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 '<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleExecutable</key> + <string>eepers</string> + <key>CFBundleIconFile</key> + <string>icon.ico</string> +</dict> +</plist>' > eepers.app/Contents/Info.plist
\ No newline at end of file |