aboutsummaryrefslogtreecommitdiff
path: root/BUILDING.md
blob: 64bcd1e8aedf3581841dcd4837a1f779ea104bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
## Before you start

### [Qt](https://www.qt.io/)
Minimal required version is 5.10.

An up-to-date version of QtWebEngine is highly recommended due to fixes to Blink
that do _not_ get backported. QtWebEngine can be built with older versions of
Qt, so consider building it if you use the LTS Qt release.

### [boost](http://www.boost.org/)
Required component: program_options, string algorithms

### cmake and a build tool
Minimal version 3.1.0, only 3.10+ is tested; your build tool of choice (make,
ninja, etc.)

### A preferably working compiler with C++17 support
 - gcc 7 or later
 - clang 4 or later
 - only MSVC is supported on Windows due to QtWebEngine

## Compiling
smolbote follows the generic cmake build template:

~~~ sh
# 1. Clone the repository
hg clone https://neueland.iserlohn-fortress.net/smolbote.hg

# (optional) you can also get checksums for some commits
# get node for the current commit
hg log -r tip --template='{node}'
# get sha512 checksums and signature
curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node
curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node.sig
# verify signature and files
gpg --verify $node.sig
sha512sum --check --quiet $node

# 2. Generate Makefile
mkdir path/to/build && cd path/to/build
cmake -DCMAKE_BUILD_TYPE=Release path/to/smolbote.hg

# 3. Build
make -j 4

# 4. Install
make install
~~~

### -DCMAKE_BUILD_TYPE
Controls what flags and optimizations are set. Possible values: Debug, Release,
RelWithDebInfo, MinSizeRel

### -DCMAKE_INSTALL_PREFIX
Sets the install location. Binaries will be written to bin/, and plugins to
lib/smolbote/.

### Using libc++
You can use libc++ over stdlibc++ by setting UseLibCpp to On. Requires clang.

~~~ sh
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DUseLibCpp=On
~~~