Downloading and Compiling under Linux: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
{{DownloadAndCompileNotice|OS=Linux}} | |||
This page documents how to compile Arx Libertatis from https://github.com/arx/ArxLibertatis under Linux or FreeBSD. | This page documents how to compile Arx Libertatis from https://github.com/arx/ArxLibertatis under Linux or FreeBSD. | ||
Revision as of 08:57, 18 April 2012
ℹ️ This page describes compiling Arx Libertatis from source under Linux and assumes some familiarity with the command-line. If you just want to play the game, it might be easier to grab a binary release or snapshot if available.
This page documents how to compile Arx Libertatis from https://github.com/arx/ArxLibertatis under Linux or FreeBSD.
Specific instructions are given for a cleanly installed Ubuntu 10.10 AMD64 system, but the procedure should be similar for other Linux distributions or FreeBSD. Please update this page if something is missing.
There is also a nice, but possibly outdated video how-to on linuxgamecast.com.
Known upstream bugs
There is a known rendering bug with the r600g gallum3d driver in mesa 7.11. The classic non-gallium driver is not affected. The bug is not present in mesa 7.10.3 and is fixed newer versions.
SDL 1.2.15 has a regression that breaks resizing the Arx Libertatis window from the corner. The offending commit has been reverted in Debian and Gentoo unstable.
Manual installation
Setting Up the Build Environment
To download and compile Arx Libertatis you will need the following tools:
git
cmake
(version 2.8 or later)- a
gcc
orclang
toolchain
Your system must have the following dependencies installed, including headers / development versions:
SDL
1.2 (http://www.libsdl.org/)OpenGL
1.5 or newer (http://www.opengl.org/)GLEW
(http://glew.sourceforge.net/)OpenAL
(OpenAL Soft is recommended: http://kcat.strangesoft.net/openal.html)DevIL
(http://openil.sourceforge.net/)zlib
(http://zlib.net/)Boost
headers and program_options library (http://www.boost.org/)Freetype
(http://www.freetype.org/)
The optional crash reporter application also needs:
Qt 4
: QtCore, QtGui and QtNetwork libraries (http://qt.nokia.com/)GDB
(http://www.gnu.org/software/gdb/)
Your distribution's default repository might not have the DevIL package, so you may need to use a custom repository or build DevIL manually. See the project's web site for details about obtaining it.
Example for apt
-Based Systems
On an apt
-based system such as Debian or Ubuntu, use:
sudo apt-get install git build-essential cmake zlib1g-dev libfreetype6-dev libdevil1c2 libdevil-dev libopenal1 libopenal-dev mesa-common-dev libgl1-mesa-dev libboost-all-dev libsdl1.2-dev libglew-dev qt-sdk gdb
Your package manager will probably prompt you to install other packages, so just say yes to those. qt-sdk is not needed for the game to run, but without it the crash reporter will be disabled, making it harder to report errors in case of a crash. gdb is used to generate detailed crash information and is not needed at compile-time.
Cloning the code repository
First, go to where you want the ArxLibertatis directory to be located.
cd ~/Code
You are now ready to clone the repository, type:
git clone git://github.com/arx/ArxLibertatis.git
This creates a directory called ArxLibertatis and downloads the current source code from github.
cd ArxLibertatis
Alternatively you can download a stable source code release and extract that:
- Arx Libertatis Source Codearx-libertatis-1.2.tar.xz2.4 MiB
MD5:8e05754b75af0ed7fbf709d30b28df3c
signature
Compiling
Now you should be ready to configure and compile. Run cmake:
cmake .
And now you should be able to compile with
make -j`getconf _NPROCESSORS_ONLN`
Alternatively, you can tell cmake to generate a unity build file, which might result in faster build times and better optimization depending on your machine configuration but will need more RAM to compile. Run cmake like this:
cmake . -DUNITY_BUILD=1
And make without the -j flag, since in effect there is only one file to build, named ub_arx.cpp
Running the executable
For a manual installation, run arx by specifying a relative path to the arx
executable:
./arx
If you installed arx through the package manager of your distro, just run arx
in the directory containing the data files.
You will need to obtain a copy of the data files from a commercial copy of Arx, or use the demo data files, put these in your bin directory and you are ready to go!
The game will automatically change all used files to lower-case on the first start. If you want to run the game with read-only data you need to do this manually.
For running arx in a debugger, see Debugging