aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-28 18:54:56 +0200
committerSven Gothel <[email protected]>2013-06-28 18:54:56 +0200
commit28ed823b1a804145b4dd741807a83570abc139e1 (patch)
tree9c03ad7796a72b8f22d05c279b0f8a51d590699d
parentc15865e0f62a3af9508245554ed9d4000403e2e0 (diff)
build: Use environment var 'PLUGIN_JAR' and property 'plugin.jar' to define plugin.jar for JavaScript bridge; Use javac debug defaults: source,lines.
-rw-r--r--.classpath2
-rw-r--r--build.xml46
-rw-r--r--make_build.sh (renamed from build.sh)3
-rwxr-xr-xscripts/check-java-major-version.sh25
4 files changed, 48 insertions, 28 deletions
diff --git a/.classpath b/.classpath
index 0b0601f..a96a039 100644
--- a/.classpath
+++ b/.classpath
@@ -3,7 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="lib" path="resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.6.0_35 (plugin)"/>
<classpathentry kind="lib" path="lib/jogamp/gluegen-rt.jar" sourcepath="lib/jogamp/gluegen-java-src.zip"/>
<classpathentry kind="lib" path="lib/jogamp/joal.jar" sourcepath="lib/jogamp/joal-java-src.zip"/>
<classpathentry kind="lib" path="lib/jogamp/jogl-all.jar" sourcepath="lib/jogamp/jogl-java-src.zip"/>
diff --git a/build.xml b/build.xml
index e2547d8..e839b62 100644
--- a/build.xml
+++ b/build.xml
@@ -2,13 +2,6 @@
<project name="jake2" default="usage" basedir=".">
<property environment="env" />
- <taskdef name="proguard" classname="proguard.ant.ProGuardTask">
- <classpath>
- <pathelement location="lib/proguard/proguard.jar"/>
- </classpath>
- </taskdef>
-
-
<taskdef name="izpack" classpath="lib/izpack/standalone-compiler.jar"
classname="com.izforge.izpack.ant.IzPackTask"/>
@@ -19,14 +12,30 @@
<property name="build" location="build"/>
<property name="dist" location="dist"/>
- <property name="javacdebug" value="false" />
- <property name="javacdebuglevel" value="" />
+ <!-- default values -->
+ <property name="javacdebug" value="true" />
+ <property name="javacdebuglevel" value="source,lines" />
+ <condition property="target.rt.jar" value="${env.PLUGIN_JAR}">
+ <not>
+ <equals arg1="${env.PLUGIN_JAR}" arg2="$${env.PLUGIN_JAR}" casesensitive="true" />
+ </not>
+ </condition>
<condition property="target.rt.jar" value="${env.TARGET_RT_JAR}">
<not>
<equals arg1="${env.TARGET_RT_JAR}" arg2="$${env.TARGET_RT_JAR}" casesensitive="true" />
</not>
</condition>
+ <condition property="plugin.jar"
+ value="${java.home}/lib/plugin.jar">
+ <available file="${java.home}/lib/plugin.jar"/>
+ </condition>
+
+ <!-- Default value for std Java (incl. Java7 on OS X) -->
+ <condition property="target.rt.jar"
+ value="${java.home}/lib/rt.jar">
+ <available file="${java.home}/lib/rt.jar"/>
+ </condition>
<!-- Default value for std Java (incl. Java7 on OS X) -->
<condition property="target.rt.jar"
value="${java.home}/lib/rt.jar">
@@ -43,7 +52,7 @@
<pathelement location="lib/jogamp/gluegen-rt.jar"/>
<pathelement location="lib/jogamp/jogl-all.jar"/>
<pathelement location="lib/jogamp/joal.jar"/>
- <!-- pathelement location="${java.home}/lib/plugin.jar"/ -->
+ <pathelement location="${plugin.jar}"/>
</path>
<!-- usage -->
@@ -127,23 +136,6 @@
<include name="*.png"/>
<include name="mirrors"/>
</jar>
- <property name="classes" value="${java.home}/lib/rt.jar"/>
- <!-- property name="plugin" value="${java.home}/lib/plugin.jar"/ -->
- <condition property="classes" value="${java.home}/../Classes/classes.jar">
- <os name="Mac OS X"/>
- </condition>
- <!-- proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar"
- defaultpackage="" overloadaggressively="off" printmapping="jake2.map">
- <injar name="jake2.jar"/>
- <libraryjar name="lib/jogamp/jogl-all.jar"/>
- <libraryjar name="lib/jogamp/joal.jar"/>
- <libraryjar name="lib/jogamp/gluegen-rt.jar"/>
- <libraryjar name="${classes}"/>
- <libraryjar name="${plugin}"/>
- <keep access="public" name="jake2.Jake2">
- <method name="main(java.lang.String[])"/>
- </keep>
- </proguard -->
</target>
<!-- everything -->
diff --git a/build.sh b/make_build.sh
index d281c61..bb05dc4 100644
--- a/build.sh
+++ b/make_build.sh
@@ -9,6 +9,9 @@ export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
# -Djavacdebug=true \
# -Djavacdebuglevel="source,lines,vars" \
+#
+# -Djavacdebug=false \
+# -Djavacdebuglevel="" \
java \
-Dant.home=lib/ant -cp $CP org.apache.tools.ant.Main -buildfile build.xml $@
diff --git a/scripts/check-java-major-version.sh b/scripts/check-java-major-version.sh
new file mode 100755
index 0000000..0e4424d
--- /dev/null
+++ b/scripts/check-java-major-version.sh
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+TDIR=`pwd`
+
+function dump_version() {
+ echo -n "$1: "
+ javap -v $1 | grep 'major version'
+}
+
+function dump_versions() {
+ cd $1
+ #dump_version jogamp.common.Debug
+ for i in `find . -name '*.class'` ; do
+ dump_version `echo $i | sed -e 's/\//./g' -e 's/\.class//g'`
+ done
+ cd $TDIR
+}
+
+function do_it() {
+ dump_versions $1/classes
+ dump_versions $1/test/build/classes
+}
+
+do_it $1 2>&1 | tee check-java-major-version.log
+