SolarLune / masterplan

MasterPlan is a project management software / visual idea board software. It attempts to be easy to use, lightweight, and fun.
https://solarlune.itch.io/masterplan
512 stars 46 forks source link

Compiling for M1 Macs #88

Open nxsaken opened 1 year ago

nxsaken commented 1 year ago

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