Add linux compatibility & Finalize Config Loader

This commit is contained in:
2023-02-19 15:51:50 +01:00
parent f69fbedee0
commit ce9a2fc805
29 changed files with 212 additions and 71 deletions

View File

@@ -54,9 +54,15 @@ public class Config {
return config;
}
public String getPathFor(MkvToolNix exe) {
return mkvToolNix.getAbsolutePath().endsWith("/") ? mkvToolNix.getAbsolutePath() + exe + ".exe" :
mkvToolNix.getAbsolutePath() + "/" + exe + ".exe";
/**
* Get path to specific mkvtoolnix application.
*
* @return absolute path to desired application.
*/
public String getPathFor(MkvToolNix application) {
String executable = isWindows() ? application + ".exe" : application.toString();
return mkvToolNix.getAbsolutePath().endsWith("/") ? mkvToolNix.getAbsolutePath() + executable :
mkvToolNix.getAbsolutePath() + "/" + executable;
}
@Override