Skip to content

Compiling for M1 Macs #88

Description

@nxsaken

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions