From e7a700c2cba5fcdf21c055a16170ae6f888d2bf6 Mon Sep 17 00:00:00 2001 From: Sebastian Scheibner Date: Fri, 26 Dec 2025 16:08:28 +0100 Subject: [PATCH] Updated Provide native lib for libsignal (markdown) --- Provide-native-lib-for-libsignal.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Provide-native-lib-for-libsignal.md b/Provide-native-lib-for-libsignal.md index d666935..a7b8e41 100644 --- a/Provide-native-lib-for-libsignal.md +++ b/Provide-native-lib-for-libsignal.md @@ -35,7 +35,6 @@ Builds for some additional platforms are available in - JDK - gradle - rust (Guide [here](https://www.rust-lang.org/tools/install)) -- protocol buffer compiler ("apt install protobuf-compiler") #### Download libsignal-client source @@ -67,6 +66,30 @@ Then the native lib can be found in the folder: `client/src/main/resources/libsi ### Using the new libsignal-client lib file +#### Option 1: Compile signal-cli with a custom libsignal-client build + +For this option, the java part of libsignal-client must be built as well. Run the following command in the libsignal-client `java` folder. + +```sh +# Run in libsignal-client/java folder +$ ./gradlew --no-daemon :client:assemble -PskipAndroid=true +``` + +Then build signal-cli with the `libsignal_client_path` option to use that jar file. + +```sh +# Run in signal-cli folder +$ ./gradlew -Plibsignal_client_path="/PATH/TO/libsignal-client/java/client/build/libs/libsignal-client-0.15.0.jar" build +``` + +Or this command to build the signal-cli graalvm native version. +```sh +# Run in signal-cli folder +$ ./gradlew -Plibsignal_client_path="/PATH/TO/libsignal-client/java/client/build/libs/libsignal-client-0.15.0.jar" nativeCompile +``` + +#### Option 2: Replace just native library file (.so, .dll, .dylib) + Once you have your library file, it can be bundled in the root of the `libsignal-client-*.jar` file. First, the currently bundled file needs to be removed: