BuildingOnLinux.wiki
author almikes@aol.com
Wed, 03 Dec 2014 19:56:37 +0000
changeset 430 fc319f027583
parent 396 d5cb883a1875
child 493 300f6d2615ce
permissions -rw-r--r--
Add summary
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
395
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
     6
This page contains Copy and Paste instructions for a Hedgewars development build.
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
     7
They should work on Debian and the like (Ubuntu, Mint).
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
     8
Required Packages for other distros should have similar names.
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
     9
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    10
Please remember to copy the *entire* apt-get lines!
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    11
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    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.
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    13
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    14
= Prerequisites =
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    15
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    16
{{{
396
d5cb883a1875 g++ wasn't pulled in by the other deps
kyberneticist@gmail.com
parents: 395
diff changeset
    17
sudo apt-get install mercurial cmake g++ 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
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    18
}}}
247
kyberneticist@gmail.com
parents: 241
diff changeset
    19
If you want PNG screenshots, add:
kyberneticist@gmail.com
parents: 241
diff changeset
    20
{{{
kyberneticist@gmail.com
parents: 241
diff changeset
    21
sudo apt-get install libpng12-dev
kyberneticist@gmail.com
parents: 241
diff changeset
    22
}}}
kyberneticist@gmail.com
parents: 241
diff changeset
    23
If you want video recording, add:
kyberneticist@gmail.com
parents: 241
diff changeset
    24
{{{
265
b0f68d7fe64e dev version of glut
kyberneticist@gmail.com
parents: 263
diff changeset
    25
sudo apt-get install libavcodec-dev libavformat-dev freeglut3-dev
247
kyberneticist@gmail.com
parents: 241
diff changeset
    26
}}}
kyberneticist@gmail.com
parents: 241
diff changeset
    27
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
    28
{{{
387
1fc2f41b3f88 new server dependencies
kyberneticist@gmail.com
parents: 386
diff changeset
    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
154
030bb9b4470b Added server build deps
kyberneticist@gmail.com
parents: 131
diff changeset
    30
}}}
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    31
395
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    32
= Fetching the source code =
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    33
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    34
Below you find instructions for downloading the Hedgewars source code from the development repository.
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    35
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    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.
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    37
----
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    38
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    39
{{{
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
    40
mkdir -p ~/games ~/hg/hedgewars/
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    41
cd ~/hg/hedgewars
250
9c711f1b4638 -v and size tweak.
kyberneticist@gmail.com
parents: 249
diff changeset
    42
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
    43
}}}
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    44
389
4d39d7d0d52d Bump size, explain why.
kyberneticist@gmail.com
parents: 388
diff changeset
    45
The initial clone of the repository will take a while, is about 628MiB or so, due to all the multimedia revisions.
333
5b70b52c17c4 Edited wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 332
diff changeset
    46
After that switch to the trunk folder:
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    47
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    48
{{{
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
    49
cd trunk
333
5b70b52c17c4 Edited wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 332
diff changeset
    50
}}}
5b70b52c17c4 Edited wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 332
diff changeset
    51
5b70b52c17c4 Edited wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 332
diff changeset
    52
If you want to build the latest release version (so that you can play with other people online) use this command:
5b70b52c17c4 Edited wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 332
diff changeset
    53
{{{
364
22870076a7bd Edited wiki page BuildingOnLinux through web user interface.
kyberneticist@gmail.com
parents: 338
diff changeset
    54
hg update 0.9.20
333
5b70b52c17c4 Edited wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 332
diff changeset
    55
}}}
388
96142cbf91f4 Edited wiki page BuildingOnLinux through web user interface.
kyberneticist@gmail.com
parents: 387
diff changeset
    56
Note. Do *NOT* run the command above if you want to play the latest development code (currently 0.9.21-dev).
333
5b70b52c17c4 Edited wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 332
diff changeset
    57
395
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    58
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    59
= Building process =
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    60
338
6153b382a125 fix typo
kyberneticist@gmail.com
parents: 337
diff changeset
    61
Now let's configure and build!
395
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    62
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    63
If you want to install Hedgewars *just for your user account* run
333
5b70b52c17c4 Edited wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 332
diff changeset
    64
{{{
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
    65
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
    66
make install
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    67
}}}
395
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    68
If you want to install Hedgewars *system-wide* (not recommended for development builds) then run
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    69
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    70
{{{
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    71
cmake -DCMAKE_BUILD_TYPE="RELEASE" -DNOSERVER=1
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    72
sudo make install
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    73
}}}
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    74
327
16e3a600d6af me VS. wiki syntax
sheepyluva@gmail.com
parents: 326
diff changeset
    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!
16e3a600d6af me VS. wiki syntax
sheepyluva@gmail.com
parents: 326
diff changeset
    76
16e3a600d6af me VS. wiki syntax
sheepyluva@gmail.com
parents: 326
diff changeset
    77
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
    78
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    79
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    80
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
    81
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    82
{{{
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    83
~/games/bin/hedgewars
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    84
}}}
395
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    85
or just {{{hedgewars}}} if you did a system-wide install.
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    86
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    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
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    88
395
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    89
== Build latest development code repository updates ===
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    90
2ea04ea4594d Violated wiki page BuildingOnLinux through web user interface.
sheepyluva@gmail.com
parents: 389
diff changeset
    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
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    92
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    93
{{{
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
    94
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
    95
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
    96
cmake .
129
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    97
make install
751dee35e4f1 Created wiki page with build instruction for ubuntu
vittorio.giovara@gmail.com
parents:
diff changeset
    98
}}}