diff --git a/CHANGELOG.md b/CHANGELOG.md index d3fdd5cdb..f3c1cb22d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ All notable changes to this project will be documented in this file. - [#1866] FLA export - multiple usage of morphshapes - [#503], [#1011], [#1257], [#1902], [#1903], [#2048] FLA export - shapes with overlapping edges - [#2108] Cannot change text when ShiftJIS flag is set on font +- [#2074], [#2074] Use mxmlc.bat file when exe not available for Flex SDK compilation ### Changed - Basic tag info panel always visible even when nothing to display (to avoid flickering) @@ -3245,6 +3246,7 @@ Major version of SWF to XML export changed to 2. [#1903]: https://www.free-decompiler.com/flash/issues/1903 [#2048]: https://www.free-decompiler.com/flash/issues/2048 [#2108]: https://www.free-decompiler.com/flash/issues/2108 +[#2074]: https://www.free-decompiler.com/flash/issues/2074 [#2099]: https://www.free-decompiler.com/flash/issues/2099 [#2090]: https://www.free-decompiler.com/flash/issues/2090 [#2079]: https://www.free-decompiler.com/flash/issues/2079 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/swf/SwfToSwcExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/swf/SwfToSwcExporter.java index b44eac058..3d6982f22 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/swf/SwfToSwcExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/swf/SwfToSwcExporter.java @@ -248,7 +248,7 @@ public class SwfToSwcExporter { printDelay("swc.documentTag", t2, t3); if (!documentClassSet) { - throw new IOException("Original document class not found!"); + //throw new IOException("Original document class not found!"); } swf = recompileSWF(swf); t4 = System.currentTimeMillis(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flexsdk/MxmlcAs3ScriptReplacer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flexsdk/MxmlcAs3ScriptReplacer.java index dd87b1468..2121d5c59 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flexsdk/MxmlcAs3ScriptReplacer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flexsdk/MxmlcAs3ScriptReplacer.java @@ -235,6 +235,7 @@ public class MxmlcAs3ScriptReplacer extends MxmlcRunner implements As3ScriptRepl pack.abc.reorganizeClasses(classesRemap); } ((Tag) pack.abc.parentTag).setModified(true); + pack.abc.getSwf().getAbcIndex().refreshAbc(pack.abc); deinitReplacement(pack); //successfull finish } @@ -243,7 +244,7 @@ public class MxmlcAs3ScriptReplacer extends MxmlcRunner implements As3ScriptRepl @Override public boolean isAvailable() { String flexLocation = Configuration.flexSdkLocation.get(); - return !(flexLocation.isEmpty() || (!new File(MxmlcRunner.getMxmlcPath(flexLocation)).exists())); + return !(flexLocation.isEmpty() || MxmlcRunner.getMxmlcPath(flexLocation) == null); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flexsdk/MxmlcRunner.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flexsdk/MxmlcRunner.java index c1410f68e..12a2964cd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flexsdk/MxmlcRunner.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flexsdk/MxmlcRunner.java @@ -31,7 +31,24 @@ public class MxmlcRunner { public static String getMxmlcPath(String flexSdkPath) { boolean isWin = System.getProperty("os.name").toLowerCase().contains("win"); - return flexSdkPath + File.separator + "bin" + File.separator + "mxmlc" + (isWin ? ".exe" : ""); + String path = flexSdkPath + File.separator + "bin" + File.separator + "mxmlc"; + + String exePath = path + ".exe"; + String batPath = path + ".bat"; + + if (isWin) { + if (new File(exePath).exists()) { + return exePath; + } + if (new File(batPath).exists()) { + return batPath; + } + } else { + if (new File(path).exists()) { + return exePath; + } + } + return null; } public void mxmlc(String... arguments) throws MxmlcException, InterruptedException, IOException {