aboutsummaryrefslogtreecommitdiff
path: root/docs/manual/Building.md
blob: 5eee024b15d4c501cc9f55ff5aa71b9706dbb543 (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
# Building

## Dependencies

### Libraries
- [Qt](https://www.qt.io/)
  - an up-to-date version, even thought the codebase should largely work with Qt 5.7 or later
  - WebEngine
- [libconfig](https://hyperrealm.github.io/libconfig/)

### Tools
* A working compiler
  - gcc or clang on Linux
  - msvc on Windows due to QtWebEngine
* cmake
  - minimal version 3.1.0, but please use something up-to-date

## Compiling
smolbote follows the generic cmake build template.
```
# generate makefile
cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../smolbote.git
# build
make -j 4
# install
make DESTDIR=/install/root/goes/here install
```

### Using libc++
You can use libc++ over stdlibc++ by setting UseLibCpp to On. Requires clang.
> -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DUseLibCpp=On

## Packaging

### Source Tarball
```
# Get source code from the repository
git archive --format=tar HEAD > head.tar
# Compress with lzip
lzip -9 --force --output=head.tar.lz head.tar
# Generate checksum
sha512sum --binary head.tar.lz > head.tar.lz.sha512
```

### makepkg
A PKGBUILD is provided in linux/makepkg/PKGBUILD. Please read before using.

## Troubleshooting

### Cannot link libconfig
You don't have pkg-config installed.