Building and installing from source
From Performous
Contents |
[edit] Preparations
Be sure not to have multiple versions (e.g. 0.4.0 and Git) installed at the same time. It may seem to work, but the graphics will display incorrectly due to wrong theme files being used. To ensure that, clear the following files/folders:
- /usr/local/bin/performous
- /usr/local/lib/libda
- /usr/local/share/games/performous
[edit] Installing build dependencies
If you happen to be running one of these, please start by installing the following packages. If not, just skip this section and follow the instructions. We try to keep these lists accurate and up-to-date with the development version. If you find that something is missing or that there are unnecessary package installs, please fix it.
[edit] Debian (testing/unstable) and Ubuntu
sudo aptitude install git-core cmake build-essential gettext help2man \ libglew1.5-dev libsdl1.2-dev libcairo2-dev librsvg2-dev libboost1.40-all-dev \ libavcodec-dev libavformat-dev libswscale-dev libpng-dev libjpeg-dev \ libsamplerate0-dev libxml++2.6-dev libasound2-dev libjack-dev libpulse-dev \ portaudio19-dev libgstreamer0.10-dev
Note: the audio libraries (at the end of the list) are optional. Install only the ones that you are going to use. If you are packaging Performous, install all of them (the ones actually available are detected runtime).
For optional midi drum support you also need package libportmidi-dev. For webcam support, libcv-dev and libhighgui-dev.
[edit] Gentoo
sudo emerge boost ffmpeg help2man imagemagick libsamplerate libsdl libxmlpp git cmake glew
[edit] Fedora
(You need RPM Fusion Free repository for ffmpeg):
su -c 'yum install git cmake gcc-c++ gettext gtk2-devel cairo-devel librsvg2-devel \ libsigc++20-devel glibmm24-devel libxml++-devel ImageMagick-c++-devel boost-devel \ SDL-devel glew-devel ffmpeg-devel pulseaudio-libs-devel portaudio-devel help2man redhat-lsb opencv-devel'
Maybe you would like to install standard Windows fonts for better compatibility. On first step you will find a broken link, you can use "http://atrpms.net/dist/f12/chkfontpath/" (use "...dist/fxx/chk..." if you are using other distribution: f11, f10...).
[edit] OS X
sudo port install git-core cmake help2man libsdl glew cairo librsvg portaudio \ libxmlxx2 boost +complete imagemagick ffmpeg +avfilter libsamplerate
Note: GCC 4.0.1 is very buggy and outdated. We recommend getting at least GCC 4.2 and using that to compile Performous. You will not need to switch the MacPorts default compiler, configuring CMake to use the new compiler is enough.
[edit] Windows
Building in Windows is a bit trickier since you cannot get the dependencies as easily as in other systems. You should download the Git version (see Developing) and look at the scripts in win32 folder. They attempt to automatically set up the build environment (download and compile dependencies). Currently Visual Studio version seems to work better than GCC.
[edit] Cross-compilation
The dependencies can be cross-compiled for Windows from Debian/Ubuntu linux (possibly others too), using mingw32 cross compiler. The script in win32/cross-from-debian should download and compile everything automatically and there is also a script to cross-compile Performous itself after the dependencies. The process is quite long and can easily take over an hour (took 2 hours on a single-core 1.8GHz laptop). Note that the resulting build is for the time being very unstable and as such, unusable for end-users. However, it would be great to get that fixed.
[edit] Downloading and installing the sources
You can download the latest stable sources from Performous Download web page, but we recommend using the latest code from our git repository. Details can be found from the Developing page, but if you don't want to bother with git, you can just download the bleeding edge code directly.
Once the download is finished, extract the files and you will get a folder called performous. In the terminal, go to the path where this folder is (i.e. "cd /home/user/Desktop") and do the following:
cd performous mkdir build cd build cmake ../ make sudo make install
The above commands should build and install the game. If you get errors (especially if they are from the cmake command), you are probably missing some libraries required by the game. Install the needed libraries (development versions, e.g. libboost-dev) and retry the failing step until all dependencies are sorted out.
Optionally, if you want to change installation path or do other compile-time configuration, you can use ccmake command line tool in build directory:
ccmake .
CMake has also graphical interfaces, e.g. cmake-qt-gui on Ubuntu.
