mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
working on rev 57 for macosx
This commit is contained in:
@@ -36,19 +36,60 @@ public class PdeCompiler implements PdeMessageConsumer{
|
||||
PdeException exception;
|
||||
PdeEditor editor;
|
||||
|
||||
String additional;
|
||||
|
||||
|
||||
public PdeCompiler(String buildPath, String className, PdeEditor editor) {
|
||||
this.buildPath = buildPath;
|
||||
this.className = className;
|
||||
this.editor = editor;
|
||||
}
|
||||
|
||||
|
||||
public boolean compileJava(PrintStream leechErr) {
|
||||
//System.out.println("jcp: " + System.getProperty("java.class.path"));
|
||||
//System.out.println("mrj: " + System.getProperty("com.apple.mrj.application.classpath"));
|
||||
|
||||
String userdir = System.getProperty("user.dir") + File.separator;
|
||||
|
||||
if (additional == null) {
|
||||
#ifndef MACOS
|
||||
additional = "";
|
||||
#else
|
||||
// for macosx only, doesn't work on macos9
|
||||
StringBuffer abuffer = new StringBuffer();
|
||||
|
||||
// add the build folder.. why isn't it already there?
|
||||
//abuffer.append(":" + userdir + "lib/build");
|
||||
|
||||
String list[] = new File("/System/Library/Java/Extensions").list();
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
if (list[i].endsWith(".class") || list[i].endsWith(".jar") ||
|
||||
list[i].endsWith(".zip")) {
|
||||
//abuffer.append(System.getProperty("path.separator"));
|
||||
abuffer.append(":/System/Library/Java/Extensions/" + list[i]);
|
||||
}
|
||||
}
|
||||
additional = abuffer.toString();
|
||||
#endif
|
||||
}
|
||||
|
||||
String command[] = new String[] {
|
||||
#ifdef MACOS
|
||||
userdir + "jikes",
|
||||
#else
|
||||
"jikes",
|
||||
#endif
|
||||
|
||||
// used when run without a vm ("expert" mode)
|
||||
"-bootclasspath",
|
||||
System.getProperty("sun.boot.class.path"),
|
||||
System.getProperty("sun.boot.class.path") + additional,
|
||||
|
||||
#ifdef MACOS
|
||||
// only because not tested elsewhere
|
||||
"-classpath",
|
||||
System.getProperty("java.class.path"),
|
||||
#endif
|
||||
|
||||
"-nowarn", // we're not currently interested in warnings
|
||||
"+E", // output errors in machine-parsable format
|
||||
@@ -82,6 +123,7 @@ public class PdeCompiler implements PdeMessageConsumer{
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
result = -1;
|
||||
}
|
||||
//System.err.println("result = " + result);
|
||||
@@ -97,12 +139,14 @@ public class PdeCompiler implements PdeMessageConsumer{
|
||||
return result == 0 ? true : false;
|
||||
}
|
||||
|
||||
|
||||
boolean firstErrorFound;
|
||||
boolean secondErrorFound;
|
||||
|
||||
// part of the PdeMessageConsumer interface
|
||||
//
|
||||
public void message(String s) {
|
||||
System.err.println("MSG: " + s);
|
||||
|
||||
// ignore cautions
|
||||
if (s.indexOf("Caution") != -1) return;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Proce55ing</string>
|
||||
<string>Processing</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Pde1</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
||||
+1
-3
@@ -11,9 +11,7 @@ com.apple.mrj.application.JVMVersion=1.3+
|
||||
# this will revert back to java 1.3, since 1.4 has some issues
|
||||
|
||||
|
||||
#com.apple.mrj.application.classpath=lib/build:Contents/Resources/Java/pde.jar:Contents/Resources/Java/kjc.jar:Contents/Resources/Java/oro.jar:Contents/Resources/Java/comm.jar:/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Home/lib/ext/comm.jar:/System/Library/Java/Extensions/QTJava.zip
|
||||
|
||||
com.apple.mrj.application.classpath=Contents/Resources/Java/build:Contents/Resources/Java/pde.jar:Contents/Resources/Java/kjc.jar:Contents/Resources/Java/oro.jar:Contents/Resources/Java/kjc.jar:Contents/Resources/Java/oro.jar:Contents/Resources/Java/pde.jar:Contents/Resources/Java/comm.jar
|
||||
com.apple.mrj.application.classpath=lib/build:Contents/Resources/Java/build:Contents/Resources/Java/pde.jar:Contents/Resources/Java/kjc.jar:Contents/Resources/Java/oro.jar:Contents/Resources/Java/RXTXcomm.jar
|
||||
|
||||
|
||||
com.apple.mrj.application.stdin=/dev/null
|
||||
|
||||
@@ -22,15 +22,12 @@ else
|
||||
rm reference.zip
|
||||
cd ..
|
||||
|
||||
# copy gl4java libs and jar file
|
||||
#cp ../../bagel/opengl/gl4java.jar work/lib/
|
||||
#cp ../../bagel/opengl/macosx/libGL4JavaJauGljJNI13.jnilib work/
|
||||
|
||||
mkdir work/lib/export
|
||||
mkdir work/lib/build
|
||||
|
||||
mkdir work/classes
|
||||
|
||||
# get a copy of the mac-specific properties
|
||||
cp dist/lib/pde_macosx.properties work/lib/
|
||||
|
||||
# grab serial goodies
|
||||
@@ -38,6 +35,17 @@ else
|
||||
cp ../../bagel/serial/RXTXcomm.jar work/lib/
|
||||
cp ../../bagel/serial/libSerial.jnilib work/
|
||||
|
||||
# copy gl4java libs and jar file
|
||||
# disabled till the next release when i can recompile for 1.4
|
||||
#cp ../../bagel/opengl/gl4java.jar work/lib/
|
||||
#cp ../../bagel/opengl/libGL4JavaJauGljJNI13.jnilib work/
|
||||
|
||||
# to have a copy of this guy around for messing with
|
||||
cp -a dist/Processing.app work/
|
||||
#cd work/Processing.app
|
||||
#find . -name "CVS" -depth -exec rm {} \;
|
||||
#cd ../..
|
||||
|
||||
# get jikes and depedencies
|
||||
gunzip < dist/jikes.gz > work/jikes
|
||||
chmod +x work/jikes
|
||||
@@ -98,9 +106,12 @@ echo Building PDE for JDK 1.4
|
||||
# new rxtx
|
||||
CLASSPATH=../build/macosx/work/classes:../build/macosx/work/lib/kjc.jar:../build/macosx/work/lib/oro.jar:../build/macosx/work/lib/RXTXcomm.jar:$MACOSX_CLASSPATH
|
||||
|
||||
perl ../bagel/buzz.pl "jikes +D -classpath $CLASSPATH -d ../build/macosx/work/classes" -dJDK13 -dJDK14 -dMACOS *.java jeditsyntax/*.java
|
||||
perl ../bagel/buzz.pl "jikes +D -classpath $CLASSPATH -d ../build/macosx/work/classes" -dJDK13 -dJDK14 -dMACOS -dRXTX *.java jeditsyntax/*.java
|
||||
|
||||
cd ../build/macosx/work/classes
|
||||
rm -f ../lib/pde.jar
|
||||
zip -0q ../lib/pde.jar *.class
|
||||
cd ../..
|
||||
|
||||
# get the libs
|
||||
cp work/lib/*.jar work/Processing.app/Contents/Resources/Java/
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
#CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Home/lib/ext/comm.jar:/System/Library/Java/Extensions/QTJava.zip:lib:lib/build:lib/pde.jar:lib/kjc.jar:lib/oro.jar:../comm.jar
|
||||
|
||||
# rxtx 2.1.6
|
||||
CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Home/lib/ext/comm.jar:/System/Library/Java/Extensions/QTJava.zip:lib:lib/build:lib/pde.jar:lib/kjc.jar:lib/oro.jar:lib/RXTXcomm.jar
|
||||
#CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Home/lib/ext/comm.jar:/System/Library/Java/Extensions/QTJava.zip:lib:lib/build:lib/pde.jar:lib/kjc.jar:lib/oro.jar:lib/RXTXcomm.jar
|
||||
|
||||
# is qt java already included tho?
|
||||
CLASSPATH=/System/Library/Java/Extensions/QTJava.zip:lib:lib/build:lib/pde.jar:lib/kjc.jar:lib/oro.jar:lib/RXTXcomm.jar
|
||||
|
||||
export CLASSPATH
|
||||
|
||||
|
||||
+6
-5
@@ -215,6 +215,12 @@ _ write script to handle installation, etc.
|
||||
_ (maybe do this from inside p5?)
|
||||
|
||||
|
||||
windows
|
||||
_ see if mods to PdeCompiler work on windows
|
||||
_ modify build instructions for the many changes
|
||||
_ i.e. buzz.pl requires jdk13+ set for JDK13 flag, used by p5
|
||||
|
||||
|
||||
linux
|
||||
_ make mention that linux is i386
|
||||
_ bring linux up to 1.4
|
||||
@@ -223,11 +229,6 @@ _ make sure a copy of jikes is included
|
||||
_ test rxtx on linux with sun vm
|
||||
|
||||
|
||||
windows
|
||||
_ modify build instructions for the many changes
|
||||
_ i.e. buzz.pl requires jdk13+ set for JDK13 flag, used by p5
|
||||
|
||||
|
||||
..................................................................
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user