Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling for M1 Macs #88

Open
nxsaken opened this issue Mar 29, 2023 · 0 comments
Open

Compiling for M1 Macs #88

nxsaken opened this issue Mar 29, 2023 · 0 comments

Comments

@nxsaken
Copy link

nxsaken commented Mar 29, 2023

Hi! I was able to find this guide by branpower on how to make MasterPlan work on macOS + M1, and it worked for me. However, having no Go experience, I wasn't able to actually build a binary (for some reason the build script was trying to use an unmodified version of the libraries that have to be changed manually for the fix to work). I could only run the program via the main() function.

If someone figures out how to fix the build, it's possible to produce a working binary for M1. I followed steps 1-3 from this guide, then simply resolved the compile errors (steps 4-5 looked a bit different in my case in terms of line numbers / filenames, I can demonstrate if needed):

  1. Used brew install to get all the sdl2_ libraries.
  2. Used the 0.5.0 alpha of the veandco/go-sd2l library: go get github.com/veandco/go-sdl2@v0.5.0-alpha.1
  3. Removing HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT from veandco/sdl/hints.go
  4. Line 85 in veandco/sdl/sdl_ttf.go: use SDL_bool rather than int
  5. Changing color assign in events and textrenderer from the sdl.Color8888 to color.Color
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

No branches or pull requests

1 participant