Skip to content

Commit

Permalink
Update resource path for M1 MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejG604 committed Dec 21, 2023
1 parent f10573a commit 0928e61
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ public static void initialize(String libraryPath) {
}

public static String resourcePath() {
Boolean isArmArch = System.getProperty("os.arch").toLowerCase(Locale.ROOT).contains("aarch64");

String osName = System.getProperty("os.name").toLowerCase(Locale.ROOT);
if (osName.contains("linux")) return "META-INF/native/linux64/libsodiumjni.so";
else if (osName.contains("mac") && isArmArch) return "META-INF/native/arm-darwin/libsodiumjni.dylib";
else if (osName.contains("mac")) return "META-INF/native/darwin/libsodiumjni.dylib";
else if (osName.contains("windows")) return "META-INF/native/windows64/libsodiumjni.dll";
else
Expand Down

0 comments on commit 0928e61

Please sign in to comment.