mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Fix JNI embed location on Windows.
Make it Windows version agnostic and fix the amd64 runtime / x86-64 build architecture naming difference. See artf4198.
This commit is contained in:
@@ -211,6 +211,12 @@ jar {
|
||||
} else {
|
||||
into "Linux/" + binary.targetPlatform.architecture.name
|
||||
}
|
||||
} else if (binary.targetPlatform.operatingSystem.name.startsWith("Windows")) {
|
||||
if (binary.targetPlatform.architecture.name == "x86-64") {
|
||||
into "Windows/amd64"
|
||||
} else {
|
||||
into "Windows/" + binary.targetPlatform.architecture.name
|
||||
}
|
||||
} else {
|
||||
into binary.targetPlatform.operatingSystem.name + "/" + binary.targetPlatform.architecture.name
|
||||
}
|
||||
|
||||
@@ -15,7 +15,11 @@ public class NetworkTablesJNI {
|
||||
if (!libraryLoaded) {
|
||||
try {
|
||||
String osname = System.getProperty("os.name");
|
||||
String resname = "/" + osname + "/" + System.getProperty("os.arch") + "/";
|
||||
String resname;
|
||||
if (osname.startsWith("Windows"))
|
||||
resname = "/Windows/" + System.getProperty("os.arch") + "/";
|
||||
else
|
||||
resname = "/" + osname + "/" + System.getProperty("os.arch") + "/";
|
||||
System.out.println("platform: " + resname);
|
||||
if (osname.startsWith("Windows"))
|
||||
resname += "ntcore.dll";
|
||||
|
||||
Reference in New Issue
Block a user