get code folder working again with applets

This commit is contained in:
benfry
2011-01-29 00:36:10 +00:00
parent f0ffdd4ef3
commit cd1d1e0782
2 changed files with 29 additions and 21 deletions

View File

@@ -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);

View File

@@ -93,13 +93,19 @@ _ window that opens and contains list of examples
_ also, move open to a submenu?
_ then we'd have open / recent / sketchbook
regressions
X test code folder on desktop
X with applet
X with application
_ test controlp5 on app
_ test controlp5 on applet
_ test code folder on android
_ test libraries on android
_ test opengl on android
_ library/export testing
_ test controlp5
_ test code folder on desktop
_ test code folder on android
_ test libraries on android
_ test opengl on android
_ strange window flicker when first opened
_ make sure that android is working again
_ the build is broken! the build is broken!
_ http://code.google.com/p/processing/issues/detail?id=519