OS dependent library loading
Some checks failed
studiorailgun/fluid-sim/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/fluid-sim/pipeline/head There was a failure building this commit
This commit is contained in:
parent
40b570a0b1
commit
13bda0cbf3
@ -24,10 +24,16 @@ import org.lwjgl.system.MemoryUtil;
|
|||||||
*/
|
*/
|
||||||
public class FluidSim {
|
public class FluidSim {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load fluid sim library
|
||||||
|
*/
|
||||||
static {
|
static {
|
||||||
// System.out.println(System.getProperty("user.dir"));
|
String osName = System.getProperty("os.name");
|
||||||
// System.load(System.getProperty("user.dir") + "/shared-folder/libfluidsim.dll");
|
if(osName.contains("win")){
|
||||||
System.load(new File("./shared-folder/libfluidsim.dll").toPath().toAbsolutePath().toString());
|
System.load(new File("./shared-folder/libfluidsim.dll").toPath().toAbsolutePath().toString());
|
||||||
|
} else if(osName.contains("nix")){
|
||||||
|
System.load(new File("./shared-folder/libfluidsim.so").toPath().toAbsolutePath().toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int DIM = 18;
|
public static final int DIM = 18;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user