diff --git a/js/qz-tray.js b/js/qz-tray.js index 020319a14..3b50088ac 100644 --- a/js/qz-tray.js +++ b/js/qz-tray.js @@ -1,7 +1,7 @@ 'use strict'; /** - * @version 2.2.1 + * @version 2.2.2-SNAPSHOT * @overview QZ Tray Connector *
* Connects a web client to the QZ Tray software. @@ -38,7 +38,7 @@ var qz = (function() { ///// PRIVATE METHODS ///// var _qz = { - VERSION: "2.2.1", //must match @version above + VERSION: "2.2.2-SNAPSHOT", //must match @version above DEBUG: false, log: { diff --git a/lib/commons-codec-1.10.jar b/lib/commons-codec-1.10.jar deleted file mode 100644 index 1d7417c40..000000000 Binary files a/lib/commons-codec-1.10.jar and /dev/null differ diff --git a/lib/commons-codec-1.15.jar b/lib/commons-codec-1.15.jar new file mode 100644 index 000000000..f14985ac9 Binary files /dev/null and b/lib/commons-codec-1.15.jar differ diff --git a/lib/commons-io-2.11.0.jar b/lib/commons-io-2.11.0.jar new file mode 100644 index 000000000..be507d94f Binary files /dev/null and b/lib/commons-io-2.11.0.jar differ diff --git a/lib/commons-io-2.4.jar b/lib/commons-io-2.4.jar deleted file mode 100644 index 90035a4fe..000000000 Binary files a/lib/commons-io-2.4.jar and /dev/null differ diff --git a/lib/commons-lang3-3.12.0.jar b/lib/commons-lang3-3.12.0.jar new file mode 100644 index 000000000..4d434a2a4 Binary files /dev/null and b/lib/commons-lang3-3.12.0.jar differ diff --git a/lib/commons-lang3-3.4.jar b/lib/commons-lang3-3.4.jar deleted file mode 100644 index 8ec91d454..000000000 Binary files a/lib/commons-lang3-3.4.jar and /dev/null differ diff --git a/lib/commons-pool2-2.11.1.jar b/lib/commons-pool2-2.11.1.jar new file mode 100644 index 000000000..8da8a8278 Binary files /dev/null and b/lib/commons-pool2-2.11.1.jar differ diff --git a/lib/commons-pool2-2.4.2.jar b/lib/commons-pool2-2.4.2.jar deleted file mode 100644 index fdf8b6faa..000000000 Binary files a/lib/commons-pool2-2.4.2.jar and /dev/null differ diff --git a/lib/communication/jna-5.12.1.jar b/lib/communication/jna-5.12.1.jar new file mode 100644 index 000000000..77f8c7ae0 Binary files /dev/null and b/lib/communication/jna-5.12.1.jar differ diff --git a/lib/communication/jna-5.8.0.jar b/lib/communication/jna-5.8.0.jar deleted file mode 100644 index c3d534c1d..000000000 Binary files a/lib/communication/jna-5.8.0.jar and /dev/null differ diff --git a/lib/communication/jna-platform-5.8.0.jar b/lib/communication/jna-platform-5.12.1.jar similarity index 53% rename from lib/communication/jna-platform-5.8.0.jar rename to lib/communication/jna-platform-5.12.1.jar index 388cc4bab..d39193e69 100644 Binary files a/lib/communication/jna-platform-5.8.0.jar and b/lib/communication/jna-platform-5.12.1.jar differ diff --git a/lib/imaging/common-image-3.6.jar b/lib/imaging/common-image-3.8.2.jar similarity index 59% rename from lib/imaging/common-image-3.6.jar rename to lib/imaging/common-image-3.8.2.jar index 9829c5407..da2b0e5fd 100644 Binary files a/lib/imaging/common-image-3.6.jar and b/lib/imaging/common-image-3.8.2.jar differ diff --git a/lib/imaging/common-io-3.6.jar b/lib/imaging/common-io-3.8.2.jar similarity index 57% rename from lib/imaging/common-io-3.6.jar rename to lib/imaging/common-io-3.8.2.jar index e38ca5bcd..c809c9ed4 100644 Binary files a/lib/imaging/common-io-3.6.jar and b/lib/imaging/common-io-3.8.2.jar differ diff --git a/lib/imaging/common-lang-3.6.jar b/lib/imaging/common-lang-3.6.jar deleted file mode 100644 index e3c499df0..000000000 Binary files a/lib/imaging/common-lang-3.6.jar and /dev/null differ diff --git a/lib/imaging/common-lang-3.8.2.jar b/lib/imaging/common-lang-3.8.2.jar new file mode 100644 index 000000000..e4112eab8 Binary files /dev/null and b/lib/imaging/common-lang-3.8.2.jar differ diff --git a/lib/imaging/imageio-core-3.6.jar b/lib/imaging/imageio-core-3.6.jar deleted file mode 100644 index 9f50f54a5..000000000 Binary files a/lib/imaging/imageio-core-3.6.jar and /dev/null differ diff --git a/lib/imaging/imageio-core-3.8.2.jar b/lib/imaging/imageio-core-3.8.2.jar new file mode 100644 index 000000000..f008b7333 Binary files /dev/null and b/lib/imaging/imageio-core-3.8.2.jar differ diff --git a/lib/imaging/imageio-jpeg-3.6.jar b/lib/imaging/imageio-jpeg-3.6.jar deleted file mode 100644 index 1b7709c19..000000000 Binary files a/lib/imaging/imageio-jpeg-3.6.jar and /dev/null differ diff --git a/lib/imaging/imageio-jpeg-3.8.2.jar b/lib/imaging/imageio-jpeg-3.8.2.jar new file mode 100644 index 000000000..c9fa717a6 Binary files /dev/null and b/lib/imaging/imageio-jpeg-3.8.2.jar differ diff --git a/lib/imaging/imageio-metadata-3.6.jar b/lib/imaging/imageio-metadata-3.6.jar deleted file mode 100644 index a58be3ad6..000000000 Binary files a/lib/imaging/imageio-metadata-3.6.jar and /dev/null differ diff --git a/lib/imaging/imageio-metadata-3.8.2.jar b/lib/imaging/imageio-metadata-3.8.2.jar new file mode 100644 index 000000000..39b2afc02 Binary files /dev/null and b/lib/imaging/imageio-metadata-3.8.2.jar differ diff --git a/lib/logging/log4j-api-2.17.2.jar b/lib/logging/log4j-api-2.18.0.jar similarity index 72% rename from lib/logging/log4j-api-2.17.2.jar rename to lib/logging/log4j-api-2.18.0.jar index a03f31516..b4e933f7e 100644 Binary files a/lib/logging/log4j-api-2.17.2.jar and b/lib/logging/log4j-api-2.18.0.jar differ diff --git a/lib/logging/log4j-core-2.17.2.jar b/lib/logging/log4j-core-2.18.0.jar similarity index 72% rename from lib/logging/log4j-core-2.17.2.jar rename to lib/logging/log4j-core-2.18.0.jar index fbc0641dc..d6486fdf3 100644 Binary files a/lib/logging/log4j-core-2.17.2.jar and b/lib/logging/log4j-core-2.18.0.jar differ diff --git a/lib/mslinks-1.0.7.jar b/lib/mslinks-1.0.7.jar deleted file mode 100644 index 0e629e12b..000000000 Binary files a/lib/mslinks-1.0.7.jar and /dev/null differ diff --git a/lib/mslinks-1.1.0.jar b/lib/mslinks-1.1.0.jar new file mode 100644 index 000000000..a20062e93 Binary files /dev/null and b/lib/mslinks-1.1.0.jar differ diff --git a/lib/printing/pdfbox-app-2.0.24.jar b/lib/printing/pdfbox-app-2.0.26.jar similarity index 73% rename from lib/printing/pdfbox-app-2.0.24.jar rename to lib/printing/pdfbox-app-2.0.26.jar index 9fd1108aa..89a8a7b71 100644 Binary files a/lib/printing/pdfbox-app-2.0.24.jar and b/lib/printing/pdfbox-app-2.0.26.jar differ diff --git a/lib/websocket/javax-websocket-server-impl-9.4.45.v20220203.jar b/lib/websocket/javax-websocket-server-impl-9.4.45.v20220203.jar deleted file mode 100644 index 5af1b7ec0..000000000 Binary files a/lib/websocket/javax-websocket-server-impl-9.4.45.v20220203.jar and /dev/null differ diff --git a/lib/websocket/jetty-client-9.4.45.v20220203.jar b/lib/websocket/jetty-client-9.4.48.v20220622.jar similarity index 69% rename from lib/websocket/jetty-client-9.4.45.v20220203.jar rename to lib/websocket/jetty-client-9.4.48.v20220622.jar index 8fd6b0d4d..ef71f1413 100644 Binary files a/lib/websocket/jetty-client-9.4.45.v20220203.jar and b/lib/websocket/jetty-client-9.4.48.v20220622.jar differ diff --git a/lib/websocket/jetty-http-9.4.45.v20220203.jar b/lib/websocket/jetty-http-9.4.48.v20220622.jar similarity index 60% rename from lib/websocket/jetty-http-9.4.45.v20220203.jar rename to lib/websocket/jetty-http-9.4.48.v20220622.jar index 488127cd9..1d67b1ada 100644 Binary files a/lib/websocket/jetty-http-9.4.45.v20220203.jar and b/lib/websocket/jetty-http-9.4.48.v20220622.jar differ diff --git a/lib/websocket/jetty-io-9.4.45.v20220203.jar b/lib/websocket/jetty-io-9.4.48.v20220622.jar similarity index 75% rename from lib/websocket/jetty-io-9.4.45.v20220203.jar rename to lib/websocket/jetty-io-9.4.48.v20220622.jar index 2670df0b0..d767b113f 100644 Binary files a/lib/websocket/jetty-io-9.4.45.v20220203.jar and b/lib/websocket/jetty-io-9.4.48.v20220622.jar differ diff --git a/lib/websocket/jetty-security-9.4.45.v20220203.jar b/lib/websocket/jetty-security-9.4.48.v20220622.jar similarity index 73% rename from lib/websocket/jetty-security-9.4.45.v20220203.jar rename to lib/websocket/jetty-security-9.4.48.v20220622.jar index d28c5356e..c84855c47 100644 Binary files a/lib/websocket/jetty-security-9.4.45.v20220203.jar and b/lib/websocket/jetty-security-9.4.48.v20220622.jar differ diff --git a/lib/websocket/jetty-server-9.4.45.v20220203.jar b/lib/websocket/jetty-server-9.4.48.v20220622.jar similarity index 66% rename from lib/websocket/jetty-server-9.4.45.v20220203.jar rename to lib/websocket/jetty-server-9.4.48.v20220622.jar index 156392f22..5261f0d35 100644 Binary files a/lib/websocket/jetty-server-9.4.45.v20220203.jar and b/lib/websocket/jetty-server-9.4.48.v20220622.jar differ diff --git a/lib/websocket/jetty-servlet-9.4.45.v20220203.jar b/lib/websocket/jetty-servlet-9.4.48.v20220622.jar similarity index 64% rename from lib/websocket/jetty-servlet-9.4.45.v20220203.jar rename to lib/websocket/jetty-servlet-9.4.48.v20220622.jar index ba70bb47a..684dc9959 100644 Binary files a/lib/websocket/jetty-servlet-9.4.45.v20220203.jar and b/lib/websocket/jetty-servlet-9.4.48.v20220622.jar differ diff --git a/lib/websocket/jetty-util-9.4.45.v20220203.jar b/lib/websocket/jetty-util-9.4.48.v20220622.jar similarity index 74% rename from lib/websocket/jetty-util-9.4.45.v20220203.jar rename to lib/websocket/jetty-util-9.4.48.v20220622.jar index 48dd192a0..ddc49a8b0 100644 Binary files a/lib/websocket/jetty-util-9.4.45.v20220203.jar and b/lib/websocket/jetty-util-9.4.48.v20220622.jar differ diff --git a/lib/websocket/websocket-api-9.4.45.v20220203.jar b/lib/websocket/websocket-api-9.4.48.v20220622.jar similarity index 57% rename from lib/websocket/websocket-api-9.4.45.v20220203.jar rename to lib/websocket/websocket-api-9.4.48.v20220622.jar index b434e8d6c..15d0299bc 100644 Binary files a/lib/websocket/websocket-api-9.4.45.v20220203.jar and b/lib/websocket/websocket-api-9.4.48.v20220622.jar differ diff --git a/lib/websocket/websocket-client-9.4.45.v20220203.jar b/lib/websocket/websocket-client-9.4.48.v20220622.jar similarity index 74% rename from lib/websocket/websocket-client-9.4.45.v20220203.jar rename to lib/websocket/websocket-client-9.4.48.v20220622.jar index 0734de2f6..0495eb34f 100644 Binary files a/lib/websocket/websocket-client-9.4.45.v20220203.jar and b/lib/websocket/websocket-client-9.4.48.v20220622.jar differ diff --git a/lib/websocket/websocket-common-9.4.45.v20220203.jar b/lib/websocket/websocket-common-9.4.48.v20220622.jar similarity index 73% rename from lib/websocket/websocket-common-9.4.45.v20220203.jar rename to lib/websocket/websocket-common-9.4.48.v20220622.jar index c994453b6..f9bf3436d 100644 Binary files a/lib/websocket/websocket-common-9.4.45.v20220203.jar and b/lib/websocket/websocket-common-9.4.48.v20220622.jar differ diff --git a/lib/websocket/websocket-server-9.4.45.v20220203.jar b/lib/websocket/websocket-server-9.4.48.v20220622.jar similarity index 52% rename from lib/websocket/websocket-server-9.4.45.v20220203.jar rename to lib/websocket/websocket-server-9.4.48.v20220622.jar index abf95fd63..6c602a270 100644 Binary files a/lib/websocket/websocket-server-9.4.45.v20220203.jar and b/lib/websocket/websocket-server-9.4.48.v20220622.jar differ diff --git a/lib/websocket/websocket-servlet-9.4.45.v20220203.jar b/lib/websocket/websocket-servlet-9.4.48.v20220622.jar similarity index 77% rename from lib/websocket/websocket-servlet-9.4.45.v20220203.jar rename to lib/websocket/websocket-servlet-9.4.48.v20220622.jar index 3b07227ea..836a8e40b 100644 Binary files a/lib/websocket/websocket-servlet-9.4.45.v20220203.jar and b/lib/websocket/websocket-servlet-9.4.48.v20220622.jar differ diff --git a/src/qz/build/JLink.java b/src/qz/build/JLink.java index 38011d512..0cee3f13f 100644 --- a/src/qz/build/JLink.java +++ b/src/qz/build/JLink.java @@ -28,7 +28,7 @@ public class JLink { private static final Logger log = LogManager.getLogger(JLink.class); private static final String JAVA_AMD64_VENDOR = "AdoptOpenJDK"; private static final String JAVA_ARM64_VENDOR = "BellSoft"; - private static final String JAVA_VERSION = "11.0.12+7"; + private static final String JAVA_VERSION = "11.0.16+8"; private static final String JAVA_MAJOR = JAVA_VERSION.split("\\.")[0]; private static final String JAVA_MINOR = JAVA_VERSION.split("\\.")[1]; private static final String JAVA_PATCH = JAVA_VERSION.split("\\.|\\+|-")[2]; @@ -92,12 +92,11 @@ private static boolean needsDownload(Version want, Version installed) { // Per JDK-8240734: Major versions checks aren't enough starting with 11.0.16+8 // see also https://github.com/adoptium/adoptium-support/issues/557 Version bad = SystemUtilities.getJavaVersion("11.0.16+8"); - if(installed.greaterThanOrEqualTo(bad)) { - if(want.lessThan(bad)) { + if(want.greaterThanOrEqualTo(bad) && installed.lessThan(bad) || + installed.greaterThanOrEqualTo(bad) && want.lessThan(bad)) { // Force download // Fixes "Hash of java.rmi differs from expected hash" downloadJdk = true; - } } return downloadJdk; } diff --git a/src/qz/common/Constants.java b/src/qz/common/Constants.java index 413c7b0d9..014112961 100644 --- a/src/qz/common/Constants.java +++ b/src/qz/common/Constants.java @@ -14,7 +14,7 @@ public class Constants { public static final String HEXES = "0123456789ABCDEF"; public static final char[] HEXES_ARRAY = HEXES.toCharArray(); public static final int BYTE_BUFFER_SIZE = 8192; - public static final Version VERSION = Version.valueOf("2.2.1"); + public static final Version VERSION = Version.valueOf("2.2.2-SNAPSHOT"); public static final Version JAVA_VERSION = SystemUtilities.getJavaVersion(); public static final String JAVA_VENDOR = System.getProperty("java.vendor"); diff --git a/src/qz/installer/Installer.java b/src/qz/installer/Installer.java index cf9d20003..d225110b4 100644 --- a/src/qz/installer/Installer.java +++ b/src/qz/installer/Installer.java @@ -123,7 +123,8 @@ public Installer deployApp() throws IOException { // Delete the JDK blindly FileUtils.deleteDirectory(dest.resolve(JRE_LOCATION).toFile()); - FileUtils.copyDirectory(src.toFile(), dest.toFile()); + // Note: preserveFileDate=false per https://github.com/qzind/tray/issues/1011 + FileUtils.copyDirectory(src.toFile(), dest.toFile(), false); FileUtilities.setPermissionsRecursively(dest, false); if(!SystemUtilities.isWindows()) { diff --git a/src/qz/utils/JsonWriter.java b/src/qz/utils/JsonWriter.java index 56e493773..6dc36b0dc 100644 --- a/src/qz/utils/JsonWriter.java +++ b/src/qz/utils/JsonWriter.java @@ -21,6 +21,7 @@ import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.Iterator; /** @@ -50,7 +51,7 @@ public static boolean write(String path, String data, boolean overwrite, boolean remove(config, append); } - FileUtils.write(f, config.toString(2)); + FileUtils.write(f, config.toString(2), StandardCharsets.UTF_8); return true; } @@ -61,7 +62,7 @@ public static boolean contains(File path, String data) { return false; } - String jsonData = FileUtils.readFileToString(path, Charsets.UTF_8); + String jsonData = FileUtils.readFileToString(path, StandardCharsets.UTF_8); JSONObject before = new JSONObject(jsonData); JSONObject after = new JSONObject(jsonData); merge(after, new JSONObject(data), true); diff --git a/src/qz/utils/LinuxUtilities.java b/src/qz/utils/LinuxUtilities.java index b881c27f4..4f056bd80 100644 --- a/src/qz/utils/LinuxUtilities.java +++ b/src/qz/utils/LinuxUtilities.java @@ -19,7 +19,8 @@ public class LinuxUtilities { public static boolean elevatedFileCopy(Path source, Path destination) { // Don't prompt if it's not needed try { - FileUtils.copyFile(source.toFile(), destination.toFile()); + // Note: preserveFileDate=false per https://github.com/qzind/tray/issues/1011 + FileUtils.copyFile(source.toFile(), destination.toFile(), false); return true; } catch(IOException ignore) {} if(foundElevator == null) {