mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 22:40:49 +00:00
Merge origin/master
Conflicts: libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/GetterAVM2Item.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/MethodAVM2Item.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SetterAVM2Item.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java
This commit is contained in:
@@ -83,6 +83,7 @@ import com.jpexs.decompiler.flash.importers.BinaryDataImporter;
|
||||
import com.jpexs.decompiler.flash.importers.ImageImporter;
|
||||
import com.jpexs.decompiler.flash.importers.ShapeImporter;
|
||||
import com.jpexs.decompiler.flash.importers.SwfXmlImporter;
|
||||
import com.jpexs.decompiler.flash.importers.TextImporter;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBitsJPEG2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBitsJPEG3Tag;
|
||||
@@ -95,8 +96,11 @@ import com.jpexs.decompiler.flash.tags.base.ButtonTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterIdTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ImageTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.MissingCharacterHandler;
|
||||
import com.jpexs.decompiler.flash.tags.base.ShapeTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.SoundTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.TextImportErrorHandler;
|
||||
import com.jpexs.decompiler.flash.tags.base.TextTag;
|
||||
import com.jpexs.decompiler.flash.treeitems.SWFList;
|
||||
import com.jpexs.decompiler.flash.types.ColorTransform;
|
||||
import com.jpexs.decompiler.flash.types.RECT;
|
||||
@@ -107,6 +111,7 @@ import com.jpexs.helpers.CancellableWorker;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import com.jpexs.helpers.Path;
|
||||
import com.jpexs.helpers.streams.SeekableInputStream;
|
||||
import com.jpexs.helpers.utf8.Utf8Helper;
|
||||
import com.sun.jna.Platform;
|
||||
import com.sun.jna.platform.win32.Kernel32;
|
||||
import gnu.jpdf.PDFJob;
|
||||
@@ -159,7 +164,8 @@ public class CommandLineArgumentParser {
|
||||
Configuration.parallelSpeedUp,
|
||||
Configuration.internalFlashViewer,
|
||||
Configuration.autoDeobfuscate,
|
||||
Configuration.cacheOnDisk
|
||||
Configuration.cacheOnDisk,
|
||||
Configuration.overwriteExistingFiles
|
||||
};
|
||||
|
||||
public static boolean isCommandLineMode() {
|
||||
@@ -316,7 +322,7 @@ public class CommandLineArgumentParser {
|
||||
out.println(" " + (cnt++) + ") -zoom <N>");
|
||||
out.println(" ...apply zoom during export (currently for FlashPaper conversion only)");
|
||||
out.println(" " + (cnt++) + ") -replace <infile> <outfile> (<characterId1>|<scriptName1>) <importDataFile1> [methodBodyIndex1] [(<characterId2>|<scriptName2>) <importDataFile2> [methodBodyIndex2]]...");
|
||||
out.println(" ...replaces the data of the specified BinaryData, Image, DefineSound tag or Script");
|
||||
out.println(" ...replaces the data of the specified BinaryData, Image, Text, DefineSound tag or Script");
|
||||
out.println(" ...methodBodyIndexN parameter should be specified if and only if the imported entity is an AS3 P-Code");
|
||||
out.println(" " + (cnt++) + ") -replaceAlpha <infile> <outfile> <imageId1> <importDataFile1> [<imageId2> <importDataFile2>]...");
|
||||
out.println(" ...replaces the alpha channel of the specified JPEG3 or JPEG4 tag");
|
||||
@@ -579,9 +585,6 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
String key = cp[0];
|
||||
String value = cp[1];
|
||||
if (key.toLowerCase().equals("paralelSpeedUp".toLowerCase())) {
|
||||
key = "parallelSpeedUp";
|
||||
}
|
||||
for (ConfigurationItem<Boolean> item : commandlineConfigBoolean) {
|
||||
if (key.toLowerCase().equals(item.getName().toLowerCase())) {
|
||||
Boolean bValue = parseBooleanConfigValue(value);
|
||||
@@ -1039,6 +1042,8 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
String[] validExportItems = new String[]{
|
||||
"script",
|
||||
"script_as2",
|
||||
"script_as3",
|
||||
"image",
|
||||
"shape",
|
||||
"morphshape",
|
||||
@@ -1282,7 +1287,10 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
|
||||
ScriptExportSettings scriptExportSettings = new ScriptExportSettings(enumFromStr(formats.get("script"), ScriptExportMode.class), singleScriptFile);
|
||||
if (exportAll || exportFormats.contains("script")) {
|
||||
boolean exportAllScript = exportAll || exportFormats.contains("script");
|
||||
boolean exportAs2Script = exportAllScript || exportFormats.contains("script_as2");
|
||||
boolean exportAs3Script = exportAllScript || exportFormats.contains("script_as3");
|
||||
if (exportAs2Script || exportAs3Script) {
|
||||
System.out.println("Exporting scripts...");
|
||||
if (as3classes.isEmpty()) {
|
||||
as3classes = parseSelectClassOld(args);
|
||||
@@ -1298,7 +1306,7 @@ public class CommandLineArgumentParser {
|
||||
exportOK = swf.exportAS3Class(as3class, scriptsFolder, scriptExportSettings, parallel, evl) && exportOK;
|
||||
}
|
||||
} else {
|
||||
exportOK = swf.exportActionScript(handler, scriptsFolder, scriptExportSettings, parallel, evl) != null && exportOK;
|
||||
exportOK = swf.exportActionScript(handler, scriptsFolder, scriptExportSettings, parallel, evl, exportAs2Script, exportAs3Script) != null && exportOK;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1398,7 +1406,7 @@ public class CommandLineArgumentParser {
|
||||
inFile.delete();
|
||||
tmpFile.renameTo(inFile);
|
||||
tmpFile = null;
|
||||
System.out.println("" + inFile + " overwritten.");
|
||||
System.out.println(inFile + " overwritten.");
|
||||
}
|
||||
System.out.println("OK");
|
||||
} catch (FileNotFoundException ex) {
|
||||
@@ -1788,6 +1796,24 @@ public class CommandLineArgumentParser {
|
||||
} else if (characterTag instanceof ShapeTag) {
|
||||
ShapeTag shapeTag = (ShapeTag) characterTag;
|
||||
new ShapeImporter().importImage(shapeTag, data);
|
||||
} else if (characterTag instanceof TextTag) {
|
||||
TextTag textTag = (TextTag) characterTag;
|
||||
new TextImporter(new MissingCharacterHandler(), new TextImportErrorHandler() {
|
||||
|
||||
@Override
|
||||
public boolean handle(TextTag textTag) {
|
||||
String msg = "Error during text import.";
|
||||
logger.log(Level.SEVERE, msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(TextTag textTag, String message, long line) {
|
||||
String msg = "Error during text import: %text% on line %line%".replace("%text%", message).replace("%line%", Long.toString(line));
|
||||
logger.log(Level.SEVERE, msg);
|
||||
return false;
|
||||
}
|
||||
}).importText(textTag, new String(data, Utf8Helper.charset));
|
||||
} else if (characterTag instanceof SoundTag) {
|
||||
SoundTag st = (SoundTag) characterTag;
|
||||
int soundFormat = SoundFormat.FORMAT_UNCOMPRESSED_LITTLE_ENDIAN;
|
||||
|
||||
@@ -1244,7 +1244,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
|
||||
Main.startWork(translate("work.exporting") + " " + (i + 1) + "/" + as3scripts.size() + " " + tls.getPath() + " ...", null);
|
||||
ret.add(tls.export(scriptsFolder, scriptExportSettings, parallel));
|
||||
File file = tls.getExportFile(scriptsFolder, scriptExportSettings);
|
||||
ret.add(tls.export(file, scriptExportSettings, parallel));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1981,12 +1982,12 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
private final ConfigurationItem<Boolean> showAgainInvalidText = new ConfigurationItem<>("showAgainInvalidText", true, true);
|
||||
|
||||
private String getTextTagInfo(TextTag textTag) {
|
||||
String ret = "";
|
||||
StringBuilder ret = new StringBuilder();
|
||||
if (textTag != null) {
|
||||
ret += " TextId: " + textTag.getCharacterId() + " (" + String.join(", ", textTag.getTexts()) + ")";
|
||||
ret.append(" TextId: ").append(textTag.getCharacterId()).append(" (").append(String.join(", ", textTag.getTexts())).append(")");
|
||||
}
|
||||
|
||||
return ret;
|
||||
return ret.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -480,7 +480,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<ABC
|
||||
}
|
||||
}
|
||||
|
||||
return decompiledTextArea.getLocalDeclarationOfPos(pos, new Reference<>("")) != -1;
|
||||
return decompiledTextArea.getLocalDeclarationOfPos(pos, new Reference<>(null)) != -1;
|
||||
}
|
||||
|
||||
private void gotoDeclaration(int pos) {
|
||||
@@ -525,7 +525,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<ABC
|
||||
}
|
||||
}
|
||||
|
||||
int dpos = decompiledTextArea.getLocalDeclarationOfPos(pos, new Reference<>(""));
|
||||
int dpos = decompiledTextArea.getLocalDeclarationOfPos(pos, new Reference<>(null));
|
||||
if (dpos > -1) {
|
||||
decompiledTextArea.setCaretPosition(dpos);
|
||||
}
|
||||
@@ -626,7 +626,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<ABC
|
||||
ClassesListTreeModel clModel = (ClassesListTreeModel) scriptsNode;
|
||||
ScriptPack pack = null;
|
||||
for (ScriptPack item : clModel.getList()) {
|
||||
if (!pack.isSimple && Configuration.ignoreCLikePackages.get()) {
|
||||
if (!item.isSimple && Configuration.ignoreCLikePackages.get()) {
|
||||
continue;
|
||||
}
|
||||
ClassPath classPath = item.getClassPath();
|
||||
|
||||
@@ -24,9 +24,9 @@ import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.gui.AppStrings;
|
||||
import com.jpexs.decompiler.flash.timeline.AS3Package;
|
||||
import com.jpexs.decompiler.flash.treeitems.AS3ClassTreeItem;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
import javax.swing.event.TreeModelEvent;
|
||||
import javax.swing.event.TreeModelListener;
|
||||
import javax.swing.tree.TreeModel;
|
||||
@@ -81,17 +81,16 @@ public class ClassesListTreeModel extends AS3ClassTreeItem implements TreeModel
|
||||
continue;
|
||||
}
|
||||
|
||||
String packageStr = item.getClassPath().packageStr;
|
||||
DottedChain packageStr = item.getClassPath().packageStr;
|
||||
AS3Package pkg = ensurePackage(packageStr);
|
||||
pkg.addScriptPack(item);
|
||||
}
|
||||
}
|
||||
|
||||
private AS3Package ensurePackage(String packageStr) {
|
||||
StringTokenizer st = new StringTokenizer(packageStr, ".");
|
||||
private AS3Package ensurePackage(DottedChain packageStr) {
|
||||
AS3Package parent = root;
|
||||
while (st.hasMoreTokens()) {
|
||||
String pathElement = st.nextToken();
|
||||
for (int i = 0; i < packageStr.size(); i++) {
|
||||
String pathElement = packageStr.get(i);
|
||||
AS3Package pkg = parent.getSubPackage(pathElement);
|
||||
if (pkg == null) {
|
||||
pkg = new AS3Package(pathElement, swf);
|
||||
|
||||
@@ -41,6 +41,7 @@ import com.jpexs.decompiler.flash.helpers.hilight.HighlightData;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightSpecialType;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.Highlighting;
|
||||
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import java.awt.Point;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -250,7 +251,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
return getMultinameAtPos(getCaretPosition());
|
||||
}
|
||||
|
||||
public int getLocalDeclarationOfPos(int pos, Reference<String> type) {
|
||||
public int getLocalDeclarationOfPos(int pos, Reference<DottedChain> type) {
|
||||
Highlighting sh = Highlighting.searchPos(specialHighlights, pos);
|
||||
Highlighting h = Highlighting.searchPos(highlights, pos);
|
||||
|
||||
@@ -275,7 +276,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
Highlighting ch = Highlighting.searchPos(classHighlights, pos);
|
||||
int cindex = (int) ch.getProperties().index;
|
||||
ABC abc = getABC();
|
||||
type.setVal(abc.instance_info.get(cindex).getName(abc.constants).getNameWithNamespace(abc.constants).toString());
|
||||
type.setVal(abc.instance_info.get(cindex).getName(abc.constants).getNameWithNamespace(abc.constants));
|
||||
return ch.startPos;
|
||||
}
|
||||
|
||||
@@ -329,15 +330,15 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
if (t.type != TokenType.IDENTIFIER && t.type != TokenType.KEYWORD || t.type == TokenType.REGEX) {
|
||||
return false;
|
||||
}
|
||||
Reference<String> locTypeRef = new Reference<>("");
|
||||
Reference<DottedChain> locTypeRef = new Reference<>(DottedChain.EMPTY);
|
||||
getLocalDeclarationOfPos(t.start, locTypeRef);
|
||||
String currentType = locTypeRef.getVal();
|
||||
if (currentType.equals("*")) {
|
||||
DottedChain currentType = locTypeRef.getVal();
|
||||
if (currentType.equals(DottedChain.ALL)) {
|
||||
return false;
|
||||
}
|
||||
boolean found;
|
||||
t = sd.getNextToken(t);
|
||||
while (t != lastToken && !currentType.equals("*")) {
|
||||
while (t != lastToken && !currentType.equals(DottedChain.ALL)) {
|
||||
t = sd.getNextToken(t);
|
||||
String ident = t.getString(sd);
|
||||
found = false;
|
||||
@@ -350,13 +351,13 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
InstanceInfo ii = a.instance_info.get(cindex);
|
||||
for (int j = 0; j < ii.instance_traits.traits.size(); j++) {
|
||||
Trait tr = ii.instance_traits.traits.get(j);
|
||||
if (ident.equals(tr.getName(a).getName(a.constants, new ArrayList<>(), false /*NOT RAW!*/))) {
|
||||
if (ident.equals(tr.getName(a).getName(a.constants, null, false /*NOT RAW!*/))) {
|
||||
classIndex.setVal(cindex);
|
||||
abcIndex.setVal(i);
|
||||
traitIndex.setVal(j);
|
||||
classTrait.setVal(false);
|
||||
multinameIndex.setVal(tr.name_index);
|
||||
currentType = ii.getName(a.constants).getNameWithNamespace(a.constants).toString();
|
||||
currentType = ii.getName(a.constants).getNameWithNamespace(a.constants);
|
||||
found = true;
|
||||
break loopi;
|
||||
}
|
||||
@@ -365,13 +366,13 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
ClassInfo ci = a.class_info.get(cindex);
|
||||
for (int j = 0; j < ci.static_traits.traits.size(); j++) {
|
||||
Trait tr = ci.static_traits.traits.get(j);
|
||||
if (ident.equals(tr.getName(a).getName(a.constants, new ArrayList<>(), false /*NOT RAW!*/))) {
|
||||
if (ident.equals(tr.getName(a).getName(a.constants, null, false /*NOT RAW!*/))) {
|
||||
classIndex.setVal(cindex);
|
||||
abcIndex.setVal(i);
|
||||
traitIndex.setVal(j);
|
||||
classTrait.setVal(true);
|
||||
multinameIndex.setVal(tr.name_index);
|
||||
currentType = ii.getName(a.constants).getNameWithNamespace(a.constants).toString();
|
||||
currentType = ii.getName(a.constants).getNameWithNamespace(a.constants);
|
||||
found = true;
|
||||
break loopi;
|
||||
}
|
||||
@@ -520,7 +521,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
if (tm != null) {
|
||||
String name = "";
|
||||
if (classIndex > -1) {
|
||||
name = abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc.constants).toPrintableString();
|
||||
name = abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc.constants).toPrintableString(true);
|
||||
}
|
||||
|
||||
Trait currentTrait = null;
|
||||
@@ -531,7 +532,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
currentTrait = getCurrentTrait();
|
||||
isStatic = abc.isStaticTraitId(classIndex, lastTraitIndex);
|
||||
if (currentTrait != null) {
|
||||
name += ":" + currentTrait.getName(abc).getName(abc.constants, new ArrayList<>(), false);
|
||||
name += ":" + currentTrait.getName(abc).getName(abc.constants, null, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -571,11 +572,11 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
}
|
||||
currentMethodHighlight = null;
|
||||
currentTrait = null;
|
||||
String name = abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc.constants).toPrintableString();
|
||||
String name = abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc.constants).toPrintableString(true);
|
||||
currentTrait = getCurrentTrait();
|
||||
isStatic = abc.isStaticTraitId(classIndex, lastTraitIndex);
|
||||
if (currentTrait != null) {
|
||||
name += ":" + currentTrait.getName(abc).getName(abc.constants, new ArrayList<>(), false);
|
||||
name += ":" + currentTrait.getName(abc).getName(abc.constants, null, false);
|
||||
}
|
||||
|
||||
displayMethod(pos, abc.findMethodIdByTraitId(classIndex, lastTraitIndex), name, currentTrait, isStatic);
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.awt.CardLayout;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.JButton;
|
||||
@@ -188,7 +187,7 @@ public class DetailPanel extends JPanel implements TagEditorPanel {
|
||||
traitNameLabel.setText("-");
|
||||
} else {
|
||||
if (abcPanel != null) {
|
||||
traitNameLabel.setText(trait.getName(abcPanel.abc).getName(abcPanel.abc.constants, new ArrayList<>(), false));
|
||||
traitNameLabel.setText(trait.getName(abcPanel.abc).getName(abcPanel.abc.constants, null, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,9 +77,9 @@ public class TraitsListItem {
|
||||
|
||||
public String toStringName() {
|
||||
if ((type != Type.INITIALIZER) && isStatic) {
|
||||
return abc.class_info.get(classIndex).static_traits.traits.get(index).getName(abc).getName(abc.constants, new ArrayList<>(), false);
|
||||
return abc.class_info.get(classIndex).static_traits.traits.get(index).getName(abc).getName(abc.constants, null, false);
|
||||
} else if ((type != Type.INITIALIZER) && (!isStatic)) {
|
||||
return abc.instance_info.get(classIndex).instance_traits.traits.get(index).getName(abc).getName(abc.constants, new ArrayList<>(), false);
|
||||
return abc.instance_info.get(classIndex).instance_traits.traits.get(index).getName(abc).getName(abc.constants, null, false);
|
||||
} else if (!isStatic) {
|
||||
return "__" + STR_INSTANCE_INITIALIZER;
|
||||
} else {
|
||||
|
||||
@@ -92,7 +92,7 @@ public class UsageFrame extends AppDialog implements MouseListener {
|
||||
cont.add(new JScrollPane(usageList), BorderLayout.CENTER);
|
||||
cont.add(buttonsPanel, BorderLayout.SOUTH);
|
||||
setSize(400, 300);
|
||||
setTitle((definitions ? translate("dialog.title.declaration") : translate("dialog.title")) + abc.constants.getMultiname(multinameIndex).getNameWithNamespace(abc.constants).toPrintableString());
|
||||
setTitle((definitions ? translate("dialog.title.declaration") : translate("dialog.title")) + abc.constants.getMultiname(multinameIndex).getNameWithNamespace(abc.constants).toPrintableString(true));
|
||||
View.centerScreen(this);
|
||||
View.setWindowIcon(this);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class UsageFrame extends AppDialog implements MouseListener {
|
||||
settrait.run();
|
||||
} else {
|
||||
abcPanel.decompiledTextArea.addScriptListener(settrait);
|
||||
abcPanel.hilightScript(abcPanel.getSwf(), abcPanel.abc.instance_info.get(icu.classIndex).getName(abcPanel.abc.constants).getNameWithNamespace(abcPanel.abc.constants).toPrintableString());
|
||||
abcPanel.hilightScript(abcPanel.getSwf(), abcPanel.abc.instance_info.get(icu.classIndex).getName(abcPanel.abc.constants).getNameWithNamespace(abcPanel.abc.constants).toPrintableString(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.jpexs.decompiler.flash.gui.abc.tablemodels;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.event.TableModelListener;
|
||||
import javax.swing.table.TableModel;
|
||||
|
||||
@@ -128,7 +127,7 @@ public class MultinameTableModel implements TableModel {
|
||||
if (abc.constants.getMultiname(rowIndex).name_index == -1) {
|
||||
return "";
|
||||
}
|
||||
return abc.constants.getMultiname(rowIndex).getName(abc.constants, new ArrayList<>(), true);
|
||||
return abc.constants.getMultiname(rowIndex).getName(abc.constants, null, true);
|
||||
case 3:
|
||||
if (rowIndex == 0) {
|
||||
return "";
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.gui.abc.tablemodels;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import javax.swing.event.TableModelListener;
|
||||
import javax.swing.table.TableModel;
|
||||
|
||||
@@ -124,11 +125,11 @@ public class NamespaceTableModel implements TableModel {
|
||||
if (rowIndex == 0) {
|
||||
return "-";
|
||||
}
|
||||
String val = abc.constants.getNamespace(rowIndex).getName(abc.constants, true);
|
||||
if (val == null) {
|
||||
val = "-";
|
||||
DottedChain chain = abc.constants.getNamespace(rowIndex).getName(abc.constants);
|
||||
if (chain == null) {
|
||||
return "-";
|
||||
}
|
||||
return val;
|
||||
return chain.toRawString();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DebuggerTools {
|
||||
for (ABCContainerTag ac : swf.getAbcList()) {
|
||||
ABC a = ac.getABC();
|
||||
for (ScriptPack m : a.getScriptPacks(DEBUGGER_PACKAGE, allAbcList)) {
|
||||
if (isDebuggerClass(m.getClassPath().packageStr, null)) {
|
||||
if (isDebuggerClass(m.getClassPath().packageStr.toRawString(), null)) {
|
||||
return m;
|
||||
}
|
||||
}
|
||||
@@ -87,13 +87,13 @@ public class DebuggerTools {
|
||||
|
||||
public static void replaceTraceCalls(SWF swf, String fname) {
|
||||
if (hasDebugger(swf)) {
|
||||
String debuggerPkg = getDebuggerScriptPack(swf).getClassPath().packageStr;
|
||||
String debuggerPkg = getDebuggerScriptPack(swf).getClassPath().packageStr.toRawString();
|
||||
//change trace to fname
|
||||
for (ABCContainerTag ct : swf.getAbcList()) {
|
||||
ABC a = ct.getABC();
|
||||
for (int i = 1; i < a.constants.constant_multiname.size(); i++) {
|
||||
Multiname m = a.constants.constant_multiname.get(i);
|
||||
if ("trace".equals(m.getNameWithNamespace(a.constants).toString())) {
|
||||
if ("trace".equals(m.getNameWithNamespace(a.constants).toRawString())) {
|
||||
m.namespace_index = a.constants.getNamespaceId(new Namespace(Namespace.KIND_PACKAGE, a.constants.getStringId(debuggerPkg, true)), 0, true);
|
||||
m.name_index = a.constants.getStringId(fname, true);
|
||||
((Tag) ct).setModified(true);
|
||||
|
||||
@@ -369,3 +369,5 @@ config.description.deobfuscationOldMode = Disable new deobfuscation and use the
|
||||
config.name.ignoreCLikePackages = Ignore FlashCC / Alchemy or similar packages
|
||||
config.description.ignoreCLikePackages = FlashCC/Alchemy packages cannot usually be decompiled correctly. You can disable them to speedup other packages decompilation.
|
||||
|
||||
config.name.overwriteExistingFiles = Overwrite the existing files
|
||||
config.description.overwriteExistingFiles = Overwrite the existing files during export. Currently only for AS2/3 scripts
|
||||
|
||||
@@ -365,3 +365,9 @@ config.description.exeExportMode = EXE export m\u00f3d
|
||||
|
||||
config.name.deobfuscationOldMode = Kapcsol\u00f3 a r\u00e9gi (5.x) deobfuszk\u00e1l\u00e1si m\u00f3d haszn\u00e1lat\u00e1hoz
|
||||
config.description.deobfuscationOldMode = Kikapcsolja az \u00faj deobfuszk\u00e1l\u00e1si m\u00f3dot \u00e9s az el\u0151z\u0151 verzi\u00f3kban l\u00e9v\u0151 m\u00f3dot haszn\u00e1lja. NEM AJ\u00c1NLOTT.
|
||||
|
||||
config.name.ignoreCLikePackages = FlashCC / Alchemy vagy hasonl\u00f3 csomagok figyelmen k\u00edv\u00fcl hagy\u00e1sa
|
||||
config.description.ignoreCLikePackages = FlashCC/Alchemy csomagok \u00e1ltal\u00e1ban nem ford\u00edthat\u00f3ak vissza hib\u00e1tlanul. Kikapcsolhatod hogy gyorsabban visszaford\u00edtsa a t\u00f6bbi csomagot.
|
||||
|
||||
config.name.overwriteExistingFiles = L\u00e9tez\u0151 f\u00e1jlok fel\u00fcl\u00edr\u00e1sa
|
||||
config.description.overwriteExistingFiles = Fel\u00fcl\u00edrja a l\u00e9tez\u0151 f\u00e1jlokat export\u00e1l\u00e1s sor\u00e1n. Jelenleg csak az AS2/3 szkriptekre \u00e9rv\u00e9nyes
|
||||
|
||||
Reference in New Issue
Block a user