-
Notifications
You must be signed in to change notification settings - Fork 130
Build Instructions for Linux
Note
This page applies to the in-development new build system. For current build instructions, see here.
- Debian-based (Ubuntu, etc)
- [Red Hat / Fedora](#Red Hat-based)
- Others(#Other)
-
In a terminal window, install ares dependencies using
apt
:First, install build system dependencies:
sudo apt install build-essential cmake ninja-build pkg-config curl ccache git
Compiling with clang is optional, but generally recommended:
sudo apt install clang
Next, install required ares dependencies:
sudo apt install \ libgtk-3-dev \ libcanberra-gtk-module \ libgl-dev
Lastly, install optional dependencies (at least one audio driver is recommended):
sudo apt install \ libasound2-dev \ libao-dev \ libopenal-dev \ libsdl2-dev \ libpulse-dev
Installing librashader (via Open Build Service) is also recommended but not required.
- In a terminal window, navigate to a directory where you would like to build ares.
- Clone the ares repository and change into its directory:
git clone https://github.com/ares-emulator/ares
cd ares
First, generate a build environment:
mkdir build && cd build
cmake .. -G Ninja
During the above generation step, you can optionally configure ares in a number of ways. See the Build Options page for a full list of configuration options.
Next, build the project:
cmake --build .
With ares built, you may run it from the staging directory:
./rundir/bin/ares
If you want to install ares to another location, you may also optionally do so with CMake:
cmake --install . --prefix </your/chosen/prefix>
TODO
- Git
- CMake 3.28 or higher
- A compiler toolchain such as clang or gcc
ares requires development versions of the following packages in order to build:
- X11
- libGL
- GTK3 (gtk+-3.0)
Recommended development packages include:
- librashader
- SDL2
You may also configure with development packages for other audio drivers:
- OpenAL
- AO
- ALSA
- PulseAudio
Optional but recommended build tools include:
- Ninja
- clang
- Ccache
First, clone the ares repository:
git clone https://github.com/ares-emulator/ares
cd ares
Building ares with clang
and Ninja is recommended:
mkdir build && cd build
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -G "Ninja Multi-Config"
The generation step will report what features are enabled and disabled according to the libraries found on your system. Next, build ares:
cmake --build .
After building, products can be found in the rundir
folder. ares can be run from this location, or the rundir can be relocated. ares can also be install
ed:
cmake --install . --prefix <your install prefix>
For further configuration options, see the Build Options page.