Compiling xoreos: Difference between revisions

From xoreos Wiki
Jump to navigation Jump to search
(Update build HOWTO with information about CMake)
(Add the libxml2 dependency)
Line 29: Line 29:
* [http://www.zlib.net/ zlib] (>= 1.2.3.4)
* [http://www.zlib.net/ zlib] (>= 1.2.3.4)
* [http://tukaani.org/xz/ liblzma] (>= 5.0.5)
* [http://tukaani.org/xz/ liblzma] (>= 5.0.5)
* [http://www.xmlsoft.org/ libxml2] (>= 2.9.1)
* [http://www.boost.org/ Boost] (>= 1.48.0)
* [http://www.boost.org/ Boost] (>= 1.48.0)
** Boost.StringAlgo
** Boost.StringAlgo
Line 54: Line 55:
On Debian-based GNU/Linux distribution (including Ubuntu), you should be able to install these libraries and their development packages with
On Debian-based GNU/Linux distribution (including Ubuntu), you should be able to install these libraries and their development packages with


  apt-get install zlib1g-dev liblzma-dev libboost-all-dev libsdl2-dev libfreetype6-dev \
  apt-get install zlib1g-dev liblzma-dev libxml2-dev libboost-all-dev libsdl2-dev \
    libopenal-dev libmad0-dev libogg-dev libvorbis-dev libfaad-dev libxvidcore-dev
    libfreetype6-dev libopenal-dev libmad0-dev libogg-dev libvorbis-dev libfaad-dev \
    libxvidcore-dev


Other GNU/Linux distributions should work similarily. Windows users have to visit each website manually and download a precompiled version, or, if not available, download the source and compile the library themselves.
Other GNU/Linux distributions should work similarily. Windows users have to visit each website manually and download a precompiled version, or, if not available, download the source and compile the library themselves.

Revision as of 02:13, 13 June 2015

This page gives a few tips and pointers on how to compile xoreos on various platforms.

Compiler and build system

xoreos is written in C++, so a C++ compiler, like GCC or clang is required. It has two build systems: Autotools (Autoconf, Automake and Libtool) and CMake. Use whichever you feel more comfortable with.

GNU/Linux

On Debian-based distributions (including Ubuntu), you should be able to install the required compiler and build system packages with

apt-get install libc6-dev g++ make autoconf automake libtool

On other distributions, it should work similarily.

Mac OS X

Due to the dependency on SDL2 (see below), you need at least Mac OS X 10.5 if you use a precompiled SDL2 library, and at least Mac OS X 10.7 if you're compiling SDL2 yourself.

Windows

Since Visual Studio does not work with autotools, you have to use the CMake build system if you want to compile xoreos with Visual Studio. If you're using MinGW, however, you're free to choose either build system.

Libraries

xoreos uses the following libraries to function:

On Debian-based GNU/Linux distribution (including Ubuntu), you should be able to install these libraries and their development packages with

apt-get install zlib1g-dev liblzma-dev libxml2-dev libboost-all-dev libsdl2-dev \
    libfreetype6-dev libopenal-dev libmad0-dev libogg-dev libvorbis-dev libfaad-dev \
    libxvidcore-dev

Other GNU/Linux distributions should work similarily. Windows users have to visit each website manually and download a precompiled version, or, if not available, download the source and compile the library themselves.

Compiling xoreos

Make you have your compiler, build system and libraries installed correctly. Then open a terminal and change into the directory of your sources.

autotools

Type

./autogen.sh && ./configure && make

The binary can be found in the src subdirectory, called "xoreos" or, on Windows, "xoreos.exe".

CMake

Type

cmake . && make

The binary can be found in the bin subdirectory, called "xoreos" or, on Windows, "xoreos.exe".

Please read Running CMake on the CMake website for in-depth information on invoking CMake.

Running xoreos

Please have a look at the Running xoreos page.