2.7 KiB
Go with SDL on everything else
Most any other operating system is Unix-like (e.g. Linux, Mac, BSD, Haiku, etc.), so they will all have very similar setups.
Each of these systems also has their own way of installing software, usually with their own package managers. I don't know all the exact names of each of these packages, but hopefully giving you some examples will help.
Install the dependencies
You will need the following dependencies:
- Git
- Go (Golang)
- GCC
- SDL2 (with Image, TTF, and Mixer)
That's all, you may even have most of them installed already.
I also use golangci-lint as a Go linter. This is used by the Makefile before running go build
. You can either install this from your package manager or with go install
. To work-around this, you can just run go build
directly without the makefile or edit the linter section of the makefile to do nothing.
Debian
As the most common example, on Debian or Ubuntu, the following apt
command should install all the dependencies:
sudo apt install git golang gcc libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev
The default version of Go in the Debian repos might be too old. You can install a newer version using the testing/unstable repos (try this or this), or you could manually install Go from their website.
Mac
On Mac, the typical recommendation is to use Homebrew. The package names are pretty similar:
brew install git go gcc sdl2 sdl2_image sdl2_ttf sdl2_mixer
Redhat/Fedora/Rocky/CentOS
The Redhat-related distros all have very similar names as well, notably using devel
instead of dev
and SDL2
is capitalized. I ran the following on Fedora successfully.
(these distros may use dnf
or yum
as the package manager executable, dnf
is newer)
sudo dnf install git golang gcc SDL2-devel SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel
pkgsrc
pkgsrc is NetBSD's package manager, but I've taken a liking to it and actually use it on Linux as well.
As a reference for the BSD crowd, the dependencies in pkgsrc are:
- devel/git
- lang/go119
- lang/gcc12
- devel/SDL2
- graphics/SDL2_image
- fonts/SDL2_ttf
- audio/SDL2_mixer
Others
I apologize for not adding more systems, but at some point this list gets annoyingly long to repeat the same thing. Your distribution should almost certainly have these dependencies, and they will be named something similar to the above examples.
Build
You can use the Makefile to run
make release
or you can use go build
directly.