mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-28 19:45:31 +00:00
add custom command line parameters
This commit is contained in:
@@ -81,6 +81,7 @@ import com.jpexs.decompiler.flash.exporters.swf.SwfXmlExporter;
|
||||
import com.jpexs.decompiler.flash.gui.Main;
|
||||
import com.jpexs.decompiler.flash.gui.helpers.CheckResources;
|
||||
import com.jpexs.decompiler.flash.helpers.FileTextWriter;
|
||||
import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin;
|
||||
import com.jpexs.decompiler.flash.importers.AS2ScriptImporter;
|
||||
import com.jpexs.decompiler.flash.importers.AS3ScriptImporter;
|
||||
import com.jpexs.decompiler.flash.importers.BinaryDataImporter;
|
||||
@@ -468,6 +469,11 @@ public class CommandLineArgumentParser {
|
||||
out.println(" ...WARNING: Injected/SWD script filenames may be different than from standard compiler");
|
||||
}
|
||||
|
||||
if (filter == null || filter.equals("custom")) {
|
||||
out.println(" " + (cnt++) + ") -custom <customparameter1> [<customparameter2>]...");
|
||||
out.println(" ...Forwards all parameters after the -custom parameter to the plugins");
|
||||
}
|
||||
|
||||
printCmdLineUsageExamples(out, filter);
|
||||
}
|
||||
|
||||
@@ -701,6 +707,8 @@ public class CommandLineArgumentParser {
|
||||
parseRemoveCharacter(args, true);
|
||||
} else if (command.equals("importscript")) {
|
||||
parseImportScript(args);
|
||||
} else if (command.equals("importscript")) {
|
||||
parseCustom(args);
|
||||
} else if (command.equals("as3compiler")) {
|
||||
ActionScript3Parser.compile(null /*?*/, args.pop(), args.pop(), 0, 0);
|
||||
} else if (nextParam.equals("--debugtool")) {
|
||||
@@ -2490,6 +2498,15 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
}
|
||||
|
||||
private static void parseCustom(Stack<String> args) {
|
||||
String[] customParameters = new String[args.size()];
|
||||
for (int i = 0; i < customParameters.length; i++) {
|
||||
customParameters[i] = args.pop();
|
||||
}
|
||||
|
||||
SWFDecompilerPlugin.customParameters = customParameters;
|
||||
}
|
||||
|
||||
private static void replaceAS2PCode(String text, ASMSource src) throws IOException, InterruptedException {
|
||||
System.out.println("Replace AS1/2 PCode");
|
||||
if (text.trim().startsWith(Helper.hexData)) {
|
||||
|
||||
Reference in New Issue
Block a user