Add option hmcl.update_source.override
This commit is contained in:
@@ -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";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user