From 06f5aca2c19d62a04e7e722f46094342feb3ed7a Mon Sep 17 00:00:00 2001 From: Thog Date: Mon, 17 Oct 2016 12:10:54 +0200 Subject: Preparing needed things for the modification --- src/main/java/cuchaz/enigma/ConvertMain.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main/java/cuchaz/enigma/ConvertMain.java') diff --git a/src/main/java/cuchaz/enigma/ConvertMain.java b/src/main/java/cuchaz/enigma/ConvertMain.java index 67baeae..7715003 100644 --- a/src/main/java/cuchaz/enigma/ConvertMain.java +++ b/src/main/java/cuchaz/enigma/ConvertMain.java @@ -63,7 +63,7 @@ public class ConvertMain { editFieldMatches(sourceJar, destJar, outMappingsFile, mappings, classMatchesFile, fieldMatchesFile); convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile); } else if (command.equalsIgnoreCase("computeMethodMatches")) { - computeMethodMatches(methodMatchesFile, destJar, outMappingsFile, classMatchesFile); + computeMethodMatches(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile, methodMatchesFile); convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile, methodMatchesFile); } else if (command.equalsIgnoreCase("editMethodMatches")) { editMethodMatches(sourceJar, destJar, outMappingsFile, mappings, classMatchesFile, methodMatchesFile); @@ -224,15 +224,17 @@ public class ConvertMain { } - private static void computeMethodMatches(File methodMatchesFile, JarFile destJar, File destMappingsFile, File classMatchesFile) + private static void computeMethodMatches(File outMappingsFile, JarFile sourceJar, JarFile destJar, Mappings sourceMappings, File classMatchesFile, File fieldMatchesFile, File methodMatchesFile) throws IOException, MappingParseException { System.out.println("Reading class matches..."); ClassMatches classMatches = MatchesReader.readClasses(classMatchesFile); - System.out.println("Reading mappings..."); - Mappings destMappings = new MappingsEnigmaReader().read(destMappingsFile); + System.out.println("Reading dest mappings..."); + Mappings destMappings = new MappingsEnigmaReader().read(outMappingsFile); System.out.println("Indexing dest jar..."); Deobfuscator destDeobfuscator = new Deobfuscator(destJar); + System.out.println("Indexing source jar..."); + Deobfuscator sourceDeobfuscator = new Deobfuscator(sourceJar); System.out.println("Writing method matches..."); -- cgit v1.2.3 From 17feccc4b5e8a6205a8ddb17b91ef61fcfa2186c Mon Sep 17 00:00:00 2001 From: Thog Date: Mon, 17 Oct 2016 14:37:27 +0200 Subject: Method Converter: Add bytecode matching to match what is identical --- src/main/java/cuchaz/enigma/ConvertMain.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/cuchaz/enigma/ConvertMain.java') diff --git a/src/main/java/cuchaz/enigma/ConvertMain.java b/src/main/java/cuchaz/enigma/ConvertMain.java index 7715003..1890aef 100644 --- a/src/main/java/cuchaz/enigma/ConvertMain.java +++ b/src/main/java/cuchaz/enigma/ConvertMain.java @@ -239,9 +239,11 @@ public class ConvertMain { System.out.println("Writing method matches..."); // get the matched and unmatched mappings - MemberMatches methodMatches = MappingsConverter.computeMemberMatches( + MemberMatches methodMatches = MappingsConverter.computeMethodsMatches( destDeobfuscator, destMappings, + sourceDeobfuscator, + sourceMappings, classMatches, MappingsConverter.getMethodDoer() ); -- cgit v1.2.3