diff --git a/src/main/java/org/polypheny/qtf/QTFConfig.java b/src/main/java/org/polypheny/qtf/QTFConfig.java index 69ffb28..0918695 100644 --- a/src/main/java/org/polypheny/qtf/QTFConfig.java +++ b/src/main/java/org/polypheny/qtf/QTFConfig.java @@ -30,12 +30,13 @@ public class QTFConfig { static Properties prop; - + static OS os = Platform.getNativePlatform().getOS(); static { prop = new Properties(); //see https://stackoverflow.com/questions/16343939/loading-properties-file-from-static-context - try ( InputStream input = QTFConfig.class.getClassLoader().getResourceAsStream( "config.properties" ) ) { + String configPath = "config_"+os.toString()+".properties"; + try ( InputStream input = QTFConfig.class.getClassLoader().getResourceAsStream( configPath ) ) { prop.load( input ); } catch ( IOException ex ) { log.error( "Could not load properties" ); diff --git a/src/main/resources/config.properties b/src/main/resources/config.properties deleted file mode 100644 index 010ae3d..0000000 --- a/src/main/resources/config.properties +++ /dev/null @@ -1,14 +0,0 @@ - -reconnectionTimeout = 5000 -host = localhost -port = 8080 -fuseCapacityGB = 1000 -#mac -libraryPath = /usr/local/lib/ -libfuse = libosxfuse.2.dylib -#linux: -#libraryPath = /usr/lib/x86_64-linux-gnu/ -#libfuse = libfuse.so -#windows -#libraryPath = C:\\Program Files (x86)\\WinFsp\\bin\\ -#libfuse = winfsp-x64.dll \ No newline at end of file diff --git a/src/main/resources/config_linux.properties b/src/main/resources/config_linux.properties new file mode 100644 index 0000000..ee179b7 --- /dev/null +++ b/src/main/resources/config_linux.properties @@ -0,0 +1,9 @@ + +reconnectionTimeout = 5000 +host = localhost +port = 8080 +fuseCapacityGB = 1000 + +#linux: +libraryPath = /usr/lib/x86_64-linux-gnu/ +libfuse = libfuse.so diff --git a/src/main/resources/config_mac.properties b/src/main/resources/config_mac.properties new file mode 100644 index 0000000..44b21ab --- /dev/null +++ b/src/main/resources/config_mac.properties @@ -0,0 +1,9 @@ + +reconnectionTimeout = 5000 +host = localhost +port = 8080 +fuseCapacityGB = 1000 + +#mac +libraryPath = /usr/local/lib/ +libfuse = libosxfuse.2.dylib diff --git a/src/main/resources/config_windows.properties b/src/main/resources/config_windows.properties new file mode 100644 index 0000000..ec94992 --- /dev/null +++ b/src/main/resources/config_windows.properties @@ -0,0 +1,9 @@ + +reconnectionTimeout = 5000 +host = localhost +port = 8080 +fuseCapacityGB = 1000 + +#windows +libraryPath = C:\\Program Files (x86)\\WinFsp\\bin\\ +libfuse = winfsp-x64.dll \ No newline at end of file