Skip to content

Build instructions

andy edited this page Jan 27, 2021 · 6 revisions

All platforms

The project currently requires a POSIX-like environment (which means MSYS2 on Windows), with GLEW, SDL2, SDL2_net, clang, git, rsync, and make. The Makefile is multiplatform, and produces a binary at build-<branch name>/Avara. You should be able to change directory into the Avara repo and make -j.

Windows 10

Before you do this, try the pre-built binaries. These should work for recent versions of Windows 10.

Avara does not yet support MSVC++, so the MSYS2 Mingw environment must be used.

  1. Install the MSYS2 environment.
  2. From the Start menu, open "MSYS2 Mingw64 terminal".
  3. Update MSYS2: pacman -Syu As part of this process, you will need to close the terminal window, and you may need to run the command again.
  4. Once MSYS2 is up to date, run the following: pacman --noconfirm --needed -Syuu mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-clang mingw-w64-x86_64-glbinding mingw-w64-x86_64-glew make git zip rsync
  5. You should now be able to clone the repository: git clone https://github.com/avaraline/Avara.git
  6. Enter the repository: cd Avara
  7. Build: make -j
  8. You can now start the game with: build-master/Avara.exe
  9. (optional) Make a portable exe: make winapp

Linux

On Debian based distributions of Linux, you can install the needed dependencies for building by running the following in a terminal:

apt-get -yq install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libegl1-mesa-dev libgles2-mesa-dev libsdl2-net-dev clang libdirectfb-dev git make rsync

libdirectfb-dev is an optional dependency for running headless tests.

On Arch Linux, install dependencies with sudo pacman -Syu sdl2 sdl2_net sdl2_mixer glew clang rsync glbinding make git zip

On Alpine, apk add sdl2-dev sdl2_net-dev glew-dev clang rsync g++ zip git (g++ is needed for the C++ standard library)

Finally,

cd /path/to/avara/repo && make -j && build-master/Avara

Apple macOS

Avara can be built using Xcode. But you can also use Homebrew. The bare minimum needed is the Xcode Command Line developer tools and a working homebrew.

Make sure Homebrew has the tools we need: brew install make git rsync

Now download SDL2.framework and SDL2_net.framework. To get these, go to both the SDL2 download page and the SDL2_net download page, and click the links under Development Libraries > Mac OS X.

Copy the files into either /Library/Frameworks or ~/Library/Frameworks.

After that, you should be able to build: cd /path/to/avara/repo && make -j. Use make macapp to create an app bundle. You can provide a SIGNING_ID environment variable to create a signed app bundle.