Load ndlls from correct path on Apple Silicon Mac

This commit is contained in:
tobil4sk
2024-01-27 00:31:59 +00:00
committed by Josh Tynjala
parent e88b3d21c1
commit 1ebce5faa3
3 changed files with 21 additions and 11 deletions

View File

@@ -165,6 +165,11 @@ class CFFI
{
result = __tryLoad(ndllFolder + __sysName() + "64/" + library, library, method, args);
}
if (result == null)
{
result = __tryLoad(haxelib + "/ndll/" + __sysName() + "Arm64/" + library, library, method, args);
}
}
}

View File

@@ -485,15 +485,14 @@ class CommandLineTools
}
case MAC:
// if (System.hostArchitecture == X64) {
if (System.hostArchitecture == X64)
{
untyped $loader.path = $array(path + "Mac64/", $loader.path);
// } else {
// untyped $loader.path = $array (path + "Mac/", $loader.path);
// }
}
else if (System.hostArchitecture == ARM64)
{
untyped $loader.path = $array(path + "MacArm64/", $loader.path);
}
case LINUX:
var arguments = Sys.args();

View File

@@ -67,8 +67,14 @@ class SVGExport
// }
case MAC:
untyped $loader.path = $array(path + "Mac/", $loader.path);
if (System.hostArchitecture == X64)
{
untyped $loader.path = $array(path + "Mac64/", $loader.path);
}
else if (System.hostArchitecture == ARM64)
{
untyped $loader.path = $array(path + "MacArm64/", $loader.path);
}
case LINUX:
var arguments = Sys.args();