Downloading and Compiling under Linux: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
m (→‎Running the executable: no bin folder now)
Line 96: Line 96:


For a manual installation, run arx by specifying a relative path to the <code>arx</code> executable:
For a manual installation, run arx by specifying a relative path to the <code>arx</code> executable:
cd bin
  ./arx
  ./arx



Revision as of 11:16, 12 February 2012

This page documents how to compile Arx Libertatis from https://github.com/arx/ArxLibertatis under linux.

Specific instructions are given for a cleanly installed Ubuntu 10.10 AMD64 system but the procedure should be similar for other distributions. Please update this page if something is missing.

There is also a nice 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 in mesa's git master.

Manual installation

Setting Up the Build Enviroment

Your system must have the following dependencies installed:

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 cmake g++ g++-multilib zlib1g-dev lib32z1-dev libfreetype6-dev libdevil1c2 libdevil-dev libopenal1 libopenal-dev mesa-common-dev libgl1-mesa-glx libgl1-mesa-glx-dev

Your package manager will probably prompt you to install other packages, so just say yes to those.

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

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 depending on your machine configuration. Run cmake like this:

cmake . -DARX_USE_UNITYBUILD=1

And make without the -j flag, since in effect there is only one file to build, named ub_arx.cpp

Automatic installation

Arch icon.png Arch Linux

You need an AUR Helper to install the arx-git Package. For example packer.

packer -S arx-git

Gentoo icon.png Gentoo Linux

You will need layman with git support, so install that first if you don't have it already:

echo "app-portage/layman git" >> /etc/portage/package.use
emerge -N app-portage/layman

Next, you need to add the arx-libertatis overlay that contains the arx ebuild.

layman -f
layman -a arx-libertatis

For now, there is only a live ebuild: this will compile and install the current ArxLibertatis git master. Like most gentoo live ebuilds, games-rpg/arx-libertatis needs to be unmasked before you can istall it:

echo "games-rpg/arx-libertatis **" >> /etc/portage/package.keywords
emerge games-rpg/arx-libertatis

This will install /usr/games/bin/arx. Remember that you need to be in the games group to run games under gentoo.

Updating

Overlays added using layman won't be updated by emerge --fetch, you need to run

layman -S

Also, as games-rpg/arx-libertatis-9999 is a live ebuild, it won't be updated automatically (the version never changes), you need to manually re-emerge it.

Running the executable

For a manual installation, run arx by specifying a relative path to the arx executable:

./arx

If you instaled 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 commerical 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 lowercase 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