put jnilib files into Contents/Resources/Java.. also open folder after export

This commit is contained in:
benfry
2005-11-29 00:06:47 +00:00
parent d814be907c
commit 91a68f91ae
4 changed files with 32 additions and 40 deletions

View File

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

View File

@@ -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,

View File

@@ -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++) {

View File

@@ -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?
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .