A federated messenger
A federated messenger.
Core libraries, server services and desktop client are written in C++ and are built via CMake. Building server services and desktop client can be disabled with passing the following CMake options during configuration: -DMELON_BUILD_SERVER=OFF -DMELON_BUILD_DESKTOP_CLIENT=OFF
.
Android application is written in Java and Kotlin and uses core libraries via JNI.
Here we provide brief build instructions, however, if it is not enough for you, full build scripts are available as GitHub Actions configuration files in .github/workflows
.
Install cmake 3.19 or newer and a compiler with C++20 support.
Also, PkgConfig is needed to find some libraries.
Install dependency libraries: boost 1.74.0 or newer, cyrus-sasl 2.1.27 or newer, yaml-cpp 0.6.3 or newer, qt 5.15.1 or newer.
In Arch Linux:
sudo pacman -S boost boost-libs
sudo pacman -S libsasl
sudo pacman -S yaml-cpp
sudo pacman -S qt5-base qt5-tools
Note that boost 1.74.0 (as well as some other libraries) is not available in some linux distributions yet, that’s why you might want to build such dependencies from sources. See corresponding GitHub Actions configuration files containing build scripts and do not forget to add custom prefixes to CMAKE_PREFIX_PATH
later.
Execute the following commands (delete -G Ninja
if ninja generator is not available):
mkdir build && cd build
cmake \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
/path/to/repository/root
cmake --build . --target all
If you want to run tests, execute ctest
command after a successful build.
Building under Windows is done under MSYS2 MinGW64. Build instructions are identical with the Unix ones.
To build core libraries for aarch64 (or any other supported Android architecture) you need to install Android NDK and build all the dependencies (see building under Unix) with a corresponding cross-compiler. If you don’t want to deal with this mess, a Docker image kovdan01/melon-android-env
with prebuilt dependencies for aarch64 is provided. The corresponding Dockerfile can be found in the repository in build-config/android-env/Dockerfile
. Further build commands can be found in build-config/android/Dockerfile
Assuming current directory is src/client-andorid
, run:
gradle wrapper
./gradlew :app:packageDebugUniversalApk
An APK file will appear: app/build/outputs/universal_apk/debug/app-debug-universal.apk
.