More documentation.

This commit is contained in:
Jindra Petřík
2024-08-08 19:27:14 +02:00
parent 5c1811582a
commit f219b49372
394 changed files with 13018 additions and 552 deletions
@@ -24,8 +24,6 @@ import com.jpexs.decompiler.flash.abc.types.ScriptInfo;
import com.jpexs.decompiler.flash.abc.types.traits.Trait;
import com.jpexs.decompiler.flash.abc.types.traits.TraitClass;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.configuration.CustomConfigurationKeys;
import com.jpexs.decompiler.flash.configuration.SwfSpecificCustomConfiguration;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
import com.jpexs.decompiler.flash.exporters.script.AS3ScriptExporter;
import com.jpexs.decompiler.flash.exporters.settings.ScriptExportSettings;
@@ -64,6 +62,10 @@ public class MxmlcAs3ScriptReplacer extends MxmlcRunner implements As3ScriptRepl
private File swcFile;
private List<File> dependenciesSwcFiles = new ArrayList<>();
/**
* Constructor.
* @param flexSdkPath Path to Flex SDK.
*/
public MxmlcAs3ScriptReplacer(String flexSdkPath) {
super(flexSdkPath);
}
@@ -23,10 +23,18 @@ public class MxmlcException extends Exception {
private String mxmlcErrorOutput;
/**
* Constructor.
* @param mxmlcErrorOutput Output of mxmlc command.
*/
public MxmlcException(String mxmlcErrorOutput) {
this.mxmlcErrorOutput = mxmlcErrorOutput;
}
/**
* Gets the output of mxmlc command.
* @return Output of mxmlc command.
*/
public String getMxmlcErrorOutput() {
return mxmlcErrorOutput;
}
@@ -33,6 +33,11 @@ public class MxmlcRunner {
this.flexSdkPath = flexSdkPath;
}
/**
* Gets the path to mxmlc compiler.
* @param flexSdkPath Path to Flex SDK.
* @return Path to mxmlc compiler.
*/
public static String getMxmlcPath(String flexSdkPath) {
boolean isWin = System.getProperty("os.name").toLowerCase().contains("win");
String path = flexSdkPath + File.separator + "bin" + File.separator + "mxmlc";
@@ -55,6 +60,13 @@ public class MxmlcRunner {
return null;
}
/**
* Runs mxmlc compiler.
* @param arguments Arguments for mxmlc.
* @throws MxmlcException If mxmlc fails to compile a file
* @throws InterruptedException On interrupt
* @throws IOException On I/O error
*/
public void mxmlc(List<String> arguments) throws MxmlcException, InterruptedException, IOException {
String[] runArgs = new String[arguments.size() + 1];
runArgs[0] = getMxmlcPath(flexSdkPath);