Eve-of-Darkness / db-public

Vanilla database for Dawn of Light
19 stars 19 forks source link

MacOS : fix binaries format #233

Closed DigitalBox98 closed 3 years ago

DigitalBox98 commented 3 years ago

Format is now correct with Mach-O 64-bit executable x86_64

LRFalk01 commented 3 years ago

Does something need changed in the script that generates the executables?

DigitalBox98 commented 3 years ago

I don't think so : launching these scripts on MacOS is generating the good binaries format So I guess if the scripts are launched on another platform it's not the same result (not sure where it comes from)

LRFalk01 commented 3 years ago

I think this is just because MacOS is dumb. Generating the binaries on any platform for Win/Linux works fine. I guess the better option here is to just remove the macos binaries from source control and have the user generate them manually. A better option would be for the user to use a better OS that isn't so bad like Ubuntu. :trollface:

DigitalBox98 commented 3 years ago

Ok and the windows binaries were generated from windows or Linux ? If it was Windows so MacOS behave the same way than other OS :) I’m not an expert with GO building, but it seems there’s a gox command for cross compilation: gox -osarch="darwin/amd64 linux/386 linux/amd64" So it might be a point to investigate

LRFalk01 commented 3 years ago

We've generated the binaries on both windows and linux, and have ran them on the other platform. I don't have a personal macos device to play around with it. I use a mac for work but I'd never use it after hours when I dont have to 😂

NetDwarf commented 3 years ago

This idea might be stupid, but would it be an option to generate binaries via Github Actions? Afaik it's free for open-source projects and it supports Linux, Windows and macOS.

LRFalk01 commented 3 years ago

That's probably a pretty good idea, tbh.

LRFalk01 commented 3 years ago

It removes the concern I have with a nefarious actor generating a compromised binary.

DigitalBox98 commented 3 years ago

Agree with the Mac not after hours :)

I've double checked the script "compile_sripts.sh" and it seems an export is missing :

Compile Macos

export GOOS=darwin export GOARCH=amd64

The same fix should apply for Windows and Linux section so that cross compilation can occur whatever the platform is Win/Mac/Linux :)

DigitalBox98 commented 3 years ago

It should be OK now with the script changes:) If this PR is a mess, I can create another one, let me know.

LRFalk01 commented 3 years ago

it looks like your branch is out of date of current master. every file is in conflict.

DigitalBox98 commented 3 years ago

Yes hence my remark. I will recreate a clean PR.