attempt to get javac running, especially for macos9

This commit is contained in:
benfry
2003-07-25 22:27:53 +00:00
parent 48b46c50ed
commit 68c0fb3810
6 changed files with 42 additions and 13 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ import java.io.*;
public class PdeCompiler implements PdeMessageConsumer{
static final String SUPER_BADNESS =
"Strange error while compiling, " +
"please send this code to processing@media.mit.edu";
"please send code to processing@media.mit.edu";
String buildPath;
String className;
+22 -4
View File
@@ -26,6 +26,20 @@
import java.io.*;
// this class is incomplete. it was added in an attempt to support
// mac os 9, but the javac for jdk 1.1 doesn't seem to like the
// file format of the classes produced by jikes, which is revision
// 57 code instead of rev 55.
// using jikes -target 1.1 doesn't seem to help. the next attempt
// was to use javac from the 1.1 jdk, which i attempted to hack
// into the bagel build scripts, but javac actually crashed (not
// just and exception, but an application crash) whenever used
// (especially if called on long paths/from another directory).
// there are plenty of ways to address this, but for the time being,
// it's not worth the time so we'll just suspend macos9 support.
public class PdeCompilerJavac extends PdeCompiler {
public PdeCompilerJavac(String buildPath,
@@ -38,15 +52,19 @@ public class PdeCompilerJavac extends PdeCompiler {
// probably not needed with javac
//System.setErr(leechErr); // redirect stderr to our leech filter
String args[] = new String[3];
args[0] = "-d" + buildPath;
args[1] = "-nowarn";
args[2] = buildPath + File.separator + className + ".java";
int argc = 0;
String args[] = new String[4];
args[argc++] = "-d";
args[argc++] = buildPath;
args[argc++] = "-nowarn";
args[argc++] = buildPath + File.separator + className + ".java";
//System.out.println("args = " + args[0] + " " + args[1]);
#ifdef JAVAC
System.out.println("compiling with javac");
return new sun.tools.javac.Main(leechErr, "javac").compile(args);
#else
System.out.println("compile fell thru");
return false;
#endif
+6 -3
View File
@@ -694,9 +694,12 @@ afterwards, some of these steps need a cleanup function
// compile the program
//
PdeCompiler compiler =
((PdeBase.platform == PdeBase.MACOS9) ?
new PdeCompilerJavac(buildPath, className, this) :
new PdeCompiler(buildPath, className, this));
new PdeCompiler(buildPath, className, this);
// macos9 now officially broken.. see PdeCompilerJavac
//PdeCompiler compiler =
// ((PdeBase.platform == PdeBase.MACOS9) ?
// new PdeCompilerJavac(buildPath, className, this) :
// new PdeCompiler(buildPath, className, this));
// this will catch and parse errors during compilation
messageStream = new PdeMessageStream(this, compiler);
+7 -1
View File
@@ -104,12 +104,18 @@ cd app
CLASSPATH="..\\build\\windows\\work\\classes;..\\build\\windows\\work\\lib\\kjc.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\java\\lib\\ext\\comm.jar"
# version for javac/1.1 testing
#CLASSPATH="..\\build\\windows\\work\\classes;..\\build\\windows\\work\\lib\\kjc.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\java\\lib\\ext\\comm.jar;..\\build\\macos9\\JDKClasses.zip;..\\build\\macos9\\JDKToolsClasses.zip"
perl ../bagel/buzz.pl "jikes +D -classpath \"$CLASSPATH\" -d \"..\\build\\windows\\work/classes\"" -dJDK13 -dJDK14 *.java jeditsyntax/*.java
# version for javac/1.1 testing
#perl ../bagel/buzz.pl "jikes -target 1.1 +D -classpath \"$CLASSPATH\" -d \"..\\build\\windows\\work/classes\"" -dJAVAC *.java jeditsyntax/*.java
#perl ../bagel/buzz.pl "javac -classpath \"$CLASSPATH\" -d \"..\\build\\windows\\work/classes\"" -dJAVAC *.java jeditsyntax/*.java
cd ../build/windows/work/classes
rm -f ../lib/pde.jar
zip -0q ../lib/pde.jar *.class
# back to 'build' dir
cd ../../..
+3
View File
@@ -14,4 +14,7 @@ fi
CLASSPATH=java\\lib\\rt.jar\;lib\;lib\\build\;lib\\pde.jar\;lib\\kjc.jar\;lib\\oro.jar\;java\\lib\\ext\\comm.jar\;${QT_JAVA_PATH}
# version for javac/1.1 testing
#CLASSPATH=java\\lib\\rt.jar\;lib\;lib\\build\;lib\\pde.jar\;lib\\kjc.jar\;lib\\oro.jar\;java\\lib\\ext\\comm.jar\;${QT_JAVA_PATH}\;..\\..\\macos9\\JDKClasses.zip\;..\\..\\macos9\\JDKToolsClasses.zip
cd work && ./java/bin/java -cp ${CLASSPATH} PdeBase
+3 -4
View File
@@ -17,6 +17,8 @@ X cleanup cvs bunk
X modify build/dist to use processing.exe
X upgrade windows to jre 1.4.2
X ask on bboard about macosx 1.3 vs 1.4 experiences
X modified millis() to always update
X http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1058465635;start=
dh X save last-used serial to sketch.properties on quit
dh X rename sketch 'can't rename' error (file being kept open)
@@ -26,7 +28,6 @@ dh X open sketch, make a change, save, run, rename -> error
..................................................................
_ try installing serial adapter with p5
_ tom igoe is using rxtx 2.1.6, patch that into p5
_ libs from 2.1.6 download for osx seem to work
@@ -34,14 +35,12 @@ _ write script to handle installation, etc.
_ (maybe do this from inside p5?)
_ will need to be done for gl4java as well
bf _ bring linux up to 1.4
bf _ pde_keywords.properties isn't getting copied into work/lib
mac stuff
bf _ set nice background for disk image on macosx
bf _ bring linux up to 1.4
language stuff
bf _ actionscript has nice hastables.. as does perl/python
bf _ would be nice to get better implementation in there