Add more information for libsignal-client native dependency

This commit is contained in:
AsamK 2021-02-14 10:40:35 +01:00
parent 0dc33e1892
commit 9eeba88bd0
3 changed files with 20 additions and 1 deletions

View file

@ -7,7 +7,12 @@ signal-cli is primarily intended to be used on servers to notify admins of impor
## Installation
You can [build signal-cli](#building) yourself, or use the [provided binary files](https://github.com/AsamK/signal-cli/releases/latest), which should work on Linux, macOS and Windows. For Arch Linux there is also a [package in AUR](https://aur.archlinux.org/packages/signal-cli/) and there is a [FreeBSD port](https://www.freshports.org/net-im/signal-cli) available as well. You need to have at least JRE 11 installed, to run signal-cli.
You can [build signal-cli](#building) yourself, or use the [provided binary files](https://github.com/AsamK/signal-cli/releases/latest), which should work on Linux, macOS and Windows. For Arch Linux there is also a [package in AUR](https://aur.archlinux.org/packages/signal-cli/) and there is a [FreeBSD port](https://www.freshports.org/net-im/signal-cli) available as well.
System requirements:
- at least Java Runtime Environment (JRE) 11
- native libraries: libzkgroup, libsignal-client
Those are bundled for x86_64 Linux, for other systems/architectures see: [Provide native lib for libsignal](https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal)
### Install system-wide on Linux
See [latest version](https://github.com/AsamK/signal-cli/releases).

View file

@ -49,6 +49,15 @@ public class ServiceConfig {
}
}
public static boolean isSignalClientAvailable() {
try {
org.signal.client.internal.Native.DisplayableFingerprint_Format(new byte[30], new byte[30]);
return true;
} catch (UnsatisfiedLinkError ignored) {
return false;
}
}
public static AccountAttributes.Capabilities getCapabilities() {
return capabilities;
}

View file

@ -121,6 +121,11 @@ public class App {
+ " because the required native library dependency is missing: libzkgroup");
}
if (!ServiceConfig.isSignalClientAvailable()) {
logger.error("Missing required native library dependency: libsignal-client");
return 1;
}
if (command instanceof ProvisioningCommand) {
if (username != null) {
System.err.println("You cannot specify a username (phone number) when linking");