Add option hmcl.update_source.override

This commit is contained in:
yushijinhun
2018-07-31 19:41:50 +08:00
parent dd45e1b3db
commit 4f52bb2ffe
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ public final class Metadata {
public static final String NAME = "HMCL"; public static final String NAME = "HMCL";
public static final String TITLE = NAME + " " + VERSION; public static final String TITLE = NAME + " " + VERSION;
public static final String UPDATE_SERVER_URL = "https://www.huangyuhui.net"; public static final String UPDATE_SERVER_URL = System.getProperty("hmcl.update_source.override", "https://www.huangyuhui.net");
public static final String CONTACT_URL = UPDATE_SERVER_URL + "/hmcl.php"; public static final String CONTACT_URL = UPDATE_SERVER_URL + "/hmcl.php";
public static final String PUBLISH_URL = "http://www.mcbbs.net/thread-142335-1-1.html"; public static final String PUBLISH_URL = "http://www.mcbbs.net/thread-142335-1-1.html";
} }

View File

@@ -37,7 +37,7 @@ public final class UpdateChecker {
private UpdateChecker() {} private UpdateChecker() {}
private static ObjectProperty<RemoteVersion> latestVersion = new SimpleObjectProperty<>(); private static ObjectProperty<RemoteVersion> latestVersion = new SimpleObjectProperty<>();
private static StringProperty updateSource = new SimpleStringProperty("http://localhost/hmcl/update_link"); private static StringProperty updateSource = new SimpleStringProperty(Metadata.UPDATE_SERVER_URL + "/api/update_link");
private static BooleanBinding outdated = Bindings.createBooleanBinding( private static BooleanBinding outdated = Bindings.createBooleanBinding(
() -> { () -> {
RemoteVersion latest = latestVersion.get(); RemoteVersion latest = latestVersion.get();