From d559025241ff5fc623baf95c6df7911f77d7ac3d Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Sat, 8 Dec 2018 11:50:52 +0300 Subject: [PATCH] Name fixes. --- .../main/java/ru/gravit/launchserver/LaunchServer.java | 10 +++++++--- .../main/java/ru/gravit/launchserver/ProguardConf.java | 2 +- .../gravit/launchserver/binary/JARLauncherBinary.java | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index ab0e7afc..d5d174ea 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -357,7 +357,6 @@ public LaunchServer(Path dir) throws IOException, InvalidKeySpecException { CommandHandler localCommandHandler; try { Class.forName("jline.Terminal"); - // JLine2 available localCommandHandler = new JLineCommandHandler(this); LogHelper.info("JLine2 terminal enabled"); @@ -379,7 +378,8 @@ public LaunchServer(Path dir) throws IOException, InvalidKeySpecException { KeyPair pair = SecurityHelper.genRSAKeyPair(); publicKey = (RSAPublicKey) pair.getPublic(); privateKey = (RSAPrivateKey) pair.getPrivate(); - + Files.deleteIfExists(publicKeyFile); + Files.deleteIfExists(privateKeyFile); // Write key pair files LogHelper.info("Writing RSA keypair files"); IOHelper.write(publicKeyFile, publicKey.getEncoded()); @@ -447,7 +447,11 @@ public LaunchServer(Path dir) throws IOException, InvalidKeySpecException { } private LauncherBinary binary() { - if (config.launch4j.enabled) return new EXEL4JLauncherBinary(this); + try { + Class.forName("net.sf.launch4j.Builder"); + if (config.launch4j.enabled) return new EXEL4JLauncherBinary(this); + } catch (ClassNotFoundException ignored) { + } return new EXELauncherBinary(this); } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java b/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java index d4a52adf..6cffd62b 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java @@ -41,7 +41,7 @@ public ProguardConf(LaunchServer srv) { confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'"); confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'"); confStrs.add("-injar \'" + srv.dir.toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-nonObf.jar\'"); - confStrs.add("-outjar \'" + srv.dir.toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-obfed.jar\'"); + confStrs.add("-outjar \'" + srv.dir.toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-obfPre.jar\'"); confStrs.add("-classobfuscationdictionary \'" + words.toFile().getName() + "\'"); confStrs.add(readConf()); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java index 3d88b45d..79d2f843 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java @@ -127,7 +127,7 @@ public JARLauncherBinary(LaunchServer server) throws IOException { runtimeDir = server.dir.resolve(Launcher.RUNTIME_DIR); guardDir = server.dir.resolve(Launcher.GUARD_DIR); initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE); - obfJar = server.dir.resolve(server.config.binaryName + "-obfed.jar"); + obfJar = server.dir.resolve(server.config.binaryName + "-obfPre.jar"); obfOutJar = server.config.buildPostTransform.enabled ? server.dir.resolve(server.config.binaryName + "-obf.jar") : syncBinaryFile; cleanJar = server.dir.resolve(server.config.binaryName + "-clean.jar");