Uses generated names from OSType

This commit is contained in:
Robinson 2023-01-02 14:54:34 +01:00
parent 970bc76d36
commit 8c5aa3a367
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -34,17 +34,7 @@ class NativeLoader {
public static
File extractLibrary(final String sourceFileName, final String destinationDirectory, final String destinationName, String version) throws IOException {
try {
String suffix;
if (OS.INSTANCE.isLinux()) {
suffix = ".so";
}
else if (OS.INSTANCE.isWindows()) {
suffix = ".dll";
}
else {
suffix = ".dylib";
}
String suffix = OS.INSTANCE.getType().getLibraryNames()[0];
final String outputFileName;
if (version == null) {
outputFileName = destinationName + suffix;