- first shot on FreeBSD support

This commit is contained in:
tinca
2014-02-28 20:26:05 +01:00
parent c9da9a10c3
commit 11f68300c6
2 changed files with 36 additions and 2 deletions

View File

@@ -51,6 +51,14 @@ public abstract class Platform {
platform = new OsX64Bit();
}
}
else if (osName.contains("freebsd")) {
if (arch.equals("amd64")) {
platform = new FreeBSD64Bit();
}
else if (arch.equals("i386") || arch.equals("x86")) {
platform = new FreeBSD32Bit();
}
}
if (platform == null) {
platform = new Unsupported();
}
@@ -200,6 +208,20 @@ public abstract class Platform {
}
}
private static class FreeBSD32Bit extends Linux {
@Override
public String getId() {
return "freebsd-i386";
}
}
private static class FreeBSD64Bit extends Linux {
@Override
public String getId() {
return "freebsd-amd64";
}
}
private static abstract class OsX extends Posix {
@Override
public <T extends NativeIntegration> T get(Class<T> type, NativeLibraryLoader nativeLibraryLoader) {