[FIX] Launch4J - дополнительные настройки.

This commit is contained in:
Zaxar163 2020-01-14 17:32:29 +01:00
parent 770a9a18ce
commit 64d57faa48
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B
2 changed files with 8 additions and 4 deletions

View file

@ -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);

View file

@ -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;