Distribution : Raspbian avec le dernier kernel 1) Vérification de la distribution :
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.6.11+ #377 PREEMPT Sat Feb 16 17:31:02 GMT 2013 armv6l GNU/Linux
2) Répertoire de travail :
pi@raspberrypi ~ $ mkdir -p JEUX/QUAKE2
pi@raspberrypi ~ $ cd JEUX/QUAKE2/
pi@raspberrypi ~/JEUX/QUAKE2 $
3) Installation des paquetages de base :
pi@raspberrypi ~/JEUX/QUAKE2 $ sudo apt-get install libsdl1.2-dev libvorbis-dev libogg-dev zlib1g-dev libjpeg8-dev
4) Récupération du code source :
pi@raspberrypi ~/JEUX/QUAKE2 $ git clone https://github.com/reefab/yquake2.git
pi@raspberrypi ~/JEUX/QUAKE2 $ cd yquake2/
5) Compilation :
pi@raspberrypi ~/JEUX/QUAKE2/yquake2 $ make
Erreur :
===> CC src/egl/eglport.c
In file included from /opt/vc/include/bcm_host.h:50:0,
from src/egl/eglport.c:52:
/opt/vc/include/interface/vmcs_host/vcgencmd.h:33:27: fatal error: vchost_config.h: Aucun fichier ou dossier de ce type
compilation terminated.
make[1]: *** [build/refresher/src/egl/eglport.o] Erreur 1
Solution : Ouvrir :
Makefile
Chercher :
else ifeq ($(PI),yes)
INCLUDE := -I$(PREFIX)/opt/vc/include/interface/vcos/pthreads -I$(PREFIX)/opt/vc/include -I/usr/include -I$(PREFIX)/usr/include/SDL
Remplacer par :
else ifeq ($(PI),yes)
INCLUDE := -I$(PREFIX)/opt/vc/include/interface/vcos/pthreads -I$(PREFIX)/opt/vc/include -I/usr/include -I$(PREFIX)/usr/include/SDL -I/opt/vc/include/interface/vmcs_host/linux
6) Copie d'un fichier de configuration yquake2 :
pi@raspberrypi ~/JEUX/QUAKE2/yquake2 $ cp stuff/yq2.cfg release/baseq2/
7) Copier les ressources Quake2 original baseq2/ vers /home/pi/JEUX/QUAKE2/yquake2/release/baseq2/ Ou 7.1) Installation de la version de démonstration :
pi@raspberrypi ~/JEUX/QUAKE2/yquake2 $ cd ..
pi@raspberrypi ~/JEUX/QUAKE2 $ mkdir demo
pi@raspberrypi ~/JEUX/QUAKE2 $ cd demo
pi@raspberrypi ~/JEUX/QUAKE2/demo $ wget ftp://ftp.idsoftware.com/idstuff/quake2/q2-314-demo-x86.exe
pi@raspberrypi ~/JEUX/QUAKE2/demo $ unzip q2-314-demo-x86.exe
pi@raspberrypi ~/JEUX/QUAKE2/demo $ cp Install/Data/baseq2/ ../yquake2/release/ -r
pi@raspberrypi ~/JEUX/QUAKE2/demo $ cd ../yquake2/
pi@raspberrypi ~/JEUX/QUAKE2/yquake2 $
8) Vérification :
pi@raspberrypi ~/JEUX/QUAKE2/yquake2 $ ls -l release/baseq2/
total 181272
-rw-r--r-- 1 pi pi 3248 févr. 22 21:39 config.cfg
-rwxr-xr-x 1 pi pi 1475209 févr. 22 21:31 game.so
drwx------ 2 pi pi 4096 févr. 22 21:38 models
-rw-r--r-- 1 pi pi 27567 févr. 22 21:38 overlay1.tga
-rw-r--r-- 1 pi pi 78772 févr. 22 21:39 overlay2.tga
-rw-r--r-- 1 pi pi 183997730 févr. 22 21:39 pak0.pak
drwx------ 3 pi pi 4096 févr. 22 21:39 pics
drwx------ 15 pi pi 4096 févr. 22 21:40 players
drwx------ 4 pi pi 4096 févr. 22 21:39 save
drwx------ 3 pi pi 4096 févr. 22 21:39 textures
drwx------ 2 pi pi 4096 févr. 22 21:38 video
-rw-r--r-- 1 pi pi 1442 févr. 22 21:00 yq2.cfg
9) Jouer :
pi@raspberrypi ~/JEUX/QUAKE2/yquake2 $ cd release/
pi@raspberrypi ~/JEUX/QUAKE2/yquake2/release $ ./quake2
Le jeu ne ralentit pas en "mode vidéo" de "1024x768". 10) Lien : https://github.com/reefab/yquake2 https://github.com/raspberrypi/firmware/issues/125