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 {
|
||||
|
||||
/**
|
||||
* Load fluid sim library
|
||||
*/
|
||||
static {
|
||||
// System.out.println(System.getProperty("user.dir"));
|
||||
// System.load(System.getProperty("user.dir") + "/shared-folder/libfluidsim.dll");
|
||||
String osName = System.getProperty("os.name");
|
||||
if(osName.contains("win")){
|
||||
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user