From 4140b2ad5bdbdb40d250a4cde9c7ec83d8d55604 Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Mon, 26 Nov 2018 11:00:58 +0300 Subject: [PATCH] Fixed binary names... --- .../main/java/ru/gravit/launchserver/ProguardConf.java | 10 ++++------ .../gravit/launchserver/binary/JARLauncherBinary.java | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java b/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java index ba2f7a39..84e66e48 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java @@ -7,7 +7,6 @@ import java.io.PrintWriter; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.security.SecureRandom; import java.util.ArrayList; @@ -33,17 +32,16 @@ private static String generateString(SecureRandom rand, int il) { public final ArrayList confStrs; public ProguardConf(LaunchServer srv) { - LaunchServer srv1 = srv; - proguard = srv1.dir.resolve("proguard"); + proguard = srv.dir.resolve("proguard"); config = proguard.resolve("proguard.config"); mappings = proguard.resolve("mappings.pro"); words = proguard.resolve("random.pro"); confStrs = new ArrayList<>(); prepare(false); - if (srv1.config.genMappings) confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'"); + if (srv.config.genMappings) confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'"); confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'"); - confStrs.add("-injar \'" + Paths.get(".").toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-nonObf.jar\'"); - confStrs.add("-outjar \'" + Paths.get(".").toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + ".jar\'"); + 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 + (srv.config.buildPostTransform.enabled ? "-obf.jar\'" : ".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 9f4b254e..b980fb32 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java @@ -119,7 +119,7 @@ private static ZipEntry newGuardEntry(String fileName) { public JARLauncherBinary(LaunchServer server) throws IOException { super(server, server.dir.resolve(server.config.binaryName + "-nonObf.jar"), - server.dir.resolve(server.config.binaryName + (server.config.buildPostTransform.enabled ? ".jar" : "-obf.jar"))); + server.dir.resolve(server.config.binaryName + ".jar")); runtimeDir = server.dir.resolve(Launcher.RUNTIME_DIR); guardDir = server.dir.resolve("guard"); initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE);