a-h / gemini

MIT License
45 stars 3 forks source link

How to compile? #11

Closed lpvm closed 3 years ago

lpvm commented 3 years ago

It would be nice if you can show how to compile from source.

make release complains about the present directory not being .git repository.

a-h commented 3 years ago

No problem.

make release attempts to build for all architectures, sign the binaries, and push a release to Github etc., so that's not what you want.

If you want to build from source for the architecture of the machine doing the building, the steps are:

I've just added a build step to the Makefile, so you should be able to do make build and get a binary out, if you've got Go >= 1.14 already installed.

If you want to build from one machine (e.g. an x64 Windows machine) to target another (e.g. an ARM Raspberry Pi), you can set Go's GOARCH and GOOS environment variables before compilation, and it will compile for that target.

Is that what you needed?

lpvm commented 3 years ago

Thank you very much! Yes, that's it. I'm sure it'll be of help for other people as well.