From b8d8b328d9ce983d71b63c02ac47ea17af6146d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sat, 10 Aug 2013 18:58:00 +0200 Subject: [PATCH] Issue #287 Typo paralel => parallel --- .../jpexs/decompiler/flash/Configuration.java | 11 ++++ trunk/src/com/jpexs/decompiler/flash/SWF.java | 42 ++++++------ .../decompiler/flash/SWFInputStream.java | 66 ++++++++++--------- .../com/jpexs/decompiler/flash/abc/ABC.java | 8 +-- .../decompiler/flash/abc/ScriptPack.java | 6 +- .../flash/abc/types/ScriptInfo.java | 4 +- .../flash/abc/types/traits/Trait.java | 14 ++-- .../flash/abc/types/traits/TraitClass.java | 8 +-- .../flash/abc/types/traits/TraitFunction.java | 6 +- .../types/traits/TraitMethodGetterSetter.java | 6 +- .../abc/types/traits/TraitSlotConst.java | 2 +- .../flash/abc/types/traits/Traits.java | 16 ++--- .../com/jpexs/decompiler/flash/gui/Main.java | 36 +++++----- .../jpexs/decompiler/flash/gui/MainFrame.java | 12 ++-- .../flash/gui/abc/DecompiledEditorPane.java | 2 +- .../flash/gui/locales/MainFrame_cs.properties | 6 +- .../flash/tags/DefineSpriteTag.java | 6 +- .../decompiler/flash/xfl/XFLConverter.java | 4 +- 18 files changed, 138 insertions(+), 117 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/Configuration.java b/trunk/src/com/jpexs/decompiler/flash/Configuration.java index c988409d6..5de9939b9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/Configuration.java +++ b/trunk/src/com/jpexs/decompiler/flash/Configuration.java @@ -119,8 +119,15 @@ public class Configuration { } public static Object setConfig(String cfg, Object value) { + if(cfg.equals("paralelSpeedUp")){ + cfg = "parallelSpeedUp"; + } return config.put(cfg, value); } + + public static void unsetConfig(String cfg){ + config.remove(cfg); + } public static void loadFromMap(Map map) { config.clear(); @@ -139,6 +146,10 @@ public class Configuration { if (replacementsFile != null) { loadReplacements(replacementsFile); } + if(containsConfig("paralelSpeedUp")){ + setConfig("parallelSpeedUp", getConfig("paralelSpeedUp")); + unsetConfig("paralelSpeedUp"); + } } public static void saveToFile(String file, String replacementsFile) { diff --git a/trunk/src/com/jpexs/decompiler/flash/SWF.java b/trunk/src/com/jpexs/decompiler/flash/SWF.java index dbff47dda..94ceb8d73 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWF.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWF.java @@ -269,8 +269,8 @@ public class SWF { } } - public SWF(InputStream is, boolean paralelRead) throws IOException { - this(is, null, paralelRead); + public SWF(InputStream is, boolean parallelRead) throws IOException { + this(is, null, parallelRead); } /** @@ -278,10 +278,10 @@ public class SWF { * * @param is Stream to read SWF from * @param listener - * @param paralelRead Use parallel threads? + * @param parallelRead Use parallel threads? * @throws IOException */ - public SWF(InputStream is, PercentListener listener, boolean paralelRead) throws IOException { + public SWF(InputStream is, PercentListener listener, boolean parallelRead) throws IOException { byte hdr[] = new byte[3]; is.read(hdr); String shdr = new String(hdr, "utf-8"); @@ -328,7 +328,7 @@ public class SWF { sis.readUI8(); //tmpFirstByetOfFrameRate frameRate = sis.readUI8(); frameCount = sis.readUI16(); - tags = sis.readTagList(this, 0, paralelRead, true); + tags = sis.readTagList(this, 0, parallelRead, true); assignExportNamesToSymbols(); assignClassesToSymbols(); findFileAttributes(); @@ -481,7 +481,7 @@ public class SWF { return true; } - public boolean exportAS3Class(String className, String outdir, boolean isPcode, boolean paralel) throws Exception { + public boolean exportAS3Class(String className, String outdir, boolean isPcode, boolean parallel) throws Exception { List abcTags = new ArrayList<>(); for (Tag t : tags) { @@ -500,7 +500,7 @@ public class SWF { } String exStr = "Exporting " + "tag " + (i + 1) + "/" + abcTags.size() + " " + cnt + scr.getPath() + " ..."; informListeners("export", exStr); - scr.export(outdir, abcTags, isPcode, paralel); + scr.export(outdir, abcTags, isPcode, parallel); return true; } } @@ -545,19 +545,19 @@ public class SWF { ClassPath path; AtomicInteger index; int count; - boolean paralel; + boolean parallel; AbortRetryIgnoreHandler handler; long startTime; long stopTime; - public ExportPackTask(AbortRetryIgnoreHandler handler, AtomicInteger index, int count, ClassPath path, ScriptPack pack, String directory, List abcList, boolean pcode, boolean paralel) { + public ExportPackTask(AbortRetryIgnoreHandler handler, AtomicInteger index, int count, ClassPath path, ScriptPack pack, String directory, List abcList, boolean pcode, boolean parallel) { this.pack = pack; this.directory = directory; this.abcList = abcList; this.path = path; this.index = index; this.count = count; - this.paralel = paralel; + this.parallel = parallel; this.handler = handler; } @@ -567,7 +567,7 @@ public class SWF { @Override public void run() throws IOException { startTime = System.currentTimeMillis(); - this.result = pack.export(directory, abcList, pcode, paralel); + this.result = pack.export(directory, abcList, pcode, parallel); stopTime = System.currentTimeMillis(); } }; @@ -580,7 +580,7 @@ public class SWF { } } - public List exportActionScript2(AbortRetryIgnoreHandler handler, String outdir, boolean isPcode, boolean paralel, EventListener evl) throws IOException { + public List exportActionScript2(AbortRetryIgnoreHandler handler, String outdir, boolean isPcode, boolean parallel, EventListener evl) throws IOException { List ret = new ArrayList<>(); List list2 = new ArrayList<>(); list2.addAll(tags); @@ -595,7 +595,7 @@ public class SWF { return ret; } - public List exportActionScript3(AbortRetryIgnoreHandler handler, String outdir, boolean isPcode, boolean paralel) { + public List exportActionScript3(AbortRetryIgnoreHandler handler, String outdir, boolean isPcode, boolean parallel) { ExecutorService executor = Executors.newFixedThreadPool(20); List> futureResults = new ArrayList<>(); AtomicInteger cnt = new AtomicInteger(1); @@ -607,7 +607,7 @@ public class SWF { } List> packs = getAS3Packs(); for (MyEntry item : packs) { - Future future = executor.submit(new ExportPackTask(handler, cnt, packs.size(), item.key, item.value, outdir, abcTags, isPcode, paralel)); + Future future = executor.submit(new ExportPackTask(handler, cnt, packs.size(), item.key, item.value, outdir, abcTags, isPcode, parallel)); futureResults.add(future); } @@ -629,7 +629,7 @@ public class SWF { return ret; } - public List exportActionScript(AbortRetryIgnoreHandler handler, String outdir, boolean isPcode, boolean paralel) throws Exception { + public List exportActionScript(AbortRetryIgnoreHandler handler, String outdir, boolean isPcode, boolean parallel) throws Exception { boolean asV3Found = false; List ret = new ArrayList<>(); final EventListener evl = new EventListener() { @@ -647,9 +647,9 @@ public class SWF { } if (asV3Found) { - ret.addAll(exportActionScript3(handler, outdir, isPcode, paralel)); + ret.addAll(exportActionScript3(handler, outdir, isPcode, parallel)); } else { - ret.addAll(exportActionScript2(handler, outdir, isPcode, paralel, evl)); + ret.addAll(exportActionScript2(handler, outdir, isPcode, parallel, evl)); } return ret; } @@ -2088,12 +2088,12 @@ public class SWF { return ret; } - public void exportFla(AbortRetryIgnoreHandler handler, String outfile, String swfName, String generator, String generatorVerName, String generatorVersion, boolean paralel) throws IOException { - XFLConverter.convertSWF(handler, this, swfName, outfile, true, generator, generatorVerName, generatorVersion, paralel); + public void exportFla(AbortRetryIgnoreHandler handler, String outfile, String swfName, String generator, String generatorVerName, String generatorVersion, boolean parallel) throws IOException { + XFLConverter.convertSWF(handler, this, swfName, outfile, true, generator, generatorVerName, generatorVersion, parallel); } - public void exportXfl(AbortRetryIgnoreHandler handler, String outfile, String swfName, String generator, String generatorVerName, String generatorVersion, boolean paralel) throws IOException { - XFLConverter.convertSWF(handler, this, swfName, outfile, false, generator, generatorVerName, generatorVersion, paralel); + public void exportXfl(AbortRetryIgnoreHandler handler, String outfile, String swfName, String generator, String generatorVerName, String generatorVersion, boolean parallel) throws IOException { + XFLConverter.convertSWF(handler, this, swfName, outfile, false, generator, generatorVerName, generatorVersion, parallel); } public static float twipToPixel(int twip) { diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index 06f0b3345..37d548adc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -1129,15 +1129,15 @@ public class SWFInputStream extends InputStream { private final Tag tag; private final int version; private final int level; - private boolean paralel; + private boolean parallel; private boolean skipUnusualTags; private SWF swf; - public TagResolutionTask(SWF swf, Tag tag, int version, int level, boolean paralel, boolean skipUnusualTags) { + public TagResolutionTask(SWF swf, Tag tag, int version, int level, boolean parallel, boolean skipUnusualTags) { this.tag = tag; this.version = version; this.level = level; - this.paralel = paralel; + this.parallel = parallel; this.skipUnusualTags = skipUnusualTags; this.swf = swf; } @@ -1145,7 +1145,7 @@ public class SWFInputStream extends InputStream { @Override public Tag call() throws Exception { try { - return SWFInputStream.resolveTag(swf, tag, version, level, paralel, skipUnusualTags); + return SWFInputStream.resolveTag(swf, tag, version, level, parallel, skipUnusualTags); } catch (Exception ex) { return null; } @@ -1158,12 +1158,12 @@ public class SWFInputStream extends InputStream { * * @param swf * @param level - * @param paralel + * @param parallel * @return List of tags * @throws IOException */ - public List readTagList(SWF swf, int level, boolean paralel) throws IOException { - return readTagList(swf, level, paralel, false); + public List readTagList(SWF swf, int level, boolean parallel) throws IOException { + return readTagList(swf, level, parallel, false); } /** @@ -1172,17 +1172,15 @@ public class SWFInputStream extends InputStream { * * @param swf * @param level - * @param paralel + * @param parallel * @param skipUnusualTags * @return List of tags * @throws IOException */ - public List readTagList(SWF swf, int level, boolean paralel, boolean skipUnusualTags) throws IOException { + public List readTagList(SWF swf, int level, boolean parallel, boolean skipUnusualTags) throws IOException { ExecutorService executor = null; - if (paralel) { + if (parallel) { executor = Executors.newFixedThreadPool(20); - } else { - executor = Executors.newFixedThreadPool(1); } List> futureResults = new ArrayList<>(); List tags = new ArrayList<>(); @@ -1192,13 +1190,16 @@ public class SWFInputStream extends InputStream { while (true) { long pos = getPos(); try { - tag = readTag(swf, level, pos, false, paralel, skipUnusualTags); + tag = readTag(swf, level, pos, !parallel, parallel, skipUnusualTags); } catch (EndOfStreamException ex) { tag = null; } if (tag == null) { break; } + if(!parallel){ + tags.add(tag); + } if (Configuration.dump_tags && level == 0) { dumpTag(System.out, version, tag, level); } @@ -1210,7 +1211,7 @@ public class SWFInputStream extends InputStream { } else { switch (tag.getId()) { case FileAttributesTag.ID: //FileAttributes - FileAttributesTag fileAttributes = (FileAttributesTag) resolveTag(swf, tag, version, level, paralel, skipUnusualTags); + FileAttributesTag fileAttributes = (FileAttributesTag) resolveTag(swf, tag, version, level, parallel, skipUnusualTags); if (fileAttributes.actionScript3) { isAS3 = true; } @@ -1249,23 +1250,28 @@ public class SWFInputStream extends InputStream { } if (doParse) { - Future future = executor.submit(new TagResolutionTask(swf, tag, version, level, paralel, skipUnusualTags)); - futureResults.add(future); + if (parallel) { + Future future = executor.submit(new TagResolutionTask(swf, tag, version, level, parallel, skipUnusualTags)); + futureResults.add(future); + } } } - for (Future future : futureResults) { - try { - tags.add(future.get()); - } catch (Exception e) { - Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE, "Error during tag reading", e); + if (parallel) { + for (Future future : futureResults) { + try { + tags.add(future.get()); + } catch (Exception e) { + Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE, "Error during tag reading", e); + } } + + executor.shutdown(); } - executor.shutdown(); return tags; } - public static Tag resolveTag(SWF swf, Tag tag, int version, int level, boolean paralel, boolean skipUnusualTags) { + public static Tag resolveTag(SWF swf, Tag tag, int version, int level, boolean parallel, boolean skipUnusualTags) { Tag ret; byte data[] = tag.getData(version); @@ -1374,7 +1380,7 @@ public class SWFInputStream extends InputStream { break; //case 38: DefineVideo case 39: - ret = new DefineSpriteTag(swf, data, version, level, pos, paralel, skipUnusualTags); + ret = new DefineSpriteTag(swf, data, version, level, pos, parallel, skipUnusualTags); break; //case 40: NameCharacter case 41: @@ -1518,13 +1524,13 @@ public class SWFInputStream extends InputStream { * @param swf * @param level * @param pos - * @param paralel + * @param parallel * @param skipUnusualTags * @return Tag or null when End tag * @throws IOException */ - public Tag readTag(SWF swf, int level, long pos, boolean paralel, boolean skipUnusualTags) throws IOException { - return readTag(swf, level, pos, true, paralel, skipUnusualTags); + public Tag readTag(SWF swf, int level, long pos, boolean parallel, boolean skipUnusualTags) throws IOException { + return readTag(swf, level, pos, true, parallel, skipUnusualTags); } /** @@ -1535,12 +1541,12 @@ public class SWFInputStream extends InputStream { * @param level * @param pos * @param resolve - * @param paralel + * @param parallel * @param skipUnusualTags * @return Tag or null when End tag * @throws IOException */ - public Tag readTag(SWF swf, int level, long pos, boolean resolve, boolean paralel, boolean skipUnusualTags) throws IOException { + public Tag readTag(SWF swf, int level, long pos, boolean resolve, boolean parallel, boolean skipUnusualTags) throws IOException { int tagIDTagLength = readUI16(); int tagID = (tagIDTagLength) >> 6; if (tagID == 0) { @@ -1589,7 +1595,7 @@ public class SWFInputStream extends InputStream { } } if (resolve) { - return resolveTag(swf, ret, version, level, paralel, skipUnusualTags); + return resolveTag(swf, ret, version, level, parallel, skipUnusualTags); } return ret; } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java index 49cb59779..e7bb5dca1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -712,8 +712,8 @@ public class ABC { } } - /*public void export(String directory, boolean pcode, List abcList, boolean paralel) throws IOException { - export(directory, pcode, abcList, "", paralel); + /*public void export(String directory, boolean pcode, List abcList, boolean parallel) throws IOException { + export(directory, pcode, abcList, "", parallel); }*/ public List> getScriptPacks() { List> ret = new ArrayList<>(); @@ -722,14 +722,14 @@ public class ABC { } return ret; } - /*public List export(String directory, boolean pcode, List abcList, String abcStr, boolean paralel) throws IOException { + /*public List export(String directory, boolean pcode, List abcList, String abcStr, boolean parallel) throws IOException { ExecutorService executor = Executors.newFixedThreadPool(20); List> futureResults = new ArrayList<>(); AtomicInteger cnt = new AtomicInteger(1); for (int i = 0; i < script_info.length; i++) { HashMap packs = script_info[i].getPacks(this, i); for (Entry entry : packs.entrySet()) { - Future future = executor.submit(new ExportPackTask(cnt, script_info.length, entry.getKey(), entry.getValue(), directory, abcList, pcode, abcStr, paralel)); + Future future = executor.submit(new ExportPackTask(cnt, script_info.length, entry.getKey(), entry.getValue(), directory, abcList, pcode, abcStr, parallel)); futureResults.add(future); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index 2ba0b8a52..fe6db15fc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -101,7 +101,7 @@ public class ScriptPack { return Helper.joinStrings(pathParts, File.separator); } - public File export(String directory, List abcList, boolean pcode, boolean paralel) throws IOException { + public File export(String directory, List abcList, boolean pcode, boolean parallel) throws IOException { String scriptName = getPathScriptName(); String packageName = getPathPackage(); File outDir = new File(directory + File.separatorChar + makeDirPath(packageName)); @@ -119,9 +119,9 @@ public class ScriptPack { Multiname name = abc.script_info[scriptIndex].traits.traits[t].getName(abc); Namespace ns = name.getNamespace(abc.constants); if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - fos.write(abc.script_info[scriptIndex].traits.traits[t].convertPackaged("", abcList, abc, false, pcode, scriptIndex, -1, false, new ArrayList(), paralel).getBytes("utf-8")); + fos.write(abc.script_info[scriptIndex].traits.traits[t].convertPackaged("", abcList, abc, false, pcode, scriptIndex, -1, false, new ArrayList(), parallel).getBytes("utf-8")); } else { - fos.write(abc.script_info[scriptIndex].traits.traits[t].convert("", abcList, abc, false, pcode, scriptIndex, -1, false, new ArrayList(), paralel).getBytes("utf-8")); + fos.write(abc.script_info[scriptIndex].traits.traits[t].convert("", abcList, abc, false, pcode, scriptIndex, -1, false, new ArrayList(), parallel).getBytes("utf-8")); } } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java index d23eb6852..c6f6189d3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java @@ -79,7 +79,7 @@ public class ScriptInfo { return "method_index=" + init_index + "\r\n" + traits.toString(abc, fullyQualifiedNames); } - public String convert(List abcTags, ABC abc, boolean pcode, boolean highlighting, int scriptIndex, boolean paralel) { - return traits.convert("", abcTags, abc, false, pcode, true, scriptIndex, -1, highlighting, new ArrayList(), paralel); + public String convert(List abcTags, ABC abc, boolean pcode, boolean highlighting, int scriptIndex, boolean parallel) { + return traits.convert("", abcTags, abc, false, pcode, true, scriptIndex, -1, highlighting, new ArrayList(), parallel); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java index 82b5ddd80..1d4c1ceb9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java @@ -113,16 +113,16 @@ public abstract class Trait implements Serializable { return abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " kind=" + kindType + " metadata=" + Helper.intArrToString(metadata); } - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { return abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " kind=" + kindType + " metadata=" + Helper.intArrToString(metadata); } - public String convertPackaged(String path, List abcTags, ABC abc, boolean isStatic, boolean pcod, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { - return makePackageFromIndex(abc, name_index, convert(path, abcTags, abc, isStatic, pcod, scriptIndex, classIndex, highlight, fullyQualifiedNames, paralel)); + public String convertPackaged(String path, List abcTags, ABC abc, boolean isStatic, boolean pcod, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { + return makePackageFromIndex(abc, name_index, convert(path, abcTags, abc, isStatic, pcod, scriptIndex, classIndex, highlight, fullyQualifiedNames, parallel)); } - public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { - return convert(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames, paralel).trim(); + public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { + return convert(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames, parallel).trim(); } protected String makePackageFromIndex(ABC abc, int name_index, String value) { @@ -152,7 +152,7 @@ public abstract class Trait implements Serializable { return packageName + "." + objectName; } - public void export(String directory, ABC abc, List abcList, boolean pcode, int scriptIndex, int classIndex, boolean isStatic, boolean paralel) throws IOException { + public void export(String directory, ABC abc, List abcList, boolean pcode, int scriptIndex, int classIndex, boolean isStatic, boolean parallel) throws IOException { Multiname name = getName(abc); Namespace ns = name.getNamespace(abc.constants); String packageName = ns.getName(abc.constants); @@ -167,7 +167,7 @@ public abstract class Trait implements Serializable { } String fileName = outDir.toString() + File.separator + objectName + ".as"; try (FileOutputStream fos = new FileOutputStream(fileName)) { - fos.write(convertPackaged("", abcList, abc, isStatic, pcode, scriptIndex, classIndex, false, new ArrayList(), paralel).getBytes()); + fos.write(convertPackaged("", abcList, abc, isStatic, pcode, scriptIndex, classIndex, false, new ArrayList(), parallel).getBytes()); } } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java index 75936a86c..295fa848c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java @@ -328,13 +328,13 @@ public class TraitClass extends Trait implements TraitWithSlot { } @Override - public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { + public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { String classHeader = abc.instance_info[class_info].getClassHeaderStr(abc, fullyQualifiedNames); return classHeader; } @Override - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { if (!highlight) { //Highlighting.doHighlight = false; @@ -498,9 +498,9 @@ public class TraitClass extends Trait implements TraitWithSlot { //} //static variables,constants & methods - outTraits.add(abc.class_info[class_info].static_traits.convert(path +/*packageName +*/ "/" + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames), abcTags, abc, true, pcode, false, scriptIndex, class_info, highlight, fullyQualifiedNames, paralel)); + outTraits.add(abc.class_info[class_info].static_traits.convert(path +/*packageName +*/ "/" + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames), abcTags, abc, true, pcode, false, scriptIndex, class_info, highlight, fullyQualifiedNames, parallel)); - outTraits.add(abc.instance_info[class_info].instance_traits.convert(path +/*packageName +*/ "/" + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames), abcTags, abc, false, pcode, false, scriptIndex, class_info, highlight, fullyQualifiedNames, paralel)); + outTraits.add(abc.instance_info[class_info].instance_traits.convert(path +/*packageName +*/ "/" + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames), abcTags, abc, false, pcode, false, scriptIndex, class_info, highlight, fullyQualifiedNames, parallel)); StringBuilder bui = new StringBuilder(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java index d9fa597ab..5c5f88b3e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java @@ -40,7 +40,7 @@ public class TraitFunction extends Trait implements TraitWithSlot { } @Override - public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { + public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; @@ -50,8 +50,8 @@ public class TraitFunction extends Trait implements TraitWithSlot { } @Override - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { - String header = convertHeader(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames, paralel); + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { + String header = convertHeader(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames, parallel); String bodyStr = ""; int bodyIndex = abc.findBodyIndex(method_info); if (bodyIndex != -1) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java index e9a4c32d1..72e8b162b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java @@ -35,7 +35,7 @@ public class TraitMethodGetterSetter extends Trait { } @Override - public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { + public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; @@ -53,8 +53,8 @@ public class TraitMethodGetterSetter extends Trait { } @Override - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { - String header = convertHeader(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames, paralel); + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { + String header = convertHeader(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames, parallel); String bodyStr = ""; int bodyIndex = abc.findBodyIndex(method_info); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java index 9d2cdb3b9..e5466eae3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java @@ -110,7 +110,7 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { } @Override - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean paralel) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames, boolean parallel) { String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java index 40b10968f..100bbe2d8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java @@ -79,9 +79,9 @@ public class Traits implements Serializable { boolean highlighting; List fullyQualifiedNames; int traitIndex; - boolean paralel; + boolean parallel; - public TraitConvertTask(Trait trait, boolean makePackages, String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlighting, List fullyQualifiedNames, int traitIndex, boolean paralel) { + public TraitConvertTask(Trait trait, boolean makePackages, String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlighting, List fullyQualifiedNames, int traitIndex, boolean parallel) { this.trait = trait; this.makePackages = makePackages; this.path = path; @@ -94,16 +94,16 @@ public class Traits implements Serializable { this.highlighting = highlighting; this.fullyQualifiedNames = fullyQualifiedNames; this.traitIndex = traitIndex; - this.paralel = paralel; + this.parallel = parallel; } @Override public String call() throws Exception { String plus; if (makePackages) { - plus = trait.convertPackaged(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, paralel); + plus = trait.convertPackaged(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, parallel); } else { - plus = trait.convert(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, paralel); + plus = trait.convert(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, parallel); } if (highlighting) { int h = traitIndex; @@ -122,12 +122,12 @@ public class Traits implements Serializable { } } - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, boolean makePackages, int scriptIndex, int classIndex, boolean highlighting, List fullyQualifiedNames, boolean paralel) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, boolean makePackages, int scriptIndex, int classIndex, boolean highlighting, List fullyQualifiedNames, boolean parallel) { String s = ""; - ExecutorService executor = Executors.newFixedThreadPool(paralel ? 20 : 1); + ExecutorService executor = Executors.newFixedThreadPool(parallel ? 20 : 1); List> futureResults = new ArrayList<>(); for (int t = 0; t < traits.length; t++) { - Future future = executor.submit(new TraitConvertTask(traits[t], makePackages, path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, t, paralel)); + Future future = executor.submit(new TraitConvertTask(traits[t], makePackages, path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, t, parallel)); futureResults.add(future); } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index c7fc7cf0d..b07a69dae 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -99,7 +99,7 @@ public class Main { private static final int UPDATE_SYSTEM_MINOR = 0; private static String commandlineConfigBoolean[] = new String[]{ "decompile", - "paralelSpeedUp", + "parallelSpeedUp", "internalFlashViewer", "autoDeobfuscate", "cacheOnDisk"}; @@ -206,7 +206,7 @@ public class Main { public void percent(int p) { startWork(translate("work.reading.swf"), p); } - }, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + }, (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); locswf.addEventListener(new EventListener() { @Override public void handleEvent(String event, Object data) { @@ -286,24 +286,24 @@ public class Main { return true; } } - - public static void reloadApp(){ - if(loadingDialog!=null){ + + public static void reloadApp() { + if (loadingDialog != null) { loadingDialog.setVisible(false); loadingDialog = null; } - if(proxyFrame!=null){ + if (proxyFrame != null) { proxyFrame.setVisible(false); proxyFrame = null; } - if(Main.file == null){ + if (Main.file == null) { mainFrame.setVisible(false); Helper.emptyObject(mainFrame); Cache.clearAll(); System.gc(); - mainFrame = null; + mainFrame = null; showModeFrame(); - }else{ + } else { openFile(Main.file); } } @@ -540,7 +540,7 @@ public class Main { System.out.println("java -jar ffdec.jar -dumpSWF myfile.swf"); System.out.println("java -jar ffdec.jar -compress myfile.swf myfiledec.swf"); System.out.println("java -jar ffdec.jar -decompress myfiledec.swf myfile.swf"); - System.out.println("java -jar ffdec.jar -config autoDeobfuscate=1,paralelSpeedUp=0 -export as \"C:\\decompiled\\\" myfile.swf"); + System.out.println("java -jar ffdec.jar -config autoDeobfuscate=1,parallelSpeedUp=0 -export as \"C:\\decompiled\\\" myfile.swf"); System.out.println(""); System.out.println("Instead of \"java -jar ffdec.jar\" you can use ffdec.bat on Windows, ffdec.sh on Linux/MacOs"); } @@ -702,6 +702,9 @@ public class Main { } String key = cp[0]; String value = cp[1]; + if (key.toLowerCase().equals("paralelSpeedUp".toLowerCase())) { + key = "parallelSpeedUp"; + } for (String bk : commandlineConfigBoolean) { if (key.toLowerCase().equals(bk.toLowerCase())) { Boolean bValue = null; @@ -806,7 +809,7 @@ public class Main { boolean exportOK; try { printHeader(); - SWF exfile = new SWF(new FileInputStream(inFile), (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + SWF exfile = new SWF(new FileInputStream(inFile), (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); exfile.addEventListener(new EventListener() { @Override public void handleEvent(String event, Object data) { @@ -823,7 +826,7 @@ public class Main { System.out.println("Exporting shapes..."); exfile.exportShapes(handler, outDir.getAbsolutePath() + File.separator + "shapes"); System.out.println("Exporting scripts..."); - exfile.exportActionScript(handler, outDir.getAbsolutePath() + File.separator + "scripts", false, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + exfile.exportActionScript(handler, outDir.getAbsolutePath() + File.separator + "scripts", false, (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); System.out.println("Exporting movies..."); exfile.exportMovies(handler, outDir.getAbsolutePath() + File.separator + "movies"); System.out.println("Exporting sounds..."); @@ -847,10 +850,10 @@ public class Main { if ((pos + 5 < args.length) && (args[pos + 4].equals("-selectas3class"))) { exportOK = true; for (int i = pos + 5; i < args.length; i++) { - exportOK = exportOK && exfile.exportAS3Class(args[i], outDir.getAbsolutePath(), exportFormat.equals("pcode"), (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + exportOK = exportOK && exfile.exportAS3Class(args[i], outDir.getAbsolutePath(), exportFormat.equals("pcode"), (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); } } else { - exportOK = !exfile.exportActionScript(handler, outDir.getAbsolutePath(), exportFormat.equals("pcode"), (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)).isEmpty(); + exportOK = !exfile.exportActionScript(handler, outDir.getAbsolutePath(), exportFormat.equals("pcode"), (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)).isEmpty(); } break; case "movie": @@ -874,11 +877,11 @@ public class Main { exportOK = true; break; case "fla": - exfile.exportFla(handler, outDir.getAbsolutePath(), inFile.getName(), applicationName, applicationVerName, version, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + exfile.exportFla(handler, outDir.getAbsolutePath(), inFile.getName(), applicationName, applicationVerName, version, (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); exportOK = true; break; case "xfl": - exfile.exportXfl(handler, outDir.getAbsolutePath(), inFile.getName(), applicationName, applicationVerName, version, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + exfile.exportXfl(handler, outDir.getAbsolutePath(), inFile.getName(), applicationName, applicationVerName, version, (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); exportOK = true; break; default: @@ -925,6 +928,7 @@ public class Main { } try { Configuration.dump_tags = true; + Configuration.setConfig("parallelSpeedUp", false); SWF swf = parseSWF(args[pos + 1]); } catch (Exception ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java index 5c26430ea..19d4ef3d2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java @@ -677,7 +677,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel miInternalViewer.addActionListener(this); //miParallelSpeedUp = new JCheckBox(translate("menu.settings.parallelspeedup")); - miParallelSpeedUp.setSelected((Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + miParallelSpeedUp.setSelected((Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); miParallelSpeedUp.setActionCommand("PARALLELSPEEDUP"); miParallelSpeedUp.addActionListener(this); @@ -2117,7 +2117,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel for (int i = 0; i < tlsList.size(); i++) { ScriptPack tls = tlsList.get(i); Main.startWork(translate("work.exporting") + " " + (i + 1) + "/" + tlsList.size() + " " + tls.getPath() + " ..."); - ret.add(tls.export(selFile, abcList, isPcode, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE))); + ret.add(tls.export(selFile, abcList, isPcode, (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE))); } } else { List allNodes = new ArrayList<>(); @@ -2246,7 +2246,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel confStr += " " + translate("message.confirm.off"); } if (View.showConfirmDialog(null, confStr, translate("message.parallel"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) { - Configuration.setConfig("paralelSpeedUp", (Boolean) miParallelSpeedUp.isSelected()); + Configuration.setConfig("parallelSpeedUp", (Boolean) miParallelSpeedUp.isSelected()); } else { miParallelSpeedUp.setSelected(!miParallelSpeedUp.isSelected()); } @@ -2544,9 +2544,9 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel public void run() { try { if (compressed) { - swf.exportFla(errorHandler, selfile.getAbsolutePath(), new File(Main.file).getName(), Main.applicationName, Main.applicationVerName, Main.version, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + swf.exportFla(errorHandler, selfile.getAbsolutePath(), new File(Main.file).getName(), Main.applicationName, Main.applicationVerName, Main.version, (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); } else { - swf.exportXfl(errorHandler, selfile.getAbsolutePath(), new File(Main.file).getName(), Main.applicationName, Main.applicationVerName, Main.version, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + swf.exportXfl(errorHandler, selfile.getAbsolutePath(), new File(Main.file).getName(), Main.applicationName, Main.applicationVerName, Main.version, (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); } } catch (IOException ex) { View.showMessageDialog(null, translate("error.export") + ": " + ex.getLocalizedMessage(), translate("error"), JOptionPane.ERROR_MESSAGE); @@ -2588,7 +2588,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel swf.exportMovies(errorHandler, selFile + File.separator + "movies"); swf.exportSounds(errorHandler, selFile + File.separator + "sounds", isMp3OrWav, isMp3OrWav); swf.exportBinaryData(errorHandler, selFile + File.separator + "binaryData"); - swf.exportActionScript(errorHandler, selFile, isPcode, (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE)); + swf.exportActionScript(errorHandler, selFile, isPcode, (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE)); } } catch (Exception ex) { Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "Error during export", ex); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index 2008ed819..6bb8e110b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -338,7 +338,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL } if (!cache.contains(scriptLeaf)) { for (int scriptTraitIndex : scriptLeaf.traitIndices) { - hilightedCodeBuf.append(script.traits.traits[scriptTraitIndex].convertPackaged(scriptLeaf.getPath().toString(), abcList, abc, false, false, scriptIndex, -1, true, new ArrayList(), (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE))); + hilightedCodeBuf.append(script.traits.traits[scriptTraitIndex].convertPackaged(scriptLeaf.getPath().toString(), abcList, abc, false, false, scriptIndex, -1, true, new ArrayList(), (Boolean) Configuration.getConfig("parallelSpeedUp", Boolean.TRUE))); } hilightedCode = hilightedCodeBuf.toString(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties index e3f863944..73c2887b8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties @@ -36,7 +36,7 @@ menu.tools.gotodocumentclass = P\u0159ej\u00edt na hlavn\u00ed t\u0159\u00eddu d menu.settings = Nastaven\u00ed menu.settings.autodeobfuscation = Automatick\u00e1 deobfuskace menu.settings.internalflashviewer = Pou\u017e\u00edvat vlastn\u00ed prohl\u00ed\u017ee\u010d Flashe -menu.settings.parallelspeedup = Paraleln\u00ed zrychlen\u00ed +menu.settings.parallelspeedup = paralleln\u00ed zrychlen\u00ed menu.settings.disabledecompilation = Zak\u00e1zat dekompilaci (Pouze P-k\u00f3d) menu.settings.addtocontextmenu = P\u0159idat FFDec do kontextov\u00e9ho menu SWF menu.settings.language = Zm\u011bnit jazyk @@ -83,14 +83,14 @@ node.scripts = skripty message.warning = Varov\u00e1n\u00ed message.confirm.experimental = N\u00e1sleduj\u00edc\u00ed procedura m\u016f\u017ee po\u0161kodit SWF soubor kter\u00fd mo\u017en\u00e1 nep\u016fjde p\u0159ehr\u00e1t.\r\nPOU\u017d\u00cdVAT NA VLASTN\u00cd RIZIKO. Chcete pokra\u010dovat? -message.confirm.parallel = Paralelismus m\u016f\u017ee urychlit na\u010d\u00edt\u00e1n\u00ed a dekompilaci ale pou\u017e\u00edv\u00e1 v\u00edce pam\u011bti. +message.confirm.parallel = parallelismus m\u016f\u017ee urychlit na\u010d\u00edt\u00e1n\u00ed a dekompilaci ale pou\u017e\u00edv\u00e1 v\u00edce pam\u011bti. message.confirm.on = Chcete to ZAPNOUT? message.confirm.off = Chcete to VYPNOUT? message.confirm = Potvrzen\u00ed message.confirm.autodeobfuscate = Automatick\u00e1 deobfuskace je zp\u016fsob jak dekompilovat obfuskovan\u00fd k\u00f3d.\r\nDeobfuskace vede k pomalej\u0161\u00ed dekompilaci a n\u011bkter\u00fd nepou\u017eit\u00fd k\u00f3d m\u016f\u017ee b\u00fdt odstran\u011bn.\r\nPokud k\u00f3d nen\u00ed obfuskovan\u00fd, je lep\u0161\u00ed autodeobfuskaci vypnout. -message.parallel = Paralelismus +message.parallel = parallelismus message.trait.saved = Vlastnost \u00fasp\u011b\u0161ne ulo\u017eena diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index 197e321e5..00595266e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -187,16 +187,16 @@ public class DefineSpriteTag extends CharacterTag implements Container, BoundedT * @param version SWF version * @param level * @param pos - * @param paralel + * @param parallel * @param skipUnusualTags * @throws IOException */ - public DefineSpriteTag(SWF swf, byte data[], int version, int level, long pos, boolean paralel, boolean skipUnusualTags) throws IOException { + public DefineSpriteTag(SWF swf, byte data[], int version, int level, long pos, boolean parallel, boolean skipUnusualTags) throws IOException { super(swf, ID, "DefineSprite", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version, pos); spriteId = sis.readUI16(); frameCount = sis.readUI16(); - subTags = sis.readTagList(swf, level + 1, paralel, skipUnusualTags); + subTags = sis.readTagList(swf, level + 1, parallel, skipUnusualTags); } static int c = 0; diff --git a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index c666bfc82..547b407ca 100644 --- a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -2533,7 +2533,7 @@ public class XFLConverter { return ret; } - public static void convertSWF(AbortRetryIgnoreHandler handler, SWF swf, String swfFileName, String outfile, boolean compressed, String generator, String generatorVerName, String generatorVersion, boolean paralel) throws IOException { + public static void convertSWF(AbortRetryIgnoreHandler handler, SWF swf, String swfFileName, String outfile, boolean compressed, String generator, String generatorVerName, String generatorVersion, boolean parallel) throws IOException { File file = new File(outfile); File outDir = file.getParentFile(); if (!outDir.exists()) { @@ -2906,7 +2906,7 @@ public class XFLConverter { } if (useAS3) { try { - swf.exportActionScript(handler, outDir.getAbsolutePath(), false, paralel); + swf.exportActionScript(handler, outDir.getAbsolutePath(), false, parallel); } catch (Exception ex) { Logger.getLogger(XFLConverter.class.getName()).log(Level.SEVERE, "Error during ActionScript3 export", ex); }