summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/CommandMain.java
diff options
context:
space:
mode:
authorGravatar Cuchaz2015-03-30 22:00:54 -0400
committerGravatar Cuchaz2015-03-30 22:00:54 -0400
commit22cac8f1a25c7d34a94bc5e00c56c0532509071f (patch)
tree7b3784fc8eb4936c54ada9e685d551bf294e620b /src/cuchaz/enigma/CommandMain.java
parentfix unintentional compile time transitive dependency on procyon (diff)
downloadenigma-fork-22cac8f1a25c7d34a94bc5e00c56c0532509071f.tar.gz
enigma-fork-22cac8f1a25c7d34a94bc5e00c56c0532509071f.tar.xz
enigma-fork-22cac8f1a25c7d34a94bc5e00c56c0532509071f.zip
add publifier
Diffstat (limited to 'src/cuchaz/enigma/CommandMain.java')
-rw-r--r--src/cuchaz/enigma/CommandMain.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cuchaz/enigma/CommandMain.java b/src/cuchaz/enigma/CommandMain.java
index 74c0191..41528fe 100644
--- a/src/cuchaz/enigma/CommandMain.java
+++ b/src/cuchaz/enigma/CommandMain.java
@@ -58,6 +58,8 @@ public class CommandMain {
58 decompile(args); 58 decompile(args);
59 } else if (command.equalsIgnoreCase("protectify")) { 59 } else if (command.equalsIgnoreCase("protectify")) {
60 protectify(args); 60 protectify(args);
61 } else if (command.equalsIgnoreCase("publify")) {
62 publify(args);
61 } else { 63 } else {
62 throw new IllegalArgumentException("Command not recognized: " + command); 64 throw new IllegalArgumentException("Command not recognized: " + command);
63 } 65 }
@@ -103,6 +105,14 @@ public class CommandMain {
103 deobfuscator.protectifyJar(fileJarOut, new ConsoleProgressListener()); 105 deobfuscator.protectifyJar(fileJarOut, new ConsoleProgressListener());
104 } 106 }
105 107
108 private static void publify(String[] args)
109 throws Exception {
110 File fileJarIn = getReadableFile(getArg(args, 1, "in jar", true));
111 File fileJarOut = getWritableFile(getArg(args, 2, "out jar", true));
112 Deobfuscator deobfuscator = getDeobfuscator(null, new JarFile(fileJarIn));
113 deobfuscator.publifyJar(fileJarOut, new ConsoleProgressListener());
114 }
115
106 private static Deobfuscator getDeobfuscator(File fileMappings, JarFile jar) 116 private static Deobfuscator getDeobfuscator(File fileMappings, JarFile jar)
107 throws Exception { 117 throws Exception {
108 System.out.println("Reading jar..."); 118 System.out.println("Reading jar...");