diff --git a/doc/deps.md b/doc/deps.md index 221e795fb..796b9d29f 100644 --- a/doc/deps.md +++ b/doc/deps.md @@ -297,3 +297,4 @@ relevant during compilation. | `CODECOMPASS_LINKER` | The path of the linker, if the system's default linker is to be overridden. | | `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. | | `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"`| +| `INSTALL_RUNTIME_DEPENDENCIES` | If enabled, the required shared objects will be copied to `${CMAKE_INSTALL_PREFIX}/lib/deps/`. Optional, disabled by default. | diff --git a/doc/packaging.md b/doc/packaging.md new file mode 100644 index 000000000..01fa8afb9 --- /dev/null +++ b/doc/packaging.md @@ -0,0 +1,79 @@ +# Packaging +Before running or installing any package verify its checksum: +``` +sha256sum +``` + +# AppImage + +## Running CodeCompass AppImage +Set execution permissions: +``` +chmod +x ./CodeCompass.AppImage +``` + +Run AppImage: +``` +./CodeCompass.AppImage +``` + +AppImage Usage: +``` +./CodeCompass.AppImage parser +``` +``` +./CodeCompass.AppImage webserver +``` +``` +./CodeCompass.AppImage logger +``` + +## Building CodeCompass AppImage + +### appimagetool +To build AppImages, we need to use `appimagetool`. +1. Download `appimagetool-x86_64.AppImage` from https://github.com/AppImage/AppImageKit/releases +2. Place `appimagetool-x86_64.AppImage` into a directory which is added to the `PATH` environmental variable. +3. Set execution permissions: ```chmod +x ./appimagetool-x86_64.AppImage``` +4. Verify `appimagetool-x86_64.AppImage` is runnable from any directory: `which appimagetool-x86_64.AppImage` + +### Building AppImage +First, we need to build CodeCompass. + +Create a build folder: +``` +mkdir build +cd build +``` + +To enable packaging, run CMake with `-DENABLE_PACKAGING=1`: +``` +cmake .. \ + -DCMAKE_INSTALL_PREFIX= \ + -DDATABASE= \ + -DCMAKE_BUILD_TYPE= \ + -DLLVM_DIR=/usr/lib/llvm-11/cmake \ + -DClang_DIR=/usr/lib/cmake/clang-11 \ + -DENABLE_PACKAGING=1 +``` + +Build and install CodeCompass: +``` +make -j $(nproc) +make install +``` + +Build AppImage: +``` +make appimage +``` + +The built package will be located in `build/packaging/`. + +## Build options +The built package can be customized by using CMake variables. + +| Variable | Meaning | +| -------------------- | ---------------------------------------- | +| `PACKAGE_VERSION` | Version of the package for the manifest file. If not specified, version `1.0` will be used. | +