Add support for BSD platform
Some checks failed
build / build (17, ubuntu-22.04) (push) Has been cancelled
Some checks failed
build / build (17, ubuntu-22.04) (push) Has been cancelled
This commit is contained in:
@@ -101,6 +101,7 @@ public final class Main {
|
||||
case MACOS -> "liboc2rnet-" + arch + ".dylib";
|
||||
case WINDOWS -> "oc2rnet-" + arch + ".dll";
|
||||
case LINUX -> "liboc2rnet-linux-" + arch + ".so";
|
||||
case BSD -> "liboc2rnet-bsd-" + arch + ".so";
|
||||
};
|
||||
|
||||
String resourcePath = "/natives/" + platform + "/" + libName;
|
||||
@@ -137,6 +138,8 @@ public final class Main {
|
||||
return Platform.WINDOWS;
|
||||
} else if (os.contains("nux") || os.contains("nix")) {
|
||||
return Platform.LINUX;
|
||||
} else if (os.contains("bsd")) {
|
||||
return Platform.BSD;
|
||||
} else {
|
||||
throw new UnsupportedOperationException("Unsupported OS: " + os);
|
||||
}
|
||||
@@ -154,7 +157,8 @@ public final class Main {
|
||||
private enum Platform {
|
||||
LINUX,
|
||||
MACOS,
|
||||
WINDOWS;
|
||||
WINDOWS,
|
||||
BSD;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
Reference in New Issue
Block a user