mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 11:40:45 +00:00
Add Symbol-Class export support for commandline
This commit is contained in:
@@ -60,6 +60,7 @@ import com.jpexs.decompiler.flash.exporters.MorphShapeExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.MovieExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.ShapeExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.SoundExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.SymbolClassExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.TextExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.amf.amf3.Amf3Exporter;
|
||||
import com.jpexs.decompiler.flash.exporters.commonshape.Matrix;
|
||||
@@ -74,6 +75,7 @@ import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ShapeExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.SoundExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.SpriteExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.SymbolClassExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.TextExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.script.LinkReportExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.BinaryDataExportSettings;
|
||||
@@ -87,6 +89,7 @@ import com.jpexs.decompiler.flash.exporters.settings.ScriptExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.ShapeExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.SoundExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.SpriteExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.SymbolClassExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.TextExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.swf.SwfToSwcExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.swf.SwfXmlExporter;
|
||||
@@ -339,6 +342,7 @@ public class CommandLineArgumentParser {
|
||||
out.println(" button - Buttons (Default format: PNG)");
|
||||
out.println(" sound - Sounds (Default format: MP3/WAV/FLV only sound)");
|
||||
out.println(" binaryData - Binary data (Default format: Raw data)");
|
||||
out.println(" symbolClass - Symbol-Class mapping (Default format: CSV)");
|
||||
out.println(" text - Texts (Default format: Plain text)");
|
||||
out.println(" all - Every resource (but not FLA and XFL)");
|
||||
out.println(" fla - Everything to FLA compressed format");
|
||||
@@ -2109,6 +2113,7 @@ public class CommandLineArgumentParser {
|
||||
"button",
|
||||
"sound",
|
||||
"binarydata",
|
||||
"symbolclass",
|
||||
"text",
|
||||
"all",
|
||||
"fla",
|
||||
@@ -2288,6 +2293,11 @@ public class CommandLineArgumentParser {
|
||||
new BinaryDataExporter().exportBinaryData(handler, outDir + (multipleExportTypes ? File.separator + BinaryDataExportSettings.EXPORT_FOLDER_NAME : ""), new ReadOnlyTagList(extags), new BinaryDataExportSettings(enumFromStr(formats.get("binarydata"), BinaryDataExportMode.class)), evl);
|
||||
}
|
||||
|
||||
if (exportAll || exportFormats.contains("symbolclass")) {
|
||||
System.out.println("Exporting symbolClass...");
|
||||
new SymbolClassExporter().exportNames(handler, outDir + (multipleExportTypes ? File.separator + SymbolClassExportSettings.EXPORT_FOLDER_NAME : ""), new ReadOnlyTagList(extags), new SymbolClassExportSettings(enumFromStr(formats.get("symbolclass"), SymbolClassExportMode.class)), evl);
|
||||
}
|
||||
|
||||
if (exportAll || exportFormats.contains("text")) {
|
||||
System.out.println("Exporting texts...");
|
||||
Boolean singleTextFile = parseBooleanConfigValue(formats.get("singletext"));
|
||||
|
||||
@@ -73,6 +73,7 @@ import com.jpexs.decompiler.flash.exporters.settings.ScriptExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.ShapeExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.SoundExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.SpriteExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.SymbolClassExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.TextExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.swf.SwfJavaExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.swf.SwfXmlExporter;
|
||||
@@ -1383,7 +1384,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
|
||||
if (export.isOptionEnabled(SymbolClassExportMode.class)) {
|
||||
ret.addAll(new SymbolClassExporter().exportNames(selFile2, new ReadOnlyTagList(symbolNames), evl));
|
||||
ret.addAll(new SymbolClassExporter().exportNames(handler, selFile2 + File.separator + SymbolClassExportSettings.EXPORT_FOLDER_NAME, new ReadOnlyTagList(symbolNames),
|
||||
new SymbolClassExportSettings(export.getValue(SymbolClassExportMode.class)), evl));
|
||||
}
|
||||
|
||||
FrameExporter frameExporter = new FrameExporter();
|
||||
@@ -1495,7 +1497,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
|
||||
if (export.isOptionEnabled(SymbolClassExportMode.class)) {
|
||||
new SymbolClassExporter().exportNames(selFile, swf.getTags(), evl);
|
||||
new SymbolClassExporter().exportNames(handler, Path.combine(selFile, SymbolClassExportSettings.EXPORT_FOLDER_NAME), swf.getTags(),
|
||||
new SymbolClassExportSettings(export.getValue(SymbolClassExportMode.class)), evl);
|
||||
}
|
||||
|
||||
FrameExporter frameExporter = new FrameExporter();
|
||||
@@ -1603,7 +1606,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
|
||||
if (export.isOptionEnabled(SymbolClassExportMode.class)) {
|
||||
for (SymbolClassExportMode exportMode : SymbolClassExportMode.values()) {
|
||||
new SymbolClassExporter().exportNames(selFile, swf.getTags(), evl);
|
||||
new SymbolClassExporter().exportNames(handler, Path.combine(selFile, SymbolClassExportSettings.EXPORT_FOLDER_NAME, exportMode.name()), swf.getTags(),
|
||||
new SymbolClassExportSettings(exportMode), evl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user