[orx-syphon] Add support for arm64 architecture (#328)

This commit is contained in:
Arthur Vimond
2024-03-14 11:58:23 +01:00
committed by GitHub
parent 5f7a53dbef
commit fed97e673f
5 changed files with 9 additions and 1 deletions

View File

@@ -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) {