diff options
author | Sven Gothel <[email protected]> | 2010-12-13 18:17:23 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-13 18:17:23 +0100 |
commit | 3c93ac460786fad7715b1cbf29f70a7dd668ca74 (patch) | |
tree | ddd005139528c82bce1af5d9bb3930d52e8ff361 | |
parent | 5254fe67ca8cfb9867184a9abdfcd19fb829c14a (diff) |
fix running demos from ant
-rwxr-xr-x | make/build.xml | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/make/build.xml b/make/build.xml index 73e9321..ff28751 100755 --- a/make/build.xml +++ b/make/build.xml @@ -28,12 +28,18 @@ <property name="gluegen.root" value="${project.root}/../gluegen" /> <property name="gluegen.build" value="${gluegen.root}/${rootrel.build}" /> + <property name="joal.root" value="${project.root}/../joal" /> + <property name="joal.build" value="${joal.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"/> + <!-- Pull in GlueGen cpptasks build file --> + <import file="${gluegen.root}/make/gluegen-cpptasks.xml" /> + <!-- - Make sure that joal-demos.jar is not on the CLASSPATH; this can - cause builds to fail since if this Java process has the jar file @@ -54,8 +60,9 @@ </fail> </target> - <target name="init" depends="java.class.path.validate"> - <property name="joal.jar" value="../../joal/${rootrel.build}/joal.jar" /> + <target name="init" depends="java.class.path.validate, gluegen.cpptasks.detect.os"> + <property name="gluegen-rt.jar" value="${gluegen.build}/gluegen-rt.jar" /> + <property name="joal.jar" value="${joal.build}/joal.jar" /> <property name="src.dir" value="../src" /> <property name="classes.dir" value="${build}/classes" /> @@ -64,6 +71,8 @@ <property name="archive.name" value="joal-demos-${joal-demos.version}" /> <property name="archive" value="${build}/${archive.name}" /> + + <property name="obj.all.paths" value="${gluegen.build}/obj${path.separator}${joal.build}/obj" /> </target> <target name="all" depends="jar, tag.build, developer-zip-archive"/> @@ -138,7 +147,10 @@ <target name="lesson1" depends="jar" description="Run lesson1 (Single Static Source)"> <java classname="demos.devmaster.lesson1.SingleStaticSource" fork="true"> + <env key="${system.env.library.path}" path="${obj.all.paths}"/> + <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <classpath> + <pathelement location="${gluegen-rt.jar}" /> <pathelement location="${joal.jar}" /> <pathelement location="${joal.demos.jar}" /> </classpath> @@ -147,7 +159,10 @@ <target name="lesson2" depends="jar" description="Run lesson2 (Looping and Fade Away)"> <java classname="demos.devmaster.lesson2.LoopingAndFadeaway" fork="true"> + <env key="${system.env.library.path}" path="${obj.all.paths}"/> + <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <classpath> + <pathelement location="${gluegen-rt.jar}" /> <pathelement location="${joal.jar}" /> <pathelement location="${joal.demos.jar}" /> </classpath> @@ -156,7 +171,10 @@ <target name="lesson3" depends="jar" description="Run lesson3 (Multiple Sources)"> <java classname="demos.devmaster.lesson3.MultipleSources" fork="true"> + <env key="${system.env.library.path}" path="${obj.all.paths}"/> + <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <classpath> + <pathelement location="${gluegen-rt.jar}" /> <pathelement location="${joal.jar}" /> <pathelement location="${joal.demos.jar}" /> </classpath> @@ -165,7 +183,10 @@ <target name="lesson5" depends="jar" description="Run lesson5 (Sources Sharing Buffers)"> <java classname="demos.devmaster.lesson5.SourcesSharingBuffers" fork="true"> + <env key="${system.env.library.path}" path="${obj.all.paths}"/> + <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <classpath> + <pathelement location="${gluegen-rt.jar}" /> <pathelement location="${joal.jar}" /> <pathelement location="${joal.demos.jar}" /> </classpath> @@ -174,7 +195,10 @@ <target name="lesson8" depends="jar" description="Run lesson8 (Ogg/Vorbis Streaming)"> <java classname="demos.devmaster.lesson8.OggStreamer" fork="true"> + <env key="${system.env.library.path}" path="${obj.all.paths}"/> + <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <classpath> + <pathelement location="${gluegen-rt.jar}" /> <pathelement location="${joal.jar}" /> <pathelement location="${joal.demos.jar}" /> <pathelement location="${build}/j-ogg-oggd.jar" /> |