mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 16:30:45 +00:00
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user