Uses generated names from OSType
This commit is contained in:
parent
970bc76d36
commit
8c5aa3a367
@ -34,17 +34,7 @@ class NativeLoader {
|
|||||||
public static
|
public static
|
||||||
File extractLibrary(final String sourceFileName, final String destinationDirectory, final String destinationName, String version) throws IOException {
|
File extractLibrary(final String sourceFileName, final String destinationDirectory, final String destinationName, String version) throws IOException {
|
||||||
try {
|
try {
|
||||||
String suffix;
|
String suffix = OS.INSTANCE.getType().getLibraryNames()[0];
|
||||||
if (OS.INSTANCE.isLinux()) {
|
|
||||||
suffix = ".so";
|
|
||||||
}
|
|
||||||
else if (OS.INSTANCE.isWindows()) {
|
|
||||||
suffix = ".dll";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
suffix = ".dylib";
|
|
||||||
}
|
|
||||||
|
|
||||||
final String outputFileName;
|
final String outputFileName;
|
||||||
if (version == null) {
|
if (version == null) {
|
||||||
outputFileName = destinationName + suffix;
|
outputFileName = destinationName + suffix;
|
||||||
|
Loading…
Reference in New Issue
Block a user