Fixed binary names...

This commit is contained in:
zaxar163 2018-11-26 11:00:58 +03:00
parent ebdf52d344
commit 4140b2ad5b
No known key found for this signature in database
GPG key ID: E3B309DD3852DE06
2 changed files with 5 additions and 7 deletions

View file

@ -7,7 +7,6 @@
import java.io.PrintWriter; import java.io.PrintWriter;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.util.ArrayList; import java.util.ArrayList;
@ -33,17 +32,16 @@ private static String generateString(SecureRandom rand, int il) {
public final ArrayList<String> confStrs; public final ArrayList<String> confStrs;
public ProguardConf(LaunchServer srv) { public ProguardConf(LaunchServer srv) {
LaunchServer srv1 = srv; proguard = srv.dir.resolve("proguard");
proguard = srv1.dir.resolve("proguard");
config = proguard.resolve("proguard.config"); config = proguard.resolve("proguard.config");
mappings = proguard.resolve("mappings.pro"); mappings = proguard.resolve("mappings.pro");
words = proguard.resolve("random.pro"); words = proguard.resolve("random.pro");
confStrs = new ArrayList<>(); confStrs = new ArrayList<>();
prepare(false); 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("-obfuscationdictionary \'" + words.toFile().getName() + "\'");
confStrs.add("-injar \'" + Paths.get(".").toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-nonObf.jar\'"); confStrs.add("-injar \'" + srv.dir.toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-nonObf.jar\'");
confStrs.add("-outjar \'" + Paths.get(".").toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + ".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("-classobfuscationdictionary \'" + words.toFile().getName() + "\'");
confStrs.add(readConf()); confStrs.add(readConf());

View file

@ -119,7 +119,7 @@ private static ZipEntry newGuardEntry(String fileName) {
public JARLauncherBinary(LaunchServer server) throws IOException { public JARLauncherBinary(LaunchServer server) throws IOException {
super(server, server.dir.resolve(server.config.binaryName + "-nonObf.jar"), 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); runtimeDir = server.dir.resolve(Launcher.RUNTIME_DIR);
guardDir = server.dir.resolve("guard"); guardDir = server.dir.resolve("guard");
initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE); initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE);