BuildingOnLinux.wiki
author kyberneticist@gmail.com
Sun, 07 Jul 2013 23:24:11 +0000
changeset 332 36d99c763ca7
parent 327 16e3a600d6af
child 333 5b70b52c17c4
permissions -rw-r--r--
Added note about compiling 0.9.19
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
249
f47761d3bbe5 Edited wiki page BuildingOnLinux through web user interface. Sobbing a bit
sheepyluva@gmail.com
parents: 248
diff changeset
     1
#summary Instructions for building the development version of Hedgewars on Linux (debian focus)
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
     2
#labels Phase-Implementation,Phase-Deploy,Phase-Support
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
     3
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
     4
= Introduction =
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
     5
249
f47761d3bbe5 Edited wiki page BuildingOnLinux through web user interface. Sobbing a bit
sheepyluva@gmail.com
parents: 248
diff changeset
     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!
332
36d99c763ca7 Added note about compiling 0.9.19
kyberneticist@gmail.com
parents: 327
diff changeset
     7
Important.  This builds the latest development sources.  If you want to build the latest stable, run: hg up 0.9.19 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.
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
     8
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
     9
= Prerequisites =
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    10
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    11
{{{
131
b21fdbe0d380 Edited wiki page BuildingOnLinux through web user interface.
kyberneticist
parents: 130
diff changeset
    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
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    13
}}}
247
kyberneticist@gmail.com
parents: 241
diff changeset
    14
If you want PNG screenshots, add:
kyberneticist@gmail.com
parents: 241
diff changeset
    15
{{{
kyberneticist@gmail.com
parents: 241
diff changeset
    16
sudo apt-get install libpng12-dev
kyberneticist@gmail.com
parents: 241
diff changeset
    17
}}}
kyberneticist@gmail.com
parents: 241
diff changeset
    18
If you want video recording, add:
kyberneticist@gmail.com
parents: 241
diff changeset
    19
{{{
265
b0f68d7fe64e dev version of glut
kyberneticist@gmail.com
parents: 263
diff changeset
    20
sudo apt-get install libavcodec-dev libavformat-dev freeglut3-dev
247
kyberneticist@gmail.com
parents: 241
diff changeset
    21
}}}
kyberneticist@gmail.com
parents: 241
diff changeset
    22
If you want to try building the server as well (requires at least libghc base 4.3 now) try these too:
154
030bb9b4470b Added server build deps
kyberneticist@gmail.com
parents: 131
diff changeset
    23
{{{
315
a6b9ac3e56ec Added dependency on random
kyberneticist@gmail.com
parents: 265
diff changeset
    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
154
030bb9b4470b Added server build deps
kyberneticist@gmail.com
parents: 131
diff changeset
    25
}}}
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    26
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    27
= Building process =
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    28
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    29
{{{
263
afcb38bfd761 Revert use of build dir. Nice idea, but breaks pas2c and confused people. Esp people who had done this before. For most people, a purge is adequate if they need to clean up. Heck, that's what unc0rr and I apparently do, or we would have noticed the pas2c thing earlier
kyberneticist@gmail.com
parents: 253
diff changeset
    30
mkdir -p ~/games ~/hg/hedgewars/
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    31
cd ~/hg/hedgewars
250
9c711f1b4638 -v and size tweak.
kyberneticist@gmail.com
parents: 249
diff changeset
    32
hg clone -v https://hedgewars.googlecode.com/hg/ trunk
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    33
}}}
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    34
250
9c711f1b4638 -v and size tweak.
kyberneticist@gmail.com
parents: 249
diff changeset
    35
The initial clone of the repository will take a while, is about 575MiB or so...
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    36
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    37
{{{
263
afcb38bfd761 Revert use of build dir. Nice idea, but breaks pas2c and confused people. Esp people who had done this before. For most people, a purge is adequate if they need to clean up. Heck, that's what unc0rr and I apparently do, or we would have noticed the pas2c thing earlier
kyberneticist@gmail.com
parents: 253
diff changeset
    38
cd trunk
afcb38bfd761 Revert use of build dir. Nice idea, but breaks pas2c and confused people. Esp people who had done this before. For most people, a purge is adequate if they need to clean up. Heck, that's what unc0rr and I apparently do, or we would have noticed the pas2c thing earlier
kyberneticist@gmail.com
parents: 253
diff changeset
    39
cmake -DCMAKE_BUILD_TYPE="DEBUG" -DCMAKE_INSTALL_PREFIX="$HOME/games" -DDATA_INSTALL_DIR="$HOME/games" -DNOSERVER=1
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    40
make install
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    41
}}}
327
16e3a600d6af me VS. wiki syntax
sheepyluva@gmail.com
parents: 326
diff changeset
    42
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!
16e3a600d6af me VS. wiki syntax
sheepyluva@gmail.com
parents: 326
diff changeset
    43
16e3a600d6af me VS. wiki syntax
sheepyluva@gmail.com
parents: 326
diff changeset
    44
if you want to build the server as well, change `-DNOSERVER=1` to `-DNOSERVER=0`
16e3a600d6af me VS. wiki syntax
sheepyluva@gmail.com
parents: 326
diff changeset
    45
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    46
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    47
then wait for the build to complete, then run ...
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    48
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    49
{{{
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    50
~/games/bin/hedgewars
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    51
}}}
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    52
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    53
You can also create a launcher for it on your desktop or on applications menu if you wish, using the ~/games/bin/hedgewars path
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    54
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    55
== Build Updates ===
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    56
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    57
{{{
263
afcb38bfd761 Revert use of build dir. Nice idea, but breaks pas2c and confused people. Esp people who had done this before. For most people, a purge is adequate if they need to clean up. Heck, that's what unc0rr and I apparently do, or we would have noticed the pas2c thing earlier
kyberneticist@gmail.com
parents: 253
diff changeset
    58
cd ~/hg/hedgewars/trunk
afcb38bfd761 Revert use of build dir. Nice idea, but breaks pas2c and confused people. Esp people who had done this before. For most people, a purge is adequate if they need to clean up. Heck, that's what unc0rr and I apparently do, or we would have noticed the pas2c thing earlier
kyberneticist@gmail.com
parents: 253
diff changeset
    59
hg pull -u
afcb38bfd761 Revert use of build dir. Nice idea, but breaks pas2c and confused people. Esp people who had done this before. For most people, a purge is adequate if they need to clean up. Heck, that's what unc0rr and I apparently do, or we would have noticed the pas2c thing earlier
kyberneticist@gmail.com
parents: 253
diff changeset
    60
cmake .
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    61
make install
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    62
}}}