1 #summary Instructions for building the development version of Hedgewars on Linux (debian focus) |
1 #summary Instructions for building the development version of Hedgewars on Linux (debian focus) |
2 #labels Phase-Implementation,Phase-Deploy,Phase-Support |
2 #labels Phase-Implementation,Phase-Deploy,Phase-Support |
3 |
3 |
4 = Introduction = |
4 = Introduction = |
5 |
5 |
6 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! |
6 This page contains Copy and Paste instructions for a Hedgewars development build. |
7 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. |
7 They should work on Debian and the like (Ubuntu, Mint). |
|
8 Required Packages for other distros should have similar names. |
|
9 |
|
10 Please remember to copy the *entire* apt-get lines! |
|
11 |
|
12 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. |
8 |
13 |
9 = Prerequisites = |
14 = Prerequisites = |
10 |
15 |
11 {{{ |
16 {{{ |
12 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 |
17 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 |
22 If you want to try building the server as well (requires at least libghc base 4.3 now) try these too: |
27 If you want to try building the server as well (requires at least libghc base 4.3 now) try these too: |
23 {{{ |
28 {{{ |
24 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 |
29 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 |
25 }}} |
30 }}} |
26 |
31 |
27 = Building process = |
32 = Fetching the source code = |
|
33 |
|
34 Below you find instructions for downloading the Hedgewars source code from the development repository. |
|
35 |
|
36 If you have already downloaded and unpacked the source code version of your choice (e.g. the source tarball from the [http://hedgewars.org/download.html download page]), just {{{cd}}} to your copy of the Hedgewars source in a terminal and go straight to the building section further below. |
|
37 ---- |
28 |
38 |
29 {{{ |
39 {{{ |
30 mkdir -p ~/games ~/hg/hedgewars/ |
40 mkdir -p ~/games ~/hg/hedgewars/ |
31 cd ~/hg/hedgewars |
41 cd ~/hg/hedgewars |
32 hg clone -v https://hedgewars.googlecode.com/hg/ trunk |
42 hg clone -v https://hedgewars.googlecode.com/hg/ trunk |
43 {{{ |
53 {{{ |
44 hg update 0.9.20 |
54 hg update 0.9.20 |
45 }}} |
55 }}} |
46 Note. Do *NOT* run the command above if you want to play the latest development code (currently 0.9.21-dev). |
56 Note. Do *NOT* run the command above if you want to play the latest development code (currently 0.9.21-dev). |
47 |
57 |
|
58 |
|
59 = Building process = |
|
60 |
48 Now let's configure and build! |
61 Now let's configure and build! |
|
62 |
|
63 If you want to install Hedgewars *just for your user account* run |
49 {{{ |
64 {{{ |
50 cmake -DCMAKE_BUILD_TYPE="DEBUG" -DCMAKE_INSTALL_PREFIX="$HOME/games" -DDATA_INSTALL_DIR="$HOME/games" -DNOSERVER=1 |
65 cmake -DCMAKE_BUILD_TYPE="DEBUG" -DCMAKE_INSTALL_PREFIX="$HOME/games" -DDATA_INSTALL_DIR="$HOME/games" -DNOSERVER=1 |
51 make install |
66 make install |
52 }}} |
67 }}} |
|
68 If you want to install Hedgewars *system-wide* (not recommended for development builds) then run |
|
69 |
|
70 {{{ |
|
71 cmake -DCMAKE_BUILD_TYPE="RELEASE" -DNOSERVER=1 |
|
72 sudo make install |
|
73 }}} |
|
74 |
53 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! |
75 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! |
54 |
76 |
55 if you want to build the server as well, change `-DNOSERVER=1` to `-DNOSERVER=0` |
77 if you want to build the server as well, change `-DNOSERVER=1` to `-DNOSERVER=0` |
56 |
78 |
57 |
79 |
58 then wait for the build to complete, then run ... |
80 then wait for the build to complete, then run ... |
59 |
81 |
60 {{{ |
82 {{{ |
61 ~/games/bin/hedgewars |
83 ~/games/bin/hedgewars |
62 }}} |
84 }}} |
|
85 or just {{{hedgewars}}} if you did a system-wide install. |
63 |
86 |
64 You can also create a launcher for it on your desktop or on applications menu if you wish, using the ~/games/bin/hedgewars path |
87 You can also create a launcher for it on your desktop or on applications menu if you wish, using the ~/games/bin/hedgewars path |
65 |
88 |
66 == Build Updates === |
89 == Build latest development code repository updates === |
|
90 |
|
91 If you have built from your repository clone before and now you want to download more recent updates and rebuild Hedgewars with them, then run |
67 |
92 |
68 {{{ |
93 {{{ |
69 cd ~/hg/hedgewars/trunk |
94 cd ~/hg/hedgewars/trunk |
70 hg pull -u |
95 hg pull -u |
71 cmake . |
96 cmake . |