masterplan icon indicating copy to clipboard operation
masterplan copied to clipboard

Compiling for M1 Macs

Open nxsaken opened this issue 2 years ago • 0 comments

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/[email protected]
  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

nxsaken avatar Mar 29 '23 12:03 nxsaken