Added an automatic updater for new releases.

opsu! will now check for updates upon launching, and will prompt the user to download and run a newer version, if available.
- The remote version file is just the filled "version" file, currently located in the gh-pages branch.
- The new version is downloaded to the working directory, and launched with ProcessBuilder.

Related changes:
- Added "file" property (containing the download URL) to "version" file.
- Added maven-artifact dependency for version comparisons.
- Added methods in Downloads class to retrieve the constructor parameters.
- Moved method for showing exit confirmation dialogs into UI.
- Moved method for reading from URLs into Utils.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-07 04:17:19 -05:00
parent 9138b70a24
commit 078b765143
15 changed files with 437 additions and 74 deletions

View File

@@ -119,7 +119,7 @@ public class ErrorHandler {
String issueTitle = (error != null) ? error : e.getMessage();
StringBuilder sb = new StringBuilder();
Properties props = new Properties();
props.load(ResourceLoader.getResourceAsStream("version"));
props.load(ResourceLoader.getResourceAsStream(Options.VERSION_FILE));
String version = props.getProperty("version");
if (version != null && !version.equals("${pom.version}")) {
sb.append("**Version:** ");