mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-27 09:05:35 +00:00
Checking new versions on Github
This commit is contained in:
@@ -53,17 +53,24 @@ public class ApplicationInfo {
|
||||
|
||||
public static String shortApplicationVerName;
|
||||
|
||||
public static final String PROJECT_PAGE = "https://www.free-decompiler.com/flash";
|
||||
public static final String GIT_HUB_PROJECT = "jindrapetrik/jpexs-decompiler";
|
||||
|
||||
public static final String PROJECT_PAGE = "https://github.com/" + GIT_HUB_PROJECT;
|
||||
|
||||
/**
|
||||
* URL for checking new updates
|
||||
*/
|
||||
public static String updateCheckUrl = "https://www.free-decompiler.com/flash/update/check/?currentVersion=<version>¤tRevision=<revision>¤tVersionMajor=<version.major>¤tVersionMinor=<version.minor>¤tVersionRelease=<version.release>¤tVersionBuild=<version.build>¤tNightly=<nightly>";
|
||||
public static final String GITHUB_RELEASES_LATEST_URL = "https://api.github.com/repos/" + GIT_HUB_PROJECT + "/releases/latest";
|
||||
|
||||
/**
|
||||
* URL for checking new updates
|
||||
*/
|
||||
public static final String GITHUB_RELEASES_URL = "https://api.github.com/repos/" + GIT_HUB_PROJECT + "/releases";
|
||||
|
||||
/**
|
||||
* URL for doing update
|
||||
*/
|
||||
public static String updateUrl = "https://www.free-decompiler.com/flash/update/update/?currentVersion=<version>¤tRevision=<revision>¤tVersionMajor=<version.major>¤tVersionMinor=<version.minor>¤tVersionRelease=<version.release>¤tVersionBuild=<version.build>¤tNightly=<nightly>";
|
||||
public static String UPDATE_URL = PROJECT_PAGE;
|
||||
|
||||
static {
|
||||
loadProperties();
|
||||
@@ -105,26 +112,6 @@ public class ApplicationInfo {
|
||||
} catch (IOException | NullPointerException | NumberFormatException ex) {
|
||||
// ignore
|
||||
version = "unknown";
|
||||
}
|
||||
try {
|
||||
updateCheckUrl = updateCheckUrl
|
||||
.replace("<revision>", URLEncoder.encode(revision, "UTF-8"))
|
||||
.replace("<version>", URLEncoder.encode(version, "UTF-8"))
|
||||
.replace("<version.major>", "" + version_major)
|
||||
.replace("<version.minor>", "" + version_minor)
|
||||
.replace("<version.release>", "" + version_release)
|
||||
.replace("<version.build>", "" + version_build)
|
||||
.replace("<nightly>", nightly ? "1" : "0");
|
||||
updateUrl = updateUrl
|
||||
.replace("<revision>", URLEncoder.encode(revision, "UTF-8"))
|
||||
.replace("<version>", URLEncoder.encode(version, "UTF-8"))
|
||||
.replace("<version.major>", "" + version_major)
|
||||
.replace("<version.minor>", "" + version_minor)
|
||||
.replace("<version.release>", "" + version_release)
|
||||
.replace("<version.build>", "" + version_build)
|
||||
.replace("<nightly>", nightly ? "1" : "0");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
|
||||
}
|
||||
applicationVerName = APPLICATION_NAME + " v." + version;
|
||||
shortApplicationVerName = SHORT_APPLICATION_NAME + " v." + version;
|
||||
|
||||
@@ -26,31 +26,13 @@ import java.util.Map;
|
||||
*/
|
||||
public class Version {
|
||||
|
||||
public int versionId;
|
||||
|
||||
public String revision;
|
||||
public String tagName;
|
||||
|
||||
public String versionName;
|
||||
|
||||
public String longVersionName;
|
||||
|
||||
public String releaseDate;
|
||||
|
||||
public String appName;
|
||||
public boolean prerelease;
|
||||
|
||||
public String appFullName;
|
||||
|
||||
public String updateLink;
|
||||
|
||||
public int major;
|
||||
|
||||
public int minor;
|
||||
|
||||
public int release;
|
||||
|
||||
public int build;
|
||||
|
||||
public boolean nightly;
|
||||
|
||||
public Map<String, List<String>> changes = new HashMap<>();
|
||||
public String description;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user