Skip to content

Commit

Permalink
Drops code to detect old versions of OSX, there is only "mac" now
Browse files Browse the repository at this point in the history
Closes #58
  • Loading branch information
lukaszlenart committed Sep 15, 2017
1 parent dd1bbf0 commit 6c0322e
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ private Artifact chooseBinaryBits() throws MojoExecutionException {
} else if ("Solaris".equals(os) || "SunOS".equals(os)) {
plat = "solaris";
} else if ("Mac OS X".equals(os) || "Darwin".equals(os)) {
plat = isBelowMacOSX_10_8() ? "mac" : "osx";
plat = "mac";
} else {
throw new MojoExecutionException("Sorry, Launch4j doesn't support the '" + os + "' OS.");
}
Expand All @@ -613,17 +613,6 @@ private Artifact chooseBinaryBits() throws MojoExecutionException {
getLaunch4jVersion(), "jar", "workdir-" + plat);
}

private boolean isBelowMacOSX_10_8() {
String[] parts = System.getProperty("os.version").split("\\.");
try {
int major = Integer.parseInt(parts[0]);
int minor = Integer.parseInt(parts[1]);
return (major < 10) || (major == 10) && (minor < 8);
} catch (NumberFormatException e) {
return false;
}
}

private File getBaseDir() {
return basedir;
}
Expand Down

0 comments on commit 6c0322e

Please sign in to comment.