diff --git a/lib/minimal-json-0.9.5.jar b/lib/minimal-json-0.9.5.jar new file mode 100644 index 000000000..8405dff1d Binary files /dev/null and b/lib/minimal-json-0.9.5.jar differ diff --git a/lib/minimal-json.license.txt b/lib/minimal-json.license.txt new file mode 100644 index 000000000..ad2fd8e30 --- /dev/null +++ b/lib/minimal-json.license.txt @@ -0,0 +1,19 @@ +Copyright (c) 2013, 2014 EclipseSource + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java index bfaf4d1a3..7aa93f321 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java @@ -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=¤tRevision=¤tVersionMajor=¤tVersionMinor=¤tVersionRelease=¤tVersionBuild=¤tNightly="; + 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=¤tRevision=¤tVersionMajor=¤tVersionMinor=¤tVersionRelease=¤tVersionBuild=¤tNightly="; + 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("", URLEncoder.encode(revision, "UTF-8")) - .replace("", URLEncoder.encode(version, "UTF-8")) - .replace("", "" + version_major) - .replace("", "" + version_minor) - .replace("", "" + version_release) - .replace("", "" + version_build) - .replace("", nightly ? "1" : "0"); - updateUrl = updateUrl - .replace("", URLEncoder.encode(revision, "UTF-8")) - .replace("", URLEncoder.encode(version, "UTF-8")) - .replace("", "" + version_major) - .replace("", "" + version_minor) - .replace("", "" + version_release) - .replace("", "" + version_build) - .replace("", nightly ? "1" : "0"); - } catch (UnsupportedEncodingException e) { - } applicationVerName = APPLICATION_NAME + " v." + version; shortApplicationVerName = SHORT_APPLICATION_NAME + " v." + version; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/Version.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/Version.java index 90dc4f76d..0a6bf64e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/Version.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/Version.java @@ -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> changes = new HashMap<>(); + public String description; } diff --git a/nbproject/project.xml b/nbproject/project.xml index ff64d9046..8e37dff20 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -323,7 +323,7 @@ src - lib/LZMA.jar;lib/jna-3.5.1.jar;lib/jpproxy.jar;lib/trident-6.2.jar;lib/substance-flamingo-6.2.jar;lib/flamingo-6.2.jar;lib/substance-6.2.jar;lib/jl1.0.1.jar;lib/nellymoser.jar;lib/gif.jar;lib/avi.jar;lib/ttf.jar;lib/jpacker.jar;lib/sfntly.jar;lib/gnujpdf.jar;libsrc/ffdec_lib/src;lib/tablelayout.jar;lib/jsyntaxpane-0.9.5.jar;lib/JavactiveX.jar;lib/flashdebugger.jar;lib/treetable.jar + lib/LZMA.jar;lib/jna-3.5.1.jar;lib/jpproxy.jar;lib/trident-6.2.jar;lib/substance-flamingo-6.2.jar;lib/flamingo-6.2.jar;lib/substance-6.2.jar;lib/jl1.0.1.jar;lib/nellymoser.jar;lib/gif.jar;lib/avi.jar;lib/ttf.jar;lib/jpacker.jar;lib/sfntly.jar;lib/gnujpdf.jar;libsrc/ffdec_lib/src;lib/tablelayout.jar;lib/jsyntaxpane-0.9.5.jar;lib/JavactiveX.jar;lib/flashdebugger.jar;lib/treetable.jar;lib/minimal-json-0.9.5.jar build javadoc reports diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java index 8efd1cbec..0edf1a29d 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java @@ -506,7 +506,7 @@ public abstract class MainFrameMenu implements MenuBuilder { return; } - String helpUsURL = ApplicationInfo.PROJECT_PAGE + "/help_us.html?utm_source=app&utm_medium=menu&utm_campaign=app"; + String helpUsURL = ApplicationInfo.PROJECT_PAGE; if (!View.navigateUrl(helpUsURL)) { View.showMessageDialog(null, translate("message.helpus").replace("%url%", helpUsURL)); } @@ -751,7 +751,7 @@ public abstract class MainFrameMenu implements MenuBuilder { setMenuEnabled("_/checkUpdates", !isWorking); setMenuEnabled("/help/checkUpdates", !isWorking); - setMenuEnabled("/help/helpUs", !isWorking); + //setMenuEnabled("/help/helpUs", !isWorking); setMenuEnabled("/help/homePage", !isWorking); setMenuEnabled("_/about", !isWorking); setMenuEnabled("/help/about", !isWorking); @@ -1030,7 +1030,7 @@ public abstract class MainFrameMenu implements MenuBuilder { //Help addMenuItem("/help", translate("menu.help"), null, null, 0, null, false, null, false); - addMenuItem("/help/helpUs", translate("menu.help.helpus"), "donate32", this::helpUsActionPerformed, PRIORITY_TOP, null, true, null, false); + //addMenuItem("/help/helpUs", translate("menu.help.helpus"), "donate32", this::helpUsActionPerformed, PRIORITY_TOP, null, true, null, false); addMenuItem("/help/homePage", translate("menu.help.homepage"), "homepage16", this::homePageActionPerformed, PRIORITY_MEDIUM, null, true, null, false); addSeparator("/help"); addMenuItem("/help/checkUpdates", translate("menu.help.checkupdates"), "update16", this::checkUpdatesActionPerformed, PRIORITY_MEDIUM, null, true, null, false);