Compiler hedgewars

Bonjour bonjour!
Certains d’entre nous aiment bien jouer de temps en temps. Vous connaissez donc peut-être hedgewars, un clone de worms : hedgewars.org/ .
Ceci dit, il n’est disponible actuellement que en sid ou testing, pas en stable. De plus, la toute dernière version qui contient de très bonnes améliorations est sur le point de sortir.
Alors si vous voulez tester la dernière version, ou bien pouvoir jouer à hedgewars sur une stable, voici une solution :

script :

[code]#!/bin/sh
#script pour installer la toute dernière version d’hedgewars :

SVNCHK=“svn checkout svn://svn.fireforge.net/svnroot/hedgewars/trunk”

if [ $# == 0 ]; then
echo "Usage :"
echo " -i : install"
echo " -r : remove hedgewars"
fi

###install
if [ “$1” == “-i” ]; then
if [ “$(apt-cache policy build-essential |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y build-essential
fi
if [ “$(apt-cache policy cmake |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y cmake
fi
if [ “$(apt-cache policy qt4-qmake |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y qt4-qmake
fi
if [ “$(apt-cache policy libqt4-dev |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y libqt4-dev
fi
if [ “$(apt-cache policy libsdl1.2-dev |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y libsdl1.2-dev
fi
if [ “$(apt-cache policy libsdl-net1.2-dev |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y libsdl-net1.2-dev
fi
if [ “$(apt-cache policy libsdl-mixer1.2-dev |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y libsdl-mixer1.2-dev
fi
if [ “$(apt-cache policy libsdl-image1.2-dev |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y libsdl-image1.2-dev
fi
if [ “$(apt-cache policy libsdl-ttf2.0-dev |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y libsdl-ttf2.0-dev
fi
if [ “$(apt-cache policy fpc |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y fpc
fi
if [ “$(apt-cache policy liblua5.1-0-dev |grep “Installé” |awk ‘{print $2}’ )” = “(aucun)” ]; then
sudo apt-get install -y liblua5.1-0-dev
fi

$SVNCHK ; 
if [ -d trunk ]; then
cd trunk
cmake .
make
sudo make install

fi

fi
###remove

if [ “$1” == “-r” ]; then
sudo rm -r /usr/local/bin/hedgewars
sudo rm -r /usr/local/bin/hwengine
sudo rm -r /usr/local/share/hedgewars
fi

exit
[/code]
Rendez le éxécutable :
chmod +x nomduscript.sh
et lancez-le avec l’option -i pour installer. Tout s’installe par défaut dans /usr/local

Vous pouvez le lancer ensuite en tapant hedgewars en console.

Voila, bon amusement!

n’hésitez pas à rapporter des problèmes, ou à me signaler une dépendance manquante.