INSTALL.md
author Wuzzy <Wuzzy2@mail.ru>
Thu, 27 Sep 2018 00:26:58 +0200
changeset 13810 c0a7ef988151
parent 13713 20768d813518
child 13881 99b265e0d1d0
permissions -rw-r--r--
Fix teleport cursor briefly re-appearing after placing hog in hog placement phase + inf attack mode
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     1
Building and installing Hedgewars
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     2
=================================
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     3
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     4
This file explains to you how to build/compile Hedgewars and how to install it.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     5
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     6
See also: <https://hedgewars.org/kb/BuildingHedgewars>
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     7
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     8
Dependencies
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
     9
------------
13713
20768d813518 Write down system requirements
Wuzzy <Wuzzy2@mail.ru>
parents: 13502
diff changeset
    10
### Hardware dependencies
20768d813518 Write down system requirements
Wuzzy <Wuzzy2@mail.ru>
parents: 13502
diff changeset
    11
See README.md.
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    12
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    13
### Core dependencies
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    14
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    15
To compile and install Hedgewars, you need at least:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    16
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    17
- A C++ compiler (e.g. GCC)
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    18
- CMake >= 2.6.0
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    19
- A make program (e.g. GNU Make)
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    20
- Free Pascal Compiler (FPC) >= 2.2.4
13181
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    21
- Qt 5
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    22
- SDL >= 2.0
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    23
- SDL\_net >= 2.0
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    24
- SDL\_mixer >= 2.0
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    25
- SDL\_image >= 2.0
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    26
- SDL\_ttf >= 2.0
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    27
13181
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    28
### Recommended optional dependencies
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    29
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    30
These are not strictly required to build Hedgewars, but it's
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    31
usually better to have them installed. Hedgewars has fallback mechanisms
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    32
in if these are not found on your system.
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    33
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    34
- qtstyleplugins (for Qt 5)
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    35
- PhysFS >= 2.0.0
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    36
- Lua = 5.1.0
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    37
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    38
### Optional dependencies
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    39
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    40
For some additional features, you can optionally install these dependencies:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    41
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    42
- For PNG screenshots:
13181
2148b493836e Update INSTALL.md about new Qt5 dependency
Wuzzy <Wuzzy2@mail.ru>
parents: 12817
diff changeset
    43
    - libpng >= 1.2
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    44
- For video recording:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    45
    - FFmpeg or Libav
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    46
- For the Hedgewars Server:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    47
    - GHC >= 6.10
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    48
    - Various Haskell packages (see below)
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    49
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    50
PhysFS will be internally built if `-DPHYSFS_SYSTEM=OFF` is passed to `cmake`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    51
(also allows to set `PHYSFS_LIBRARY` and `PHYSFS_INCLUDE_DIR` if needed).
8120
67c3201365b1 INSTALL and README updates
koda
parents: 7954
diff changeset
    52
8125
814cc5cf0b66 koda, koda... could have checked your claims
unc0rr
parents: 8120
diff changeset
    53
Lua will be automatically built if not found.
8120
67c3201365b1 INSTALL and README updates
koda
parents: 7954
diff changeset
    54
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    55
### Hedgewars Server dependencies
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    56
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    57
The Hedgewars Server is an **optional** separate application.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    58
It provides the online lobby and allows players to create rooms.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    59
You will also be able to launch the server from the frontend
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    60
(network play → local network → start server).
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    61
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    62
**Most players do not need this!**
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    63
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    64
To compile it, you need:
1006
8a0ed701eafb Some fixes
unc0rr
parents: 680
diff changeset
    65
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    66
- Glasgow Haskell Compiler (GHC) >= 6.10
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    67
- These Haskell packages:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    68
    - `containers`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    69
    - `vector`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    70
    - `bytestring`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    71
    - `network` >= 2.3
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    72
    - `random`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    73
    - `time`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    74
    - `mtl` >= 2
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    75
    - `sandi`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    76
    - `hslogger`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    77
    - `process`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    78
    - `deepseq`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    79
    - `utf8-string`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    80
    - `SHA`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    81
    - `entropy`
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    82
    - `zlib` >= 0.5.3 and < 0.6
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    83
    - `regex-tdfa`
13502
99a99dbfbf6d Update server dependencies in INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 13181
diff changeset
    84
    - `binary` >= 0.8.5.1
99a99dbfbf6d Update server dependencies in INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 13181
diff changeset
    85
    - `yaml` >= 0.8.30
99a99dbfbf6d Update server dependencies in INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 13181
diff changeset
    86
    - `aeson`
99a99dbfbf6d Update server dependencies in INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 13181
diff changeset
    87
    - `text` >= 1.2
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    88
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    89
Building
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    90
--------
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    91
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    92
### Summary
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    93
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    94
To build and install Hedgewars, obtain all dependencies, then run:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    95
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    96
   $ cmake .
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    97
   $ make
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    98
   # make install
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
    99
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   100
### Step 1: Configure
470
86ca84d5da74 Update instructions
unc0rr
parents: 457
diff changeset
   101
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   102
For a default install with all dependencis, use this command:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   103
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   104
    $ cmake .
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   105
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   106
To build with a custom install directory, instead run:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   107
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   108
    $ cmake -DCMAKE_INSTALL_PREFIX="<install_prefix>" .
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   109
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   110
(Replace `<install_prefix>` with the directoy in which you
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   111
want Hedgewars to be installed.)
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   112
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   113
Add the `-DNOSERVER=ON` switch if you do not want to build
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   114
the server.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   115
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   116
#### CMake options
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   117
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   118
For more detailed build settings, change some CMake options.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   119
Run `ccmake` for an interactive way to edit them.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   120
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   121
Important CMake options:
1415
6fbfee0e113a Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents: 1006
diff changeset
   122
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   123
- `CMAKE_INSTALL_PREFIX`: Installation directory
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   124
- `NOSERVER`: Set to `ON` to *not* build the server
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   125
- `NOVIDEOREC`: Set to `ON` to *not* build the video recorder
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   126
- `SYSTEM_PHYSFS`: Set to `OFF` to use Hedgewars-bundled PhysFS
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   127
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   128
### Step 2: Make
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   129
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   130
Run:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   131
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   132
    $ make
470
86ca84d5da74 Update instructions
unc0rr
parents: 457
diff changeset
   133
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   134
This creates the following files:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   135
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   136
- `bin/hedgewars`: Hedgewars
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   137
- `bin/hwengine`: Game engine, can be used to play demos and saved games
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   138
- `bin/hedgewars-server`: Hedgewars Server (optional)
273
3cc5b4dd6770 Add installation manual
unc0rr
parents:
diff changeset
   139
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   140
### Step 3: Installation
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   141
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   142
To install Hedgewars to the install directory run:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   143
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   144
    # make install
2220
110266ba2ef7 -new openal api for setting sound position
koda
parents: 2141
diff changeset
   145
457
35cc5a6c0e45 Don't let text file to confuse a terminal
unc0rr
parents: 456
diff changeset
   146
That's all! Enjoy!
8120
67c3201365b1 INSTALL and README updates
koda
parents: 7954
diff changeset
   147
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   148
Troubleshooting
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   149
---------------
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   150
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   151
### Qt is installed but it can't be found
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   152
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   153
If this happens, set the following CMake option:
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   154
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   155
    QT_QMAKE_EXECUTABLE="<path_to_qmake>"
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   156
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   157
(Replace `<path_to_qmake>` with the path to the `qmake` application.)
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   158
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   159
If this didn't work, make sure you have the correct Qt version
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   160
(see above).
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   161
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   162
### Hedgewars compiles successfully, but games instantly crash the map preview fails
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   163
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   164
This is likely to be a problem with PhysFS. Try to build Hedgewars
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   165
with the Hedgewars-bundled PhysFS by setting the CMake option
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   166
`SYSTEM_PHYSFS=OFF`, then try to run `make` again.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   167
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   168
If the _bundled_ PhysFS fails, too, this is likely to be a bug in
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   169
Hedgewars, please report at <https://issues.hedgewars.org/>.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   170
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   171
### Broken/missing Haskell dependencies
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   172
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   173
First, try to obtain the missing Haskell packages and make sure GHC
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   174
is up-to date, then try again. Read the error messages carefully
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   175
to figure out missing package names.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   176
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   177
If everything fails and you don't need the server, set the CMake
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   178
option `NOSERVER=ON` so the server isn't built at all.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   179
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   180
### Error messages related to libavcodec / libavformat
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   181
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   182
Update Libav or FFmpeg (whatever is present on your system) to
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   183
the latest version or install one of them if you haven't already.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   184
Then try to build again.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   185
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   186
If this still doesn't work and you give up, set the CMake option
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   187
`NOVIDEOREC=ON`, but then the video recording functionality will
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   188
not be available.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   189
12817
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   190
### Error messages related to Lua, “undefined reference to `lua_tonumber'”, and so on
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   191
If you get error messages like these:
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   192
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   193
* /home/username/hw/hedgewars//uScript.pas:226: undefined reference to `lua_tonumber'
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   194
* /home/username/hw/hedgewars/CMakeFiles/hwengine.dir/uScript.o: In function `LUATOVISUALGEARTYPEORD':
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   195
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   196
There might be something wrong with your Lua installation. Try to install Lua 5.1.
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   197
If this doesn't work, or you don't want to install Lua 5.1, try to build Hedgewars
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   198
with the bundled Lua version.
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   199
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   200
To build with the bundled Lua version, adding the CMake option `SYSTEM_LUA=OFF`, then
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   201
repeat the building process.
b35b6978baa4 Add Lua problems to the troubleshooting section of INSTALL.md
Wuzzy <Wuzzy2@mail.ru>
parents: 12751
diff changeset
   202
12751
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   203
### Cleaning up
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   204
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   205
In case you want to start over and start with a clean build,
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   206
run `make clean`, then go back to step 2.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   207
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   208
If things got seriously out of hand, you may want to reset
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   209
*everything* (even your configuration). If you use the
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   210
Mercural repository, you can run `hg purge --all`. Proceed with
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   211
step 1.
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   212
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   213
### Still can't build Hedgewars?
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   214
838515c4e6c5 Rewrite INSTALL file: Markdown format, add troubleshooting section, more detailed build instructions, etc.
Wuzzy <Wuzzy2@mail.ru>
parents: 11862
diff changeset
   215
Visit us in the forums or IRC (see `README.md`) and ask for help.