Jogamp
build: Use environment var 'PLUGIN_JAR' and property 'plugin.jar' to define plugin...
authorSven Gothel <sgothel@jausoft.com>
Fri, 28 Jun 2013 16:54:56 +0000 (18:54 +0200)
committerSven Gothel <sgothel@jausoft.com>
Fri, 28 Jun 2013 16:54:56 +0000 (18:54 +0200)
.classpath
build.xml
make_build.sh [moved from build.sh with 87% similarity]
scripts/check-java-major-version.sh [new file with mode: 0755]

index 0b0601f..a96a039 100644 (file)
@@ -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"/>
index e2547d8..e839b62 100644 (file)
--- 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"/>
          
     <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 -->
             <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 -->
similarity index 87%
rename from build.sh
rename to make_build.sh
index d281c61..bb05dc4 100644 (file)
--- a/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 (executable)
index 0000000..0e4424d
--- /dev/null
@@ -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
+
http://JogAmp.org git info: FAQ, tutorial and man pages.