Skip to content

Commit a8c3456

Browse files
committed
rename the bundled natives and use x64|aarch64 directory naming convention
1 parent f84ed70 commit a8c3456

6 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/io/github/doblon8/openpnp/capture/utils/NativeLoader.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public static void loadOpenpnpCapture() {
2424

2525
String basePath = "/native/" + os + "/" + arch + "/";
2626
String library = switch (os) {
27-
case "linux" -> "libopenpnp-capture-ubuntu-20.04-" + arch + ".so";
28-
case "osx" -> "libopenpnp-capture-macos-latest-" + arch + ".dylib";
29-
case "windows" -> "libopenpnp-capture-windows-latest-" + arch + ".dll";
27+
case "linux" -> "libopenpnp-capture.so";
28+
case "osx" -> "libopenpnp-capture.dylib";
29+
case "windows" -> "openpnp-capture.dll";
3030
default -> throw new UnsupportedOperationException("Unknown OS: " + os);
3131
};
3232

@@ -114,9 +114,9 @@ private static String getOsName() {
114114
private static String getArchName() {
115115
String arch = System.getProperty("os.arch").toLowerCase();
116116
if (arch.contains("aarch64") || arch.contains("arm64")) {
117-
return "arm64";
117+
return "aarch64";
118118
} else if (arch.contains("amd64") || arch.contains("x86_64")) {
119-
return "x86_64";
119+
return "x64";
120120
} else {
121121
throw new UnsupportedOperationException("Unsupported architecture: " + arch);
122122
}

src/main/resources/native/linux/arm64/libopenpnp-capture-ubuntu-20.04-arm64.so renamed to src/main/resources/native/linux/aarch64/libopenpnp-capture.so

File renamed without changes.

src/main/resources/native/linux/x86_64/libopenpnp-capture-ubuntu-20.04-x86_64.so renamed to src/main/resources/native/linux/x64/libopenpnp-capture.so

File renamed without changes.

src/main/resources/native/osx/arm64/libopenpnp-capture-macos-latest-arm64.dylib renamed to src/main/resources/native/osx/aarch64/libopenpnp-capture.dylib

File renamed without changes.

src/main/resources/native/osx/x86_64/libopenpnp-capture-macos-latest-x86_64.dylib renamed to src/main/resources/native/osx/x64/libopenpnp-capture.dylib

File renamed without changes.

src/main/resources/native/windows/x86_64/libopenpnp-capture-windows-latest-x86_64.dll renamed to src/main/resources/native/windows/x64/openpnp-capture.dll

File renamed without changes.

0 commit comments

Comments
 (0)