mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 17:00:47 +00:00
Added #2468 Option for -dumpas2 CLI command to use export names (-exportNames option)
This commit is contained in:
@@ -4382,6 +4382,16 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
|
||||
private static void parseDumpAS2(Stack<String> args, String charset) {
|
||||
if (args.isEmpty()) {
|
||||
badArguments("dumpas2");
|
||||
}
|
||||
boolean useExportNames = false;
|
||||
String exportNamesParam = args.pop();
|
||||
if (exportNamesParam.toLowerCase(Locale.ENGLISH).equals("-exportnames")) {
|
||||
useExportNames = true;
|
||||
} else {
|
||||
args.push(exportNamesParam);
|
||||
}
|
||||
if (args.isEmpty()) {
|
||||
badArguments("dumpas2");
|
||||
}
|
||||
@@ -4389,7 +4399,7 @@ public class CommandLineArgumentParser {
|
||||
try {
|
||||
try (StdInAwareFileInputStream is = new StdInAwareFileInputStream(file)) {
|
||||
SWF swf = new SWF(is, Configuration.parallelSpeedUp.get(), charset);
|
||||
Map<String, ASMSource> asms = swf.getASMs(false);
|
||||
Map<String, ASMSource> asms = swf.getASMs(useExportNames);
|
||||
for (String as2 : asms.keySet()) {
|
||||
System.out.println(as2);
|
||||
}
|
||||
|
||||
@@ -46,8 +46,10 @@ alias /?
|
||||
-dumpSWF <infile>
|
||||
Dump list of SWF tags to console.
|
||||
|
||||
-dumpAS2 <infile>
|
||||
-dumpAS2 [-exportNames] <infile>
|
||||
Dump list of AS1/2 scripts to console.
|
||||
Use -exportNames option to print names in export format
|
||||
(used in -replace command etc.)
|
||||
|
||||
-dumpAS3 <infile>
|
||||
Dump list of AS3 scripts to console.
|
||||
|
||||
Reference in New Issue
Block a user