Skip to content

Commit

Permalink
[orx-syphon] Add support for arm64 architecture (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurVimond authored Mar 14, 2024
1 parent 5f7a53d commit fed97e6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion orx-jvm/orx-syphon/src/main/kotlin/jsyphon/JSyphonNative.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ object JSyphonNative {
init {
require(Platform.type == PlatformType.MAC) { "orx-syphon only works on macOS, your platform is not supported" }

val arch = System.getProperty("os.arch")
val libraries = when (arch) {
"x86-64",
"x86_64",
"amd64",
"x64" -> arrayOf("Syphon-x86", "libJSyphon-x86.jnilib")

else -> arrayOf("Syphon-arm64", "libJSyphon-arm64.jnilib")
}
val tempBase = Platform.tempDirectory()
val libraries = arrayOf("Syphon", "libJSyphon.jnilib")
val tempDir = File(tempBase, "orx-syphon")
tempDir.mkdirs()
for (library in libraries) {
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit fed97e6

Please sign in to comment.