Skip to content

Commit 8655df4

Browse files
author
Barnabás Domozi
committed
Packaging documentation
1 parent bb49d21 commit 8655df4

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

doc/deps.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,4 @@ relevant during compilation.
297297
| `CODECOMPASS_LINKER` | The path of the linker, if the system's default linker is to be overridden. |
298298
| `WITH_PLUGIN`/`WITHOUT_PLUGIN` | The names of the plugins to be built/skipped at build. Possible values are **cpp**, **cpp_reparse**, **dummy**, **git**, **metrics**, **search**. The `metrics` and `search` plugins are fundamental, they will be compiled even if not included. `WITH_PLUGIN` **cannot** be used together with `WITHOUT_PLUGIN`. Example: `-DWITH_PLUGIN="cpp;git"` This will compile the cpp, git, metrics and search plugins. |
299299
| `WITH_AUTH` | The names of the authentication plugins to be compiled. Possible values are **plain** and **ldap**. `plain` **cannot** be skipped. Example: `-DWITH_AUTH="plain;ldap"`|
300+
| `INSTALL_RUNTIME_DEPENDENCIES` | If enabled, the required shared objects will be copied to `${CMAKE_INSTALL_PREFIX}/lib/deps/`. Optional, disabled by default. |

doc/packaging.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Packaging
2+
Before running or installing any package verify its checksum:
3+
```
4+
sha256sum <package file>
5+
```
6+
7+
# AppImage
8+
9+
## Running CodeCompass AppImage
10+
Set execution permissions:
11+
```
12+
chmod +x ./CodeCompass.AppImage
13+
```
14+
15+
Run AppImage:
16+
```
17+
./CodeCompass.AppImage
18+
```
19+
20+
AppImage Usage:
21+
```
22+
./CodeCompass.AppImage parser <parser arguments>
23+
```
24+
```
25+
./CodeCompass.AppImage webserver <webserver arguments>
26+
```
27+
```
28+
./CodeCompass.AppImage logger <logger arguments>
29+
```
30+
31+
## Building CodeCompass AppImage
32+
33+
### appimagetool
34+
To build AppImages, we need to use `appimagetool`.
35+
1. Download `appimagetool-x86_64.AppImage` from https://github.com/AppImage/AppImageKit/releases
36+
2. Place `appimagetool-x86_64.AppImage` into a directory which is added to the `PATH` environmental variable.
37+
3. Set execution permissions: ```chmod +x ./appimagetool-x86_64.AppImage```
38+
4. Verify `appimagetool-x86_64.AppImage` is runnable from any directory: `which appimagetool-x86_64.AppImage`
39+
40+
### Building AppImage
41+
First, we need to build CodeCompass.
42+
43+
Create a build folder:
44+
```
45+
mkdir build
46+
cd build
47+
```
48+
49+
To enable packaging, run CMake with `-DENABLE_PACKAGING=1`:
50+
```
51+
cmake .. \
52+
-DCMAKE_INSTALL_PREFIX=<CodeCompass_install_dir> \
53+
-DDATABASE=<database_type> \
54+
-DCMAKE_BUILD_TYPE=<build_type> \
55+
-DLLVM_DIR=/usr/lib/llvm-11/cmake \
56+
-DClang_DIR=/usr/lib/cmake/clang-11 \
57+
-DENABLE_PACKAGING=1
58+
```
59+
60+
Build and install CodeCompass:
61+
```
62+
make -j $(nproc)
63+
make install
64+
```
65+
66+
Build AppImage:
67+
```
68+
make appimage
69+
```
70+
71+
The built package will be located in `build/packaging/`.
72+
73+
## Build options
74+
The built package can be customized by using CMake variables.
75+
76+
| Variable | Meaning |
77+
| -------------------- | ---------------------------------------- |
78+
| `PACKAGE_VERSION` | Version of the package for the manifest file. If not specified, version `1.0` will be used. |
79+

0 commit comments

Comments
 (0)