From cd1d1e0782f96dd33dfbbf6fe57da6188dcc22bd Mon Sep 17 00:00:00 2001 From: benfry Date: Sat, 29 Jan 2011 00:36:10 +0000 Subject: [PATCH] get code folder working again with applets --- app/src/processing/mode/java/JavaBuild.java | 32 +++++++++++---------- todo.txt | 18 ++++++++---- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/app/src/processing/mode/java/JavaBuild.java b/app/src/processing/mode/java/JavaBuild.java index a0702f7c9..99af07436 100644 --- a/app/src/processing/mode/java/JavaBuild.java +++ b/app/src/processing/mode/java/JavaBuild.java @@ -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); diff --git a/todo.txt b/todo.txt index 26cbecdf7..fdcb3bba6 100644 --- a/todo.txt +++ b/todo.txt @@ -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