mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-02 11:54:36 +00:00
AS3 direct editation
This commit is contained in:
@@ -595,32 +595,42 @@ public class Configuration {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static File getPlayerSWC() {
|
||||
public static File getFlashLibPath() {
|
||||
try {
|
||||
String home = getFFDecHome();
|
||||
File libsdir = new File(home + "flashlib");
|
||||
if (libsdir.exists()) {
|
||||
File libs[] = libsdir.listFiles(new FilenameFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.toLowerCase().startsWith("playerglobal");
|
||||
}
|
||||
});
|
||||
List<String> libnames = new ArrayList<>();
|
||||
for (File f : libs) {
|
||||
libnames.add(f.getName());
|
||||
}
|
||||
Collections.sort(libnames);
|
||||
if (!libnames.isEmpty()) {
|
||||
return new File(libsdir.getAbsolutePath() + File.separator + libnames.get(libnames.size() - 1));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
if (!libsdir.exists()) {
|
||||
libsdir.mkdirs();
|
||||
}
|
||||
return libsdir;
|
||||
} catch (IOException ex) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static File getPlayerSWC() {
|
||||
File libsdir = getFlashLibPath();
|
||||
if (libsdir!=null && libsdir.exists()) {
|
||||
File libs[] = libsdir.listFiles(new FilenameFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.toLowerCase().startsWith("playerglobal");
|
||||
}
|
||||
});
|
||||
List<String> libnames = new ArrayList<>();
|
||||
for (File f : libs) {
|
||||
libnames.add(f.getName());
|
||||
}
|
||||
Collections.sort(libnames);
|
||||
if (!libnames.isEmpty()) {
|
||||
return new File(libsdir.getAbsolutePath() + File.separator + libnames.get(libnames.size() - 1));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user