John_Lee
YaBB Newbies
Offline
Posts: 1
build & run on linux x86_64
Sep 23rd , 2008, 12:07pm
this patch is obsolete now. please ignore it. --- Hi, The following patch makes processing build & run on linux x86_64 platform. The idea is to use native java runtime and executable. IMHO shipping and using platform specific binaries isn't really necessary here. From: John Lee <john_lee@openmoko.com> Date: Tue, 23 Sep 2008 16:42:53 +0800 Subject: [PATCH] use local rt libs and java executable to build and run. this enables processing on platforms other then i686. Signed-off-by: John Lee <john_lee@openmoko.com> --- processing/build/linux/dist/processing | 3 --- processing/build/linux/make.sh | 32 ++++++++------------------------ 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/processing/build/linux/dist/processing b/processing/build/linux/dist/processing index e02e551..5ae29ff 100755 --- a/processing/build/linux/dist/processing +++ b/processing/build/linux/dist/processing @@ -3,7 +3,6 @@ APPDIR="$(dirname -- "${0}")" for LIB in \ - java/lib/rt.jar \ java/lib/tools.jar \ lib/*.jar \ ; @@ -12,6 +11,4 @@ do done export CLASSPATH -export PATH="${APPDIR}/java/bin:${PATH}" - java processing.app.Base diff --git a/processing/build/linux/make.sh b/processing/build/linux/make.sh index 8d2455a..4fadb71 100755 --- a/processing/build/linux/make.sh +++ b/processing/build/linux/make.sh @@ -1,5 +1,6 @@ #!/bin/sh +JAVA=java ### -- SETUP WORK DIR ------------------------------------------- @@ -36,25 +37,8 @@ else install -m 755 dist/processing work/processing - ARCH=`uname -m` - if [ $ARCH = "i686" ] - then - echo Extracting JRE... - tar --extract --file=jre.tgz --ungzip --directory=work - else -# echo This is not my beautiful house. -# if [ $ARCH = "x86_64" ] -# then -# echo You gots the 64. -# fi - echo " -The Java bundle that is included with Processing supports only i686 by default. -To build the code, you will need to install the Java 1.5.0_15 JDK (not a JRE, -and not any other version), and create a symlink to the directory where it is -installed. Create the symlink in the \"work\" directory, and named it \"java\": -ln -s /path/to/jdk1.5.0_15 `pwd`/work/java" - exit - fi + echo Extracting JRE... + tar --extract --file=jre.tgz --ungzip --directory=work fi cd ../.. @@ -72,7 +56,7 @@ cd core perl preproc.pl mkdir -p bin -../build/linux/work/java/bin/java \ +${JAVA} \ -cp ../build/linux/work/java/lib/tools.jar \ com.sun.tools.javac.Main \ -d bin -source 1.5 -target 1.5 src/processing/core/*.java @@ -94,7 +78,7 @@ cd app echo Building antlr grammar code... # first build the default java goop -../build/linux/work/java/bin/java \ +${JAVA} \ -cp ../build/linux/work/lib/antlr.jar antlr.Tool \ -o src/antlr/java \ src/antlr/java/java.g @@ -108,7 +92,7 @@ cd app # so it's necessary to cd into the antlr/java folder, otherwise # the JavaTokenTypes.txt file won't be found cd src/antlr/java -../../../../build/linux/work/java/bin/java \ +${JAVA} \ -cp ../../../../build/linux/work/lib/antlr.jar antlr.Tool \ -o ../../processing/app/preproc \ -glib java.g \ @@ -126,7 +110,7 @@ cd app rm -rf ../build/linux/work/classes mkdir ../build/linux/work/classes -../build/linux/work/java/bin/java \ +${JAVA} \ -cp ../build/linux/work/java/lib/tools.jar \ com.sun.tools.javac.Main \ -source 1.5 -target 1.5 \ @@ -153,7 +137,7 @@ cd build/linux PLATFORM=linux -JAVAC="../build/linux/work/java/bin/java -cp ../build/linux/work/java/lib/tools.jar com.sun.tools.javac.Main -source 1.5 -target 1.5" +JAVAC="${JAVA} -cp ../build/linux/work/java/lib/tools.jar com.sun.tools.javac.Main -source 1.5 -target 1.5" CORE=../build/$PLATFORM/work/lib/core.jar LIBRARIES=../build/$PLATFORM/work/libraries -- 1.5.6.5