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:
@@ -69,11 +69,17 @@ public class Options {
|
||||
/** Font file name. */
|
||||
public static final String FONT_NAME = "kochi-gothic.ttf";
|
||||
|
||||
/** Version file name. */
|
||||
public static final String VERSION_FILE = "version";
|
||||
|
||||
/** Repository address. */
|
||||
public static URI REPOSITORY_URI = URI.create("https://github.com/itdelatrisu/opsu");
|
||||
public static final URI REPOSITORY_URI = URI.create("https://github.com/itdelatrisu/opsu");
|
||||
|
||||
/** Issue reporting address. */
|
||||
public static String ISSUES_URL = "https://github.com/itdelatrisu/opsu/issues/new?title=%s&body=%s";
|
||||
public static final String ISSUES_URL = "https://github.com/itdelatrisu/opsu/issues/new?title=%s&body=%s";
|
||||
|
||||
/** Address containing the latest version file. */
|
||||
public static final String VERSION_REMOTE = "https://raw.githubusercontent.com/itdelatrisu/opsu/gh-pages/version";
|
||||
|
||||
/** The beatmap directory. */
|
||||
private static File beatmapDir;
|
||||
|
||||
Reference in New Issue
Block a user