mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-03 15:35:10 +00:00
Custom SWF Configuration refactoring.
Make configuration serialization compatible with 16.2.0
This commit is contained in:
@@ -36,6 +36,7 @@ import com.jpexs.decompiler.flash.UrlResolver;
|
||||
import com.jpexs.decompiler.flash.Version;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.configuration.CustomConfigurationKeys;
|
||||
import com.jpexs.decompiler.flash.configuration.SwfSpecificConfiguration;
|
||||
import com.jpexs.decompiler.flash.configuration.SwfSpecificCustomConfiguration;
|
||||
import com.jpexs.decompiler.flash.console.CommandLineArgumentParser;
|
||||
@@ -873,7 +874,7 @@ public class Main {
|
||||
String fileKey = fname + "/" + streamEntry.getKey();
|
||||
SwfSpecificCustomConfiguration conf = Configuration.getSwfSpecificCustomConfiguration(fileKey);
|
||||
|
||||
String charset = conf == null ? Charset.defaultCharset().name() : conf.getCustomData(SwfSpecificCustomConfiguration.KEY_CHARSET, Charset.defaultCharset().name());
|
||||
String charset = conf == null ? Charset.defaultCharset().name() : conf.getCustomData(CustomConfigurationKeys.KEY_CHARSET, Charset.defaultCharset().name());
|
||||
SWF swf = new SWF(stream, null, streamEntry.getKey(), new ProgressListener() {
|
||||
@Override
|
||||
public void progress(int p) {
|
||||
@@ -907,7 +908,7 @@ public class Main {
|
||||
String shortName = fileTitle != null ? fileTitle : file;
|
||||
String fileKey = shortName == null ? "" : new File(shortName).getName();
|
||||
SwfSpecificCustomConfiguration conf = Configuration.getSwfSpecificCustomConfiguration(fileKey);
|
||||
String charset = conf == null ? Charset.defaultCharset().name() : conf.getCustomData(SwfSpecificCustomConfiguration.KEY_CHARSET, Charset.defaultCharset().name());
|
||||
String charset = conf == null ? Charset.defaultCharset().name() : conf.getCustomData(CustomConfigurationKeys.KEY_CHARSET, Charset.defaultCharset().name());
|
||||
|
||||
SWF swf = new SWF(is, file, fileTitle, new ProgressListener() {
|
||||
@Override
|
||||
@@ -1356,8 +1357,8 @@ public class Main {
|
||||
}
|
||||
SwfSpecificCustomConfiguration swfCustomConf = Configuration.getSwfSpecificCustomConfiguration(fswf.getShortPathTitle());
|
||||
if (swfCustomConf != null) {
|
||||
resourcesPathStr = swfCustomConf.getCustomData(SwfSpecificCustomConfiguration.KEY_LAST_SELECTED_PATH_RESOURCES, resourcesPathStr);
|
||||
tagListPathStr = swfCustomConf.getCustomData(SwfSpecificCustomConfiguration.KEY_LAST_SELECTED_PATH_TAGLIST, null);
|
||||
resourcesPathStr = swfCustomConf.getCustomData(CustomConfigurationKeys.KEY_LAST_SELECTED_PATH_RESOURCES, resourcesPathStr);
|
||||
tagListPathStr = swfCustomConf.getCustomData(CustomConfigurationKeys.KEY_LAST_SELECTED_PATH_TAGLIST, null);
|
||||
}
|
||||
|
||||
if (isInited()) {
|
||||
|
||||
Reference in New Issue
Block a user