mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
use reflection to get proper user-domain library path on osx
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.net.*;
|
||||
import java.util.*;
|
||||
import java.util.zip.*;
|
||||
@@ -184,16 +185,29 @@ public class PdeBase {
|
||||
|
||||
// not clear if i can write to this folder tho..
|
||||
try {
|
||||
/*
|
||||
if (false) {
|
||||
// this is because the mrjtoolkit stubs don't have the
|
||||
// thows exception around them
|
||||
new FileInputStream("ignored");
|
||||
}
|
||||
*/
|
||||
|
||||
// this method has to be dynamically loaded, because
|
||||
MRJOSType domainLibrary = new MRJOSType("dlib");
|
||||
File libraryFolder = MRJFileUtils.findFolder(domainLibrary);
|
||||
//MRJFileUtils.findFolder(kUserDomain, domainLibrary);
|
||||
Method findFolderMethod =
|
||||
MRJFileUtils.class.getMethod("findFolder",
|
||||
new Class[] { Short.TYPE,
|
||||
MRJOSType.class });
|
||||
File libraryFolder = (File)
|
||||
findFolderMethod.invoke(null, new Object[] { new Short(kUserDomain),
|
||||
domainLibrary });
|
||||
|
||||
dataFolder = new File(libraryFolder, "Processing");
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
} catch (Exception e) {
|
||||
// this could be FileNotFound or NoSuchMethod
|
||||
//} catch (FileNotFoundException e) {
|
||||
//e.printStackTrace();
|
||||
//System.exit(1);
|
||||
showError("Problem getting data folder",
|
||||
|
||||
+4
-7
@@ -52,14 +52,12 @@ o not draw the sketch name bar doesn't appear"
|
||||
X include preferences.txt option to write to p5 folder first
|
||||
X this can be altered by instructors and re-packaged
|
||||
X fixed a couple bugs causing the jnilib stuff to crash
|
||||
|
||||
X put 'play' on a SwingWorker thread
|
||||
X test this on a pc to see how it goes, especially with opengl
|
||||
X doesn't seem to help anything
|
||||
X PdeRuntime -> SystemOutSiphon, removed MIN_PRIORITY setting
|
||||
o hack to not use console on the code folder
|
||||
o no errors will propogate, but it should run fine
|
||||
|
||||
X lib/build should not be a subfolder of p5
|
||||
X p5 environment installed to /Applications on lab machines
|
||||
X instead use a temp folder
|
||||
@@ -73,6 +71,10 @@ X may be subject to errors, but errs on side of just running ext)
|
||||
X runs out of processing data folder
|
||||
X fix for toolbar being one pixel off breaks the windows version
|
||||
X need to only do the fix on the mac.. ugh
|
||||
X macosx is using /Library instead of ~/Library.. get this fixed
|
||||
X domain version wasn't in the stubs.. grr
|
||||
X or maybe it's an int or something?
|
||||
X just use reflection to call the function instead
|
||||
|
||||
_ "use external editor" is broken
|
||||
_ throws exception on load()
|
||||
@@ -80,11 +82,6 @@ _ throws exception on load()
|
||||
_ if a data file is in the sketch (not data) folder export breaks
|
||||
_ works fine in the editor, but on export gets a nullpointer ex
|
||||
|
||||
_ macosx is using /Library instead of ~/Library.. get this fixed
|
||||
_ domain version wasn't in the stubs.. grr
|
||||
_ or maybe it's an int or something?
|
||||
_ just use reflection to call the function instead
|
||||
|
||||
_ preproc: making all functions public that have no specifier
|
||||
_ this will make draw() etc all much easier
|
||||
_ as well as the library events
|
||||
|
||||
Reference in New Issue
Block a user