Downloading and Compiling under Linux: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Add a note about broken rendering with r600g in mesa 7.11)
Line 68: Line 68:
<code>./arx</code>
<code>./arx</code>


You will need to obtain a copy of the data files from a commerical copy of Arx, or use the [http://download.cnet.com/ARX-Fatalis-updated-demo/3000-7539_4-10229017.html demo data files], put these in your bin directory and you are ready to go!
You will need to [[Getting the game data|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.
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]]
For running arx in a debugger, see [[Debugging]]

Revision as of 01:15, 15 October 2011

I have listed below the procedure to go from a cleanly installed Ubuntu 10.10 AMD64 system, to being able to compile and run the version of Arx Fatalis available from https://github.com/lubosz/ArxFatalis.git

Your mileage may vary with other distros, but you should be able to figure out the packages you need from your particular package manager.

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

Or, as root:

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.

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.

Cloning the code repository

I prefer to work in a Code/ directory under my home directory.

cd ~/Code

You are now ready to clone the repository, type:

git clone https://github.com/lubosz/ArxFatalis.git

This creates a directory called ArxFatalis and downloads lubosz's current master branch of the source code from github.

cd ArxFatalis

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

Running the executable

cd bin

./arx

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