From 64d57faa48d812ed183d4afcf2f918f6abdf5333 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Tue, 14 Jan 2020 17:32:29 +0100 Subject: [PATCH] =?UTF-8?q?[FIX]=20Launch4J=20-=20=D0=B4=D0=BE=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D0=BD=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launchserver/binary/tasks/exe/Launch4JTask.java | 8 ++++---- .../gravit/launchserver/config/LaunchServerConfig.java | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java index 08d743fb..fbbb3c43 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java @@ -28,7 +28,7 @@ public void clear() { } // URL constants - private static final String DOWNLOAD_URL = "http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html"; // Oracle + public static final String DOWNLOAD_URL = "http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html"; // Oracle // JRE 8 // File constants private final Path faviconFile; @@ -80,8 +80,8 @@ private Path setConfig() { // Set file options config.setChdir("."); config.setErrTitle("JVM Error"); - config.setDownloadUrl(DOWNLOAD_URL); - + config.setDownloadUrl(server.config.launch4j.downloadUrl); + if (server.config.launch4j.supportURL != null) config.setSupportUrl(server.config.launch4j.supportURL); // Set boolean options config.setPriorityIndex(0); config.setHeaderType(Config.GUI_HEADER); @@ -90,7 +90,7 @@ private Path setConfig() { // Prepare JRE Jre jre = new Jre(); - jre.setMinVersion("1.8.0"); + jre.setMinVersion(server.config.launch4j.minVersion); if (server.config.launch4j.setMaxVersion) jre.setMaxVersion(server.config.launch4j.maxVersion); jre.setRuntimeBits(Jre.RUNTIME_BITS_64_AND_32); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index e2f20159..a8d77215 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -16,6 +16,7 @@ import pro.gravit.launchserver.auth.protect.StdProtectHandler; import pro.gravit.launchserver.auth.provider.RejectAuthProvider; import pro.gravit.launchserver.auth.texture.RequestTextureProvider; +import pro.gravit.launchserver.binary.tasks.exe.Launch4JTask; import pro.gravit.launchserver.components.AuthLimiterComponent; import pro.gravit.launchserver.components.Component; import pro.gravit.launchserver.components.RegLimiterComponent; @@ -209,6 +210,9 @@ public static class ExeConf { public boolean enabled; public boolean setMaxVersion; public String maxVersion; + public String minVersion = "1.8.0"; + public String supportURL = null; + public String downloadUrl = Launch4JTask.DOWNLOAD_URL; public String productName; public String productVer; public String fileDesc;