Fixed mac lib path

Change-Id: Ib6f38b7f42df9c9908c7e60eca12dd48c9c4114a
This commit is contained in:
Fredric Silberberg
2015-11-16 09:56:47 -05:00
parent 967400f181
commit 6a0485a72c
2 changed files with 10 additions and 0 deletions

View File

@@ -23,6 +23,8 @@ public class NetworkTablesJNI {
System.out.println("platform: " + resname);
if (osname.startsWith("Windows"))
resname += "ntcore.dll";
else if (osname.startsWith("Mac"))
resname += "libntcore.dylib";
else
resname += "libntcore.so";
InputStream is = NetworkTablesJNI.class.getResourceAsStream(resname);
@@ -30,6 +32,8 @@ public class NetworkTablesJNI {
// create temporary file
if (System.getProperty("os.name").startsWith("Windows"))
jniLibrary = File.createTempFile("NetworkTablesJNI", ".dll");
else if (System.getProperty("os.name").startsWith("Mac"))
jniLibrary = File.createTempFile("libNetworkTablesJNI", ".dylib");
else
jniLibrary = File.createTempFile("libNetworkTablesJNI", ".so");
// flag for delete on exit