diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 1247f512..ab0e7afc 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -105,8 +105,6 @@ public static final class Config extends ConfigObject { public final String projectName; public final String whitelistRejectString; - - public final boolean genMappings; public final boolean isUsingWrapper; public final boolean isDownloadJava; @@ -150,7 +148,6 @@ private Config(BlockConfigEntry block, Path coredir, LaunchServer server) { block.getEntry("hwidHandlerConfig", BlockConfigEntry.class)); // Set misc config - genMappings = block.getEntryValue("proguardPrintMappings", BooleanConfigEntry.class); mirrors = block.getEntry("mirrors", ListConfigEntry.class); launch4j = new ExeConf(block.getEntry("launch4J", BlockConfigEntry.class)); buildPostTransform = new PostBuildTransformConf(block.getEntry("buildExtendedOperation", BlockConfigEntry.class), coredir); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java b/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java index 29e38b60..d4a52adf 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java @@ -38,7 +38,7 @@ public ProguardConf(LaunchServer srv) { words = proguard.resolve("random.pro"); confStrs = new ArrayList<>(); prepare(false); - if (srv.config.genMappings) confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'"); + 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\'"); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/BuildHookManager.java b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/BuildHookManager.java index 0a449d24..983f5ac7 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/BuildHookManager.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/BuildHookManager.java @@ -154,10 +154,6 @@ public void registerProGuardHook(Transformer hook) { POST_PROGUARD_HOOKS.add(hook); } - public boolean isNeedPostProguardHook() { - return POST_PROGUARD_HOOKS.size() > 1 || !POST_PROGUARDRUN_HOOKS.isEmpty() || !POST_PROGUARD_BUILDHOOKS.isEmpty() || !proguardNoder.getTransLst().isEmpty(); - } - public void registerPreHook(BuildHook hook) { PRE_HOOKS.add(hook); } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/NodeTransformer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/NodeTransformer.java index 3f713df9..e5a56bb8 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/NodeTransformer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/NodeTransformer.java @@ -31,9 +31,9 @@ public NodeTransformer() { public byte[] transform(byte[] input, String classname, JARLauncherBinary data) { ClassReader cr = new ClassReader(input); ClassNode cn = new ClassNode(); - cr.accept(cn, ClassReader.SKIP_DEBUG); + cr.accept(cn, ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES); for (ClassNodeTransformer tr : transLst) tr.transform(cn, classname, data); - ClassWriter cw = new SafeClassWriter(data.reader, ClassWriter.COMPUTE_MAXS); + ClassWriter cw = new SafeClassWriter(data.reader, ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES); cn.accept(cw); return cw.toByteArray(); } diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg index 954f8d01..00249256 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg @@ -13,9 +13,6 @@ isDownloadJava: false; # White list testers whitelistRejectString: "Вас нет в белом списке"; -# Proguard -proguardPrintMappings: false; - # Auth handler authHandler: "textFile"; authHandlerConfig: {