Option to export script (AS1/2) as Graphviz P-code

This commit is contained in:
Jindra Petřík
2018-02-04 09:16:13 +01:00
parent 7ee96beead
commit d5c814f79f
6 changed files with 17 additions and 4 deletions

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.exporters.modes;
/**
@@ -23,7 +24,8 @@ public enum ScriptExportMode {
AS,
PCODE,
PCODE_HEX,
PCODE_GRAPHVIZ,
HEX,
CONSTANTS, // AS1/2 ConstantPool
CONSTANTS, // AS1/2 ConstantPool
AS_METHOD_STUBS
}

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.exporters.script;
import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler;
@@ -98,6 +99,8 @@ public class ExportScriptTask implements Callable<File> {
asm.getActionSourcePrefix(writer2);
asm.getActionBytesAsHex(writer2);
asm.getActionSourceSuffix(writer2);
} else if (exportMode == ScriptExportMode.PCODE_GRAPHVIZ) {
new PcodeGraphVizExporter().export(asm, writer2);
} else if (exportMode != ScriptExportMode.AS) {
asm.getActionSourcePrefix(writer2);
asm.getASMSource(exportMode, writer2, null);

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.exporters.settings;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
@@ -42,6 +43,8 @@ public class ScriptExportSettings {
case AS:
case AS_METHOD_STUBS:
return ".as";
case PCODE_GRAPHVIZ:
return ".gv";
case PCODE:
case PCODE_HEX:
return ".pcode";

View File

@@ -46,6 +46,7 @@ scripts.pcode_hex = P-code with Hex
scripts.hex = Hex
scripts.constants = Constants
scripts.as_method_stubs = ActionScript method stubs
scripts.pcode_graphviz = P-code GraphViz
binaryData = Binary data
binaryData.raw = Raw

View File

@@ -42,6 +42,7 @@ scripts = Skripty
scripts.as = ActionScript
scripts.pcode = P-k\u00f3d
scripts.pcode_hex = P-k\u00f3d s hex
scripts.pcode_graphviz = P-k\u00f3d GraphViz
scripts.hex = Hex
scripts.constants = Konstanty

View File

@@ -772,3 +772,6 @@ message.font.setadvancevalues = This operation will set advance of ALL character
menu.tools.deobfuscation.renameColliding = Rename colliding traits/classes
filter.iggy = Iggy files (*.iggy)
#after 11.0.0
button.copygraph = Copy GraphViz to ClipBoard