Jogamp
Adapt to JogAmp build infrastructure (get rid of 'dist' folder, drop jnlp files in...
authorSven Gothel <sgothel@jausoft.com>
Sat, 25 Aug 2012 13:22:20 +0000 (15:22 +0200)
committerSven Gothel <sgothel@jausoft.com>
Sat, 25 Aug 2012 13:22:20 +0000 (15:22 +0200)
build.xml
demo-template.jnlp
nbproject/project.properties
scripts/make.jogl.all.linux-x86_64.sh

index 3023166..bf355e2 100644 (file)
--- a/build.xml
+++ b/build.xml
     <target name="-post-jar" depends="tag.build,create-all-jnlps,gluegen.cpptasks.detect.os,build-archive"/>
 
     <target name="build-archive" if="build.archiveon">
-        <property name="dist.zip.name" value="jocl-demos-${jocl-demos.version}-${os.and.arch}"/>
+        <property name="archive.zip.name" value="jocl-demos-${jocl-demos.version}-${os.and.arch}"/>
         
-        <mkdir dir="${dist.dir}/tmp/${dist.zip.name}"/>
+        <mkdir dir="${build.dir}/${archive.zip.name}"/>
         
-        <copy todir="${dist.dir}/tmp/${dist.zip.name}/jar" file="${dist.dir}/jocl-demos.jar"/>
-        <copy todir="${dist.dir}/tmp/${dist.zip.name}/jnlp-files" >
-            <fileset dir="${dist.dir}" includes="*.jnlp"/>
-        </copy>
-        <copy todir="${dist.dir}/tmp/${dist.zip.name}" >
+        <copy todir="${build.dir}/${archive.zip.name}" >
             <fileset dir="." includes="www/**"/>
-            <fileset dir="${dist.dir}" includes="*.properties"/>
+            <fileset dir="${build.dir}" includes="jar/**"/>
+            <fileset dir="${build.dir}" includes="jnlp-files/**"/>
+            <fileset dir="${build.dir}" includes="*.properties"/>
         </copy>
         
-        <zip        basedir="${dist.dir}/tmp" destfile="${dist.dir}/${dist.zip.name}.zip"/>
-        <archive.7z basedir="${dist.dir}/tmp" destfile="${dist.dir}/${dist.zip.name}.7z"  includes="*"/>
+        <archive.7z basedir="${build.dir}" destfile="${build.dir}/${archive.zip.name}.7z"  includes="${archive.zip.name}/**"/>
 
-        <delete dir="${dist.dir}/tmp"/>
+        <delete dir="${build.dir}/${archive.zip.name}"/>
         
     </target>
 
     <target name="create-all-jnlps">
 
+        <!-- preset properties for local testing -->
         <property name="jocl.codepase"       value="JOCL_CODEBASE_TAG"/>
         <property name="jogl.codepase"       value="JOGL_CODEBASE_TAG"/>
         <property name="jocl-demos.codepase" value="DEMO_CODEBASE_TAG"/>
     </target>
 
     <target name="tag.build">
-        <property file="${dist.jar.dir}/artifact.properties"/>
-        <copy file="${jocl.root}/dist/artifact.properties" todir="${dist.jar.dir}" overwrite="true"/>
-        <echo file="${dist.jar.dir}/artifact.properties" message="jocl-demos.build.number=${jocl-demos.build.number}${line.separator}" append="true" />
-        <echo file="${dist.jar.dir}/artifact.properties" message="jocl-demos.build.id=${jocl-demos.build.id}${line.separator}" append="true" />
-        <echo file="${dist.jar.dir}/artifact.properties" message="jocl-demos.build.branch=${jocl-demos.build.branch}${line.separator}" append="true" />
-        <echo file="${dist.jar.dir}/artifact.properties" message="jocl-demos.build.commit=${jocl-demos.build.commit}${line.separator}" append="true" />
+        <copy file="${jocl.root}/dist/artifact.properties" todir="${build.dir}" overwrite="true"/>
+        <echo file="${build.dir}/artifact.properties" message="jocl-demos.build.number=${jocl-demos.build.number}${line.separator}" append="true" />
+        <echo file="${build.dir}/artifact.properties" message="jocl-demos.build.id=${jocl-demos.build.id}${line.separator}" append="true" />
+        <echo file="${build.dir}/artifact.properties" message="jocl-demos.build.branch=${jocl-demos.build.branch}${line.separator}" append="true" />
+        <echo file="${build.dir}/artifact.properties" message="jocl-demos.build.commit=${jocl-demos.build.commit}${line.separator}" append="true" />
     </target>
 
     <target name="create-jnlp">
         <condition  property="jogl.extension"
-                    value='&lt;extension name="newt-all-awt" href="${jogl.codepase}/newt-all-awt.jnlp"/&gt;'
+                    value='&lt;extension name="jogl-all-awt" href="${jogl.codepase}/jogl-all-awt.jnlp"/&gt;'
                     else="">
             <istrue value="${jnlp.jogl}"/>
         </condition>
-        <copy file="demo-template.jnlp" tofile="${dist.jar.dir}/${jnlp.name}.jnlp">
+        <copy file="demo-template.jnlp" tofile="${build.dir}/jnlp-files/${jnlp.name}.jnlp">
             <filterchain>
                 <replacestring from="DEMO_TITLE" to="${jnlp.title}"/>
                 <replacestring from="NAME_TAG" to="${jnlp.name}"/>
index 42ff928..732fe86 100644 (file)
@@ -13,7 +13,7 @@
     <resources>
         <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
         <property name="sun.java2d.noddraw" value="true"/>
-        <jar href="jocl-demos.jar" main="true"/>
+        <jar href="jar/jocl-demos.jar" main="true"/>
         <extension name="jocl" href="JOCL_CODEBASE_TAG/jocl.jnlp" />
         EXTENSION
     </resources>
index 9724ff6..efda83e 100644 (file)
@@ -29,8 +29,8 @@ debug.classpath=\
 debug.test.classpath=\
     ${run.test.classpath}
 # This directory is removed when the project is cleaned:
-dist.dir=dist
-dist.jar=${dist.dir}/jocl-demos.jar
+dist.dir=${build.dir}
+dist.jar=${dist.dir}/jar/jocl-demos.jar
 dist.javadoc.dir=${dist.dir}/javadoc
 endorsed.classpath=
 excludes=
index d3cb547..542be1f 100644 (file)
@@ -8,6 +8,7 @@ fi
 #    -Dtarget.targetlevel=1.6 \
 #    -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
 
+BUILD_ARCHIVE=true \
 ant  \
     -Dtarget.sourcelevel=1.6 \
     -Dtarget.targetlevel=1.6 \
http://JogAmp.org git info: FAQ, tutorial and man pages.