mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-06 14:45:50 +00:00
export fla without scripts for debugging purposes
This commit is contained in:
@@ -142,6 +142,7 @@ import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFField;
|
||||
import com.jpexs.decompiler.flash.xfl.FLAVersion;
|
||||
import com.jpexs.decompiler.flash.xfl.XFLConverter;
|
||||
import com.jpexs.decompiler.flash.xfl.XFLExportSettings;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.Graph;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
@@ -2424,12 +2425,19 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
}
|
||||
|
||||
public void exportFla(AbortRetryIgnoreHandler handler, String outfile, String swfName, String generator, String generatorVerName, String generatorVersion, boolean parallel, FLAVersion version) throws IOException, InterruptedException {
|
||||
XFLConverter.convertSWF(handler, this, swfName, outfile, true, generator, generatorVerName, generatorVersion, parallel, version);
|
||||
clearAllCache();
|
||||
XFLExportSettings settings = new XFLExportSettings();
|
||||
settings.compressed = true;
|
||||
exportXfl(handler, outfile, swfName, generator, generatorVerName, generatorVersion, parallel, version, settings);
|
||||
}
|
||||
|
||||
public void exportXfl(AbortRetryIgnoreHandler handler, String outfile, String swfName, String generator, String generatorVerName, String generatorVersion, boolean parallel, FLAVersion version) throws IOException, InterruptedException {
|
||||
XFLConverter.convertSWF(handler, this, swfName, outfile, false, generator, generatorVerName, generatorVersion, parallel, version);
|
||||
XFLExportSettings settings = new XFLExportSettings();
|
||||
settings.compressed = false;
|
||||
exportXfl(handler, outfile, swfName, generator, generatorVerName, generatorVersion, parallel, version, settings);
|
||||
}
|
||||
|
||||
public void exportXfl(AbortRetryIgnoreHandler handler, String outfile, String swfName, String generator, String generatorVerName, String generatorVersion, boolean parallel, FLAVersion version, XFLExportSettings settings) throws IOException, InterruptedException {
|
||||
XFLConverter.convertSWF(handler, this, swfName, outfile, settings, generator, generatorVerName, generatorVersion, parallel, version);
|
||||
clearAllCache();
|
||||
}
|
||||
|
||||
|
||||
@@ -2675,7 +2675,7 @@ public class XFLConverter {
|
||||
return ret.toString();
|
||||
}
|
||||
|
||||
public static void convertSWF(AbortRetryIgnoreHandler handler, SWF swf, String swfFileName, String outfile, boolean compressed, String generator, String generatorVerName, String generatorVersion, boolean parallel, FLAVersion flaVersion) throws IOException, InterruptedException {
|
||||
public static void convertSWF(AbortRetryIgnoreHandler handler, SWF swf, String swfFileName, String outfile, XFLExportSettings settings, String generator, String generatorVerName, String generatorVersion, boolean parallel, FLAVersion flaVersion) throws IOException, InterruptedException {
|
||||
|
||||
FileAttributesTag fa = swf.getFileAttributes();
|
||||
|
||||
@@ -2998,7 +2998,7 @@ public class XFLConverter {
|
||||
publishSettings.append("</flash_profiles>");
|
||||
String publishSettingsStr = publishSettings.toString();
|
||||
|
||||
if (compressed) {
|
||||
if (settings.compressed) {
|
||||
final String domDocumentF = domDocumentStr;
|
||||
final String publishSettingsF = publishSettingsStr;
|
||||
final String outfileF = outfile;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.xfl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class XFLExportSettings {
|
||||
|
||||
public boolean compressed;
|
||||
|
||||
public boolean exportScript = true;
|
||||
}
|
||||
Reference in New Issue
Block a user