summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-13 18:03:12 +0100
committerSven Gothel <[email protected]>2010-12-13 18:03:12 +0100
commit5254fe67ca8cfb9867184a9abdfcd19fb829c14a (patch)
treeb69a80b3cc65a0a2d0509c4be97a0f2b4afab66a /make
parent0535d5075bacb4d4d56bc807310722b073a1412e (diff)
enable joal-demos
Diffstat (limited to 'make')
-rwxr-xr-xmake/build.xml108
-rw-r--r--make/scripts/make.joal-demos.all.linux-x86_64.sh23
-rwxr-xr-xmake/scripts/make.joal-demos.all.win32.bat12
-rwxr-xr-xmake/scripts/make.joal-demos.all.win64.bat12
4 files changed, 124 insertions, 31 deletions
diff --git a/make/build.xml b/make/build.xml
index fad000d..73e9321 100755
--- a/make/build.xml
+++ b/make/build.xml
@@ -10,11 +10,29 @@
- built into its build directory.
-->
<project name="JOAL.demos" default="all">
- <condition property="rootrel.build" value="build">
+ <property name="joal-demos_base_version" value="2.0"/>
+ <tstamp>
+ <format property="version.timestamp" pattern="yyyyMMdd"/>
+ </tstamp>
+ <property name="joal-demos.version" value="${joal-demos_base_version}-${version.timestamp}" />
+
+ <property name="project.root" value=".." />
+
+ <condition property="rootrel.build" value="build">
<not>
<isset property="rootrel.build"/>
</not>
- </condition>
+ </condition>
+ <property name="build" location="${project.root}/${rootrel.build}" />
+
+ <property name="gluegen.root" value="${project.root}/../gluegen" />
+ <property name="gluegen.build" value="${gluegen.root}/${rootrel.build}" />
+
+ <property file="${build}/artifact.properties"/>
+ <property name="joal-demos.build.number" value="manual-build"/>
+ <property name="joal-demos.build.id" value="${version.timestamp}"/>
+ <property name="joal-demos.build.branch" value="master"/>
+ <property name="joal-demos.build.commit" value="manual"/>
<!--
- Make sure that joal-demos.jar is not on the CLASSPATH; this can
@@ -39,22 +57,49 @@
<target name="init" depends="java.class.path.validate">
<property name="joal.jar" value="../../joal/${rootrel.build}/joal.jar" />
- <property name="build.dir" value="../${rootrel.build}" />
<property name="src.dir" value="../src" />
- <property name="classes.dir" value="${build.dir}/classes" />
- <property name="joal.demos.jar" value="${build.dir}/joal-demos.jar" />
- <property name="joal.demos.src.zip" value="${build.dir}/joal-demos-src.zip" />
+ <property name="classes.dir" value="${build}/classes" />
+ <property name="joal.demos.jar" value="${build}/joal-demos.jar" />
+ <property name="joal.demos.src.zip" value="${build}/joal-demos-src.zip" />
+
+ <property name="archive.name" value="joal-demos-${joal-demos.version}" />
+ <property name="archive" value="${build}/${archive.name}" />
</target>
- <target name="all" depends="jar" description="Build everything">
+ <target name="all" depends="jar, tag.build, developer-zip-archive"/>
+
+ <!-- Build binary zip archives for developers -->
+ <target name="developer-zip-archive" depends="init" unless="build.noarchives">
+ <!-- Clean up and create temporary directory -->
+ <delete includeEmptyDirs="true" quiet="true" dir="${archive}" failonerror="false" />
+ <mkdir dir="${archive}" />
+ <copy file="${build}/artifact.properties" todir="${archive}"/>
+ <mkdir dir="${archive}/jar" />
+ <copy todir="${archive}/jar">
+ <fileset dir="${build}" includes="*.jar"/>
+ </copy>
+ <mkdir dir="${archive}/jnlp-files" />
+ <copy todir="${archive}/jnlp-files">
+ <fileset dir="${project.root}/jnlp-files" includes="*" />
+ </copy>
+ <mkdir dir="${archive}/www" />
+ <copy todir="${archive}/www">
+ <fileset dir="${project.root}/www" includes="*" />
+ </copy>
+ <delete quiet="true" file="${build}/${archive.name}.zip"/>
+ <zip destfile="${build}/${archive.name}.zip"
+ basedir="${build}"
+ includes="${archive.name}/**" />
+ <!-- Clean up after ourselves -->
+ <delete includeEmptyDirs="true" quiet="true" dir="${archive}" failonerror="false" />
+ </target>
- <!-- Build a source archive as well -->
- <delete file="${joal.demos.src.zip}" />
- <zip destfile="${joal.demos.src.zip}"
- basedir="../.."
- includes="joal-demos/make/**,joal-demos/src/**"
- excludes="**/*.class,**/*~"
- />
+ <target name="tag.build">
+ <copy file="${gluegen.build}/artifact.properties" todir="${build}" overwrite="true"/>
+ <echo message='joal-demos.build.number=${joal-demos.build.number}${line.separator}' file="${build}/artifact.properties" append="true"/>
+ <echo message='joal-demos.build.id=${joal-demos.build.id}${line.separator}' file="${build}/artifact.properties" append="true"/>
+ <echo message='joal-demos.build.branch=${joal-demos.build.branch}${line.separator}' file="${build}/artifact.properties" append="true"/>
+ <echo message='joal-demos.build.commit=${joal-demos.build.commit}${line.separator}' file="${build}/artifact.properties" append="true"/>
</target>
<target name="jar" depends="compile" description="Build JOAL demos jar file">
@@ -69,15 +114,15 @@
<target name="compile" depends="init">
<mkdir dir="${classes.dir}" />
- <copy todir="${build.dir}">
- <fileset dir="${src.dir}/java/demos/lib" includes="j-ogg-*.jar" />
- </copy>
+ <copy todir="${build}">
+ <fileset dir="${src.dir}/java/demos/lib" includes="j-ogg-*.jar" />
+ </copy>
<path id="joal.classpath">
<pathelement path="${classpath}" />
<pathelement location="${joal.jar}" />
- <pathelement location="${build.dir}/j-ogg-oggd.jar" />
- <pathelement location="${build.dir}/j-ogg-vorbisd.jar" />
+ <pathelement location="${build}/j-ogg-oggd.jar" />
+ <pathelement location="${build}/j-ogg-vorbisd.jar" />
</path>
<javac destdir="${classes.dir}" source="1.4" debug="true" debuglevel="source,lines">
<src path="${src.dir}" />
@@ -94,8 +139,8 @@
<target name="lesson1" depends="jar" description="Run lesson1 (Single Static Source)">
<java classname="demos.devmaster.lesson1.SingleStaticSource" fork="true">
<classpath>
- <pathelement location="${joal.jar}" />
- <pathelement location="${joal.demos.jar}" />
+ <pathelement location="${joal.jar}" />
+ <pathelement location="${joal.demos.jar}" />
</classpath>
</java>
</target>
@@ -103,8 +148,8 @@
<target name="lesson2" depends="jar" description="Run lesson2 (Looping and Fade Away)">
<java classname="demos.devmaster.lesson2.LoopingAndFadeaway" fork="true">
<classpath>
- <pathelement location="${joal.jar}" />
- <pathelement location="${joal.demos.jar}" />
+ <pathelement location="${joal.jar}" />
+ <pathelement location="${joal.demos.jar}" />
</classpath>
</java>
</target>
@@ -112,8 +157,8 @@
<target name="lesson3" depends="jar" description="Run lesson3 (Multiple Sources)">
<java classname="demos.devmaster.lesson3.MultipleSources" fork="true">
<classpath>
- <pathelement location="${joal.jar}" />
- <pathelement location="${joal.demos.jar}" />
+ <pathelement location="${joal.jar}" />
+ <pathelement location="${joal.demos.jar}" />
</classpath>
</java>
</target>
@@ -121,8 +166,8 @@
<target name="lesson5" depends="jar" description="Run lesson5 (Sources Sharing Buffers)">
<java classname="demos.devmaster.lesson5.SourcesSharingBuffers" fork="true">
<classpath>
- <pathelement location="${joal.jar}" />
- <pathelement location="${joal.demos.jar}" />
+ <pathelement location="${joal.jar}" />
+ <pathelement location="${joal.demos.jar}" />
</classpath>
</java>
</target>
@@ -130,11 +175,12 @@
<target name="lesson8" depends="jar" description="Run lesson8 (Ogg/Vorbis Streaming)">
<java classname="demos.devmaster.lesson8.OggStreamer" fork="true">
<classpath>
- <pathelement location="${joal.jar}" />
- <pathelement location="${joal.demos.jar}" />
- <pathelement location="${build.dir}/j-ogg-oggd.jar" />
- <pathelement location="${build.dir}/j-ogg-vorbisd.jar" />
+ <pathelement location="${joal.jar}" />
+ <pathelement location="${joal.demos.jar}" />
+ <pathelement location="${build}/j-ogg-oggd.jar" />
+ <pathelement location="${build}/j-ogg-vorbisd.jar" />
</classpath>
</java>
</target>
</project>
+
diff --git a/make/scripts/make.joal-demos.all.linux-x86_64.sh b/make/scripts/make.joal-demos.all.linux-x86_64.sh
new file mode 100644
index 0000000..746cf2d
--- /dev/null
+++ b/make/scripts/make.joal-demos.all.linux-x86_64.sh
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+if [ -e ../../setenv-build-jogl-x86_64.sh ] ; then
+ . ../../setenv-build-jogl-x86_64.sh
+fi
+
+if [ -z "$ANT_PATH" ] ; then
+ if [ -e /usr/share/ant/bin/ant -a -e /usr/share/ant/lib/ant.jar ] ; then
+ ANT_PATH=/usr/share/ant
+ export ANT_PATH
+ echo autosetting ANT_PATH to $ANT_PATH
+ fi
+fi
+if [ -z "$ANT_PATH" ] ; then
+ echo ANT_PATH does not exist, set it
+ exit
+fi
+
+# -Drootrel.build=build-x86_64 \
+
+ant \
+ -Drootrel.build=build-x86_64 \
+ $* 2>&1 | tee make.joal-demos.all.linux-x86_64.log
diff --git a/make/scripts/make.joal-demos.all.win32.bat b/make/scripts/make.joal-demos.all.win32.bat
new file mode 100755
index 0000000..49c5b45
--- /dev/null
+++ b/make/scripts/make.joal-demos.all.win32.bat
@@ -0,0 +1,12 @@
+set J2RE_HOME=c:\jre1.6.0_22_x32
+set JAVA_HOME=c:\jdk1.6.0_22_x32
+set ANT_PATH=C:\apache-ant-1.8.0
+
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
+
+set LIB_GEN=%THISDIR%\lib
+set CLASSPATH=.;%THISDIR%\build-win32\classes
+REM -Dc.compiler.debug=true
+REM -Dbuild.noarchives=true
+
+ant -Dbuild.noarchives=true -Drootrel.build=build-win32 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.joal-demos.all.win32.log 2>&1
diff --git a/make/scripts/make.joal-demos.all.win64.bat b/make/scripts/make.joal-demos.all.win64.bat
new file mode 100755
index 0000000..75de379
--- /dev/null
+++ b/make/scripts/make.joal-demos.all.win64.bat
@@ -0,0 +1,12 @@
+set J2RE_HOME=c:\jre1.6.0_22_x64
+set JAVA_HOME=c:\jdk1.6.0_22_x64
+set ANT_PATH=C:\apache-ant-1.8.0
+
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;c:\mingw\bin;%PATH%
+
+set LIB_GEN=%THISDIR%\lib
+set CLASSPATH=.;%THISDIR%\build-win64\classes
+REM -Dc.compiler.debug=true
+REM -Dbuild.noarchives=true
+
+ant -Dc.compiler.debug=true -Dbuild.noarchives=true -Drootrel.build=build-win64 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.joal-demos.all.win64.log 2>&1