BuildingOnLinux.wiki
changeset 493 300f6d2615ce
parent 396 d5cb883a1875
child 494 37952cd70b0d
equal deleted inserted replaced
492:25011ebab5ec 493:300f6d2615ce
     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 GNU/Linux (Debian focus)
     2 #labels Phase-Implementation,Phase-Deploy,Phase-Support
     2 #labels Phase-Implementation,Phase-Deploy,Phase-Support
     3 
     3 
     4 = Introduction =
     4 = Building on GNU/Linux =
       
     5 == Introduction ==
     5 
     6 
     6 This page contains Copy and Paste instructions for a Hedgewars development build.
     7 This page contains copy-and-paste instructions for a Hedgewars development build.
     7 They should work on Debian and the like (Ubuntu, Mint).
     8 They should work on Debian and derivates (Ubuntu, Mint).
     8 Required Packages for other distros should have similar names.
     9 Required packages for other distros should have similar names.
     9 
    10 
    10 Please remember to copy the *entire* apt-get lines!
    11 Please remember to copy the _entire_ `apt-get` lines!
    11 
    12 
    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.
    13 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.
    13 
    14 
    14 = Prerequisites =
    15 == Prerequisites ==
    15 
    16 
    16 {{{
    17 {{{
    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
    18 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
    18 }}}
    19 }}}
    19 If you want PNG screenshots, add:
    20 If you want PNG screenshots, add:
    27 If you want to try building the server as well (requires at least libghc base 4.3 now) try these too:
    28 If you want to try building the server as well (requires at least libghc base 4.3 now) try these too:
    28 {{{
    29 {{{
    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
    30 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
    30 }}}
    31 }}}
    31 
    32 
    32 = Fetching the source code =
    33 == Fetching the source code ==
    33 
    34 
    34 Below you find instructions for downloading the Hedgewars source code from the development repository.
    35 Below you find instructions for downloading the Hedgewars source code from the development repository.
    35 
    36 
    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 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 ----
    38 ----
    40 mkdir -p ~/games ~/hg/hedgewars/
    41 mkdir -p ~/games ~/hg/hedgewars/
    41 cd ~/hg/hedgewars
    42 cd ~/hg/hedgewars
    42 hg clone -v https://hedgewars.googlecode.com/hg/ trunk
    43 hg clone -v https://hedgewars.googlecode.com/hg/ trunk
    43 }}}
    44 }}}
    44 
    45 
    45 The initial clone of the repository will take a while, is about 628MiB or so, due to all the multimedia revisions.
    46 The initial clone of the repository will take a while, is about 628 MiB or so, due to all the multimedia revisions.
    46 After that switch to the trunk folder:
    47 After that switch to the trunk folder:
    47 
    48 
    48 {{{
    49 {{{
    49 cd trunk
    50 cd trunk
    50 }}}
    51 }}}
    51 
    52 
    52 If you want to build the latest release version (so that you can play with other people online) use this command:
    53 If you want to build the latest release version (so that you can play with other people online) use this command:
    53 {{{
    54 {{{
    54 hg update 0.9.20
    55 hg update 0.9.20
    55 }}}
    56 }}}
    56 Note. Do *NOT* run the command above if you want to play the latest development code (currently 0.9.21-dev).
    57 Note. Do *not* run the command above if you want to play the latest development code (currently 0.9.21-dev).
    57 
    58 
    58 
    59 
    59 = Building process =
    60 == Building process ==
    60 
    61 
    61 Now let's configure and build!
    62 Now let’s configure and build!
    62 
    63 
    63 If you want to install Hedgewars *just for your user account* run
    64 If you want to install Hedgewars *just for your user account* run
    64 {{{
    65 {{{
    65 cmake -DCMAKE_BUILD_TYPE="DEBUG" -DCMAKE_INSTALL_PREFIX="$HOME/games" -DDATA_INSTALL_DIR="$HOME/games" -DNOSERVER=1
    66 cmake -DCMAKE_BUILD_TYPE="DEBUG" -DCMAKE_INSTALL_PREFIX="$HOME/games" -DDATA_INSTALL_DIR="$HOME/games" -DNOSERVER=1
    66 make install
    67 make install
    70 {{{
    71 {{{
    71 cmake -DCMAKE_BUILD_TYPE="RELEASE" -DNOSERVER=1
    72 cmake -DCMAKE_BUILD_TYPE="RELEASE" -DNOSERVER=1
    72 sudo make install
    73 sudo make install
    73 }}}
    74 }}}
    74 
    75 
    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!
    76 *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!
    76 
    77 
    77 if you want to build the server as well, change `-DNOSERVER=1` to `-DNOSERVER=0`
    78 If you want to build the server as well, change `-DNOSERVER=1` to `-DNOSERVER=0`
    78 
    79 
    79 
    80 
    80 then wait for the build to complete, then run ...
    81 then wait for the build to complete, then run …
    81 
    82 
    82 {{{
    83 {{{
    83 ~/games/bin/hedgewars
    84 ~/games/bin/hedgewars
    84 }}}
    85 }}}
    85 or just {{{hedgewars}}} if you did a system-wide install.
    86 or just {{{hedgewars}}} if you did a system-wide install.
    86 
    87 
    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
    88 You can also create a launcher for it on your desktop or on applications menu if you wish, using the `$HOME/games/bin/hedgewars` path
    88 
    89 
    89 == Build latest development code repository updates ===
    90 == Build latest development code repository updates ==
    90 
    91 
    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
    92 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
    92 
    93 
    93 {{{
    94 {{{
    94 cd ~/hg/hedgewars/trunk
    95 cd ~/hg/hedgewars/trunk