mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
get code folder working again with applets
This commit is contained in:
@@ -780,20 +780,6 @@ public class JavaBuild {
|
||||
// Add the manifest file
|
||||
addManifest(zos);
|
||||
|
||||
if (sketch.hasCodeFolder()) {
|
||||
File[] codeJarFiles = sketch.getCodeFolder().listFiles(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
if (name.charAt(0) == '.') return false;
|
||||
if (name.toLowerCase().endsWith(".jar")) return true;
|
||||
if (name.toLowerCase().endsWith(".zip")) return true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
for (File exportFile : codeJarFiles) {
|
||||
Base.copyFile(exportFile, new File(appletFolder, exportFile.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
// File openglLibraryFolder =
|
||||
// new File(editor.getMode().getLibrariesFolder(), "opengl/library");
|
||||
// String openglLibraryPath = openglLibraryFolder.getAbsolutePath();
|
||||
@@ -813,7 +799,7 @@ public class JavaBuild {
|
||||
System.err.println("File " + exportFile.getAbsolutePath() + " does not exist");
|
||||
|
||||
} else if (exportFile.isDirectory()) {
|
||||
System.err.println("Ignoring sub-folder \"" + exportFile.getAbsolutePath() + "\"");
|
||||
System.out.println("Ignoring sub-folder \"" + exportFile.getAbsolutePath() + "\"");
|
||||
|
||||
} else if (exportName.toLowerCase().endsWith(".zip") ||
|
||||
exportName.toLowerCase().endsWith(".jar")) {
|
||||
@@ -842,6 +828,22 @@ public class JavaBuild {
|
||||
String bagelJarPath = bagelJar.getAbsolutePath();
|
||||
packClassPathIntoZipFile(bagelJarPath, zos, zipFileContents);
|
||||
}
|
||||
|
||||
if (sketch.hasCodeFolder()) {
|
||||
File[] codeJarFiles = sketch.getCodeFolder().listFiles(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
if (name.charAt(0) == '.') return false;
|
||||
if (name.toLowerCase().endsWith(".jar")) return true;
|
||||
if (name.toLowerCase().endsWith(".zip")) return true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
for (File exportFile : codeJarFiles) {
|
||||
String name = exportFile.getName();
|
||||
Base.copyFile(exportFile, new File(appletFolder, name));
|
||||
archives.append("," + name);
|
||||
}
|
||||
}
|
||||
|
||||
// if (dataFolder.exists()) {
|
||||
// String dataFiles[] = Base.listFiles(dataFolder, false);
|
||||
|
||||
Reference in New Issue
Block a user