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

@@ -447,6 +447,12 @@ public enum GameImage {
protected Image process_sub(Image img, int w, int h) {
return img.getScaledCopy((h / 17f) / img.getHeight());
}
},
BANG ("bang", "png", false, false) {
@Override
protected Image process_sub(Image img, int w, int h) {
return REPOSITORY.process_sub(img, w, h);
}
};
/** Image file types. */