Kompilieren aus den Quelltexten und Installation
From Performous
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.
Kompilieren aus den Quelltexten und Installation
Man kann den neuesten stabilen Quellcode von Performous Download web page herunterladen, aber wir empfehlen euch den Quellcode zu verwenden, den ihr in unserem git findet. Weitere Details dazu findet man auf der Entwicklung Seite hier im Wiki. Wenn ihr euch nicht mit Git herumärgern wollt, dann könnt ihr den Quelltext auch direkt von dieser Seite herunterladen.
Wenn der Download beendet ist, entpackt man die Dateien und man erhält eine Ordner mit dem Names „performous”. Nun öffnet man eine Kommandozeile und begibt sich zu dem Pfad in dem gerade die Dateien entpackt wurden (z.B. "cd /home/user/Desktop"). Anschließend müssen folgende Befehle ausgeführt werden:
cd performous mkdir build cd build cmake ../ make sudo make install
Die oben genannten Befehle sollten performous kompilieren und installieren. Sollte man Fehlermeldungen bekommen (besonders wenn diese beim Ausführen von cmake erscheinen), so fehlen häufig einige Bibliotheken (Entwicklerversionen bestimmter Pakete, z.B.. libboost-dev) die vom Spiel verlangt werden. Installiert man diese nach und beginnt wieder bei dem Schritt bei dem diese Fehler erschienen. Dieses wiederholt man so lange bis es funktioniert.
Optional kann der Installationspfad oder die compile-time Konfiguration angepasst werden. Dafür gibt es den Befehl ccmake der sich im build Verzeichnis findet:
ccmake .
Für CMake gibt es auch grafische Oberflächen, z.B. cmake-qt-gui für Ubuntu.
