summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/ConvertMain.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cuchaz/enigma/ConvertMain.java')
-rw-r--r--src/main/java/cuchaz/enigma/ConvertMain.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/cuchaz/enigma/ConvertMain.java b/src/main/java/cuchaz/enigma/ConvertMain.java
index 67baeae..1890aef 100644
--- a/src/main/java/cuchaz/enigma/ConvertMain.java
+++ b/src/main/java/cuchaz/enigma/ConvertMain.java
@@ -63,7 +63,7 @@ public class ConvertMain {
63 editFieldMatches(sourceJar, destJar, outMappingsFile, mappings, classMatchesFile, fieldMatchesFile); 63 editFieldMatches(sourceJar, destJar, outMappingsFile, mappings, classMatchesFile, fieldMatchesFile);
64 convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile); 64 convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile);
65 } else if (command.equalsIgnoreCase("computeMethodMatches")) { 65 } else if (command.equalsIgnoreCase("computeMethodMatches")) {
66 computeMethodMatches(methodMatchesFile, destJar, outMappingsFile, classMatchesFile); 66 computeMethodMatches(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile, methodMatchesFile);
67 convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile, methodMatchesFile); 67 convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile, methodMatchesFile);
68 } else if (command.equalsIgnoreCase("editMethodMatches")) { 68 } else if (command.equalsIgnoreCase("editMethodMatches")) {
69 editMethodMatches(sourceJar, destJar, outMappingsFile, mappings, classMatchesFile, methodMatchesFile); 69 editMethodMatches(sourceJar, destJar, outMappingsFile, mappings, classMatchesFile, methodMatchesFile);
@@ -224,22 +224,26 @@ public class ConvertMain {
224 } 224 }
225 225
226 226
227 private static void computeMethodMatches(File methodMatchesFile, JarFile destJar, File destMappingsFile, File classMatchesFile) 227 private static void computeMethodMatches(File outMappingsFile, JarFile sourceJar, JarFile destJar, Mappings sourceMappings, File classMatchesFile, File fieldMatchesFile, File methodMatchesFile)
228 throws IOException, MappingParseException { 228 throws IOException, MappingParseException {
229 229
230 System.out.println("Reading class matches..."); 230 System.out.println("Reading class matches...");
231 ClassMatches classMatches = MatchesReader.readClasses(classMatchesFile); 231 ClassMatches classMatches = MatchesReader.readClasses(classMatchesFile);
232 System.out.println("Reading mappings..."); 232 System.out.println("Reading dest mappings...");
233 Mappings destMappings = new MappingsEnigmaReader().read(destMappingsFile); 233 Mappings destMappings = new MappingsEnigmaReader().read(outMappingsFile);
234 System.out.println("Indexing dest jar..."); 234 System.out.println("Indexing dest jar...");
235 Deobfuscator destDeobfuscator = new Deobfuscator(destJar); 235 Deobfuscator destDeobfuscator = new Deobfuscator(destJar);
236 System.out.println("Indexing source jar...");
237 Deobfuscator sourceDeobfuscator = new Deobfuscator(sourceJar);
236 238
237 System.out.println("Writing method matches..."); 239 System.out.println("Writing method matches...");
238 240
239 // get the matched and unmatched mappings 241 // get the matched and unmatched mappings
240 MemberMatches<BehaviorEntry> methodMatches = MappingsConverter.computeMemberMatches( 242 MemberMatches<BehaviorEntry> methodMatches = MappingsConverter.computeMethodsMatches(
241 destDeobfuscator, 243 destDeobfuscator,
242 destMappings, 244 destMappings,
245 sourceDeobfuscator,
246 sourceMappings,
243 classMatches, 247 classMatches,
244 MappingsConverter.getMethodDoer() 248 MappingsConverter.getMethodDoer()
245 ); 249 );