Skip to content

Conversation

Eropi4
Copy link

@Eropi4 Eropi4 commented Mar 24, 2024

The build script should work for both ARM and Intel (x86_64) macs.
Tested only on ARM macbook.

Macos ARM application to attach to release - https://github.com/Eropi4/eepers/releases/tag/1.0-macos

To run the built app you should remove quarantine attr, since it's not signed.
xattr -rc eepers.app

image image

@Eropi4
Copy link
Author

Eropi4 commented Mar 24, 2024

For other mac users: I used gcc/gnatmake from the following distribution https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-13.2.0-aarch64
There is also an Intel version https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-13.1.0-x86_64
The gcc from homebrew doesn't include Ada unfortunately.

To run the built app you should remove quarantine attr, since it's not signed.
xattr -rc eepers.app

@rexim maybe this info should be added to README, not sure.

@mawaldne
Copy link

mawaldne commented Mar 24, 2024

@Eropi4 Just wanted to say thanks! I was able to build the project on my Apple M1. I just wanted to try it out from the command line. For anyone else wanting to try, here's what I did:

  1. Download and install https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-13.2.0-aarch64. It installs to /opt

  2. Clone raylib and build it for a Mac:

# See: https://github.com/raysan5/raylib/wiki/Working-on-macOS for more info
git clone git@github.com:raysan5/raylib.git
cd raylib/src && make PLATFORM=PLATFORM_DESKTOP
  1. Clone eepers and use raylib file you just built above:
git clone git@github.com:tsoding/eepers.git
cd eepers
/opt/gcc-13.2.0-aarch64/bin/gnatmake -f -O3 -Wall -Wextra -gnat2022 eepers.adb -bargs -static -largs -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL ../raylib/src/libraylib.a
  1. PLAY! ./eepers

Thanks again!

@Eropi4
Copy link
Author

Eropi4 commented Mar 24, 2024

@mawaldne Great!
By the way, you don’t need to build raylib specifically for m1. The distributable provided by raylib (https://github.com/raysan5/raylib/releases/download/5.0/raylib-5.0_macos.tar.gz, I included it in the PR) has lib files for both x86 and arm.

@rexim
Copy link
Member

rexim commented Mar 25, 2024

I have no means to verify this for myself, but since other people say it works, I'll merge it. Thank you for the contribution!

@rexim rexim merged commit 2757c3c into tsoding:main Mar 25, 2024
@Kensan Kensan mentioned this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants