Copy and Paste instructions for a Hedgewars development build. Should work on Debian and the like (Ubuntu, Mint). Packages for other distros should have similar names. Remember to copy the entire apt-get lines! Important. This builds the latest development sources. If you want to build the latest stable, run: hg up 0.9.20 before running cmake. Also, see http://hedgewars.org/download.html if you are just looking to play latest stable - there's a good chance it exists for your distro.
sudo apt-get install mercurial cmake qt4-qmake libqt4-dev libsdl1.2-dev libsdl-net1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev liblua5.1-dev fpc libphysfs-dev fonts-dejavu-core ttf-wqy-zenhei
If you want PNG screenshots, add:
sudo apt-get install libpng12-dev
If you want video recording, add:
sudo apt-get install libavcodec-dev libavformat-dev freeglut3-dev
If you want to try building the server as well (requires at least libghc base 4.3 now) try these too:
sudo apt-get install ghc libghc-binary-dev libghc-bytestring-show-dev libghc-dataenc-dev libghc-deepseq-dev libghc-hslogger-dev libghc-mtl-dev libghc-network-dev libghc-parsec3-dev libghc-utf8-string-dev libghc-vector-dev libghc-random-dev libghc-zlib-dev libghc-sha-dev libghc-entropy-dev
mkdir -p ~/games ~/hg/hedgewars/ cd ~/hg/hedgewars hg clone -v https://hedgewars.googlecode.com/hg/ trunk
The initial clone of the repository will take a while, is about 628MiB or so, due to all the multimedia revisions. After that switch to the trunk folder:
If you want to build the latest release version (so that you can play with other people online) use this command:
hg update 0.9.20
Note. Do NOT run the command above if you want to play the latest development code (currently 0.9.21-dev).
Now let's configure and build!
cmake -DCMAKE_BUILD_TYPE="DEBUG" -DCMAKE_INSTALL_PREFIX="$HOME/games" -DDATA_INSTALL_DIR="$HOME/games" -DNOSERVER=1 make install
IMPORTANT: If you decided against png-screenshots or video-recording support, please append -DNOPNG=1 and/or -DNOVIDEOREC=1 to the cmake command line respectively!
if you want to build the server as well, change -DNOSERVER=1 to -DNOSERVER=0
then wait for the build to complete, then run ...
You can also create a launcher for it on your desktop or on applications menu if you wish, using the ~/games/bin/hedgewars path
cd ~/hg/hedgewars/trunk hg pull -u cmake . make install