From 91a68f91aef6bb18abaecf76f054cbd7dab4b2d0 Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 29 Nov 2005 00:06:47 +0000 Subject: [PATCH] put jnilib files into Contents/Resources/Java.. also open folder after export --- app/Editor.java | 5 +++- app/Sketch.java | 5 ++++ app/preproc/PdePreprocessor.java | 20 --------------- todo.txt | 42 +++++++++++++++++--------------- 4 files changed, 32 insertions(+), 40 deletions(-) diff --git a/app/Editor.java b/app/Editor.java index 754432356..41921adce 100644 --- a/app/Editor.java +++ b/app/Editor.java @@ -1638,7 +1638,10 @@ public class Editor extends JFrame synchronized public void handleExportApp() { message("Exporting application..."); try { - if (sketch.exportApplication()) { + boolean success = sketch.exportApplication(); + if (success) { + File destFolder = new File(sketch.folder, "application"); + Base.openFolder(destFolder); message("Done exporting."); } else { // error message will already be visible diff --git a/app/Sketch.java b/app/Sketch.java index 5cc34816b..36bd977b9 100644 --- a/app/Sketch.java +++ b/app/Sketch.java @@ -2124,6 +2124,11 @@ public class Sketch { Base.copyFile(exportFile, new File(jarFolder, exportList[i])); jarListVector.add(exportList[i]); + } else if ((exportPlatform == PConstants.MACOSX) && + (exportFile.getName().toLowerCase().endsWith(".jnilib"))) { + // jnilib files can be placed in Contents/Resources/Java + Base.copyFile(exportFile, new File(jarFolder, exportList[i])); + } else { // copy the file to the main directory.. prolly a .dll or something Base.copyFile(exportFile, diff --git a/app/preproc/PdePreprocessor.java b/app/preproc/PdePreprocessor.java index 94b2455a0..45d83db36 100644 --- a/app/preproc/PdePreprocessor.java +++ b/app/preproc/PdePreprocessor.java @@ -275,26 +275,6 @@ public class PdePreprocessor { extraImports = new String[imports.size()]; imports.copyInto(extraImports); - // if using opengl, add it to the special imports - /* - if (Preferences.get("renderer").equals("opengl")) { - extraImports = new String[imports.size() + 1]; - imports.copyInto(extraImports); - extraImports[extraImports.length - 1] = "processing.opengl.*"; - } - */ - - /* - if (codeFolderPackages != null) { - extraImports = new String[importsCount + codeFolderPackages.length]; - imports.copyInto(extraImports); - for (int i = 0; i < codeFolderPackages.length; i++) { - extraImports[importsCount + i] = codeFolderPackages[i] + ".*"; - } - codeFolderImports = null; - } - */ - if (codeFolderPackages != null) { codeFolderImports = new String[codeFolderPackages.length]; for (int i = 0; i < codeFolderPackages.length; i++) { diff --git a/todo.txt b/todo.txt index e7810dc6c..3491716f1 100644 --- a/todo.txt +++ b/todo.txt @@ -1,24 +1,28 @@ 0097 pde -_ write export-to-application -_ http://dev.processing.org/bugs/show_bug.cgi?id=60 -o problem with packages.. currently mainClassName is preproc name -o and "name" is the sketch name, w/o package -o but if a package were in use, then would be trouble -X not allowing packages for main classes -_ lock feature for present mode (part of export to application?) -_ application can still do serial (qt, other stuff?) -X add manifest.mf to exported applets so that applications will work + +export-to-application +_ http://dev.processing.org/bugs/show_bug.cgi?id=60 +X add manifest.mf to exported applets so that applications will work X include main class info for executable jar file with jdk > 1.2 -X was already done before -_ wrapper that invokes the applet using a copy of the jre -_ main() method needs to set layout manager if jexegen is to be used -_ (msft vm defaults to null layout manager) -_ also make sure pack() is happening -_ PApplet.main(new String[] { "TheClass" }); -_ this will need to detect whether the user has their own main() -_ or even PApplet.main(new String[] { getClass().getName() }); -_ META-INF/MANIFEST.MF contains just "Main-Class: ClassName" -_ main sticking point will be serial/qtjava in exports +X was already done before +X META-INF/MANIFEST.MF contains just "Main-Class: ClassName" +o problem with packages.. currently mainClassName is preproc name +o and "name" is the sketch name, w/o package +o but if a package were in use, then would be trouble +X not allowing packages for main classes +o lock feature for present mode (part of export to application?) +X just need to override the key events +o main() method needs to set layout manager if jexegen is to be used +o (msft vm defaults to null layout manager) +o also make sure pack() is happening + +_ PApplet.main(new String[] { "TheClass" }); +_ this will need to detect whether the user has their own main() +o or even PApplet.main(new String[] { getClass().getName() }); +_ how to handle qtjava in exports? +_ need per-platform settings for exports +_ opengl needs to export .jnilib for macosx, but no dll and so files +_ can macosx jnilib files be placed in the resources dir? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .