Building and installing from source

From Performous

Jump to: navigation, search

Notice: We focus on keeping these instructions accurate for the latest development version, git master. So if you are trying older stable releases, for example, you might find that these don't work perfectly - at least the required package lists, the CMake procedure is pretty much the same.

Contents

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

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.

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 portaudio19-dev

Instead of the previous, you can do:

sudo aptitude build-dep performous

which installs all the build dependencies for the version in the repositories. It might not be completely accurate for git version, but should get you pretty far. Obviously you can use apt-get instead of aptitude if you wish.

For optional midi drum support you also need the package libportmidi-dev. For webcam support, libcv-dev and libhighgui-dev. If you are packaging Performous, these should be included.

Gentoo

sudo emerge boost ffmpeg help2man imagemagick libsamplerate libsdl libxmlpp git cmake glew

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 portaudio-devel help2man redhat-lsb opencv-devel \
  portmidi-devel'

Maybe you would like to install standard Windows fonts for better compatibility. Go to the "Non-Free Fonts available on the net" section.

OS X

sudo port install git-core cmake help2man libsdl glew cairo librsvg portaudio \
  libxmlxx2 boost +complete imagemagick ffmpeg +avfilter

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.

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.

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 you should use as new compiler as possible - GCC 4.5.0 seems to provide good results, whereas GCC 4.4.x's build is horribly unstable.

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.

Personal tools