summaryrefslogtreecommitdiffstats
path: root/build.xml
blob: eb077a8106fa09f5b20c23b636b7ffa228616a37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="UTF-8"?>

<project name="jocl-demos" default="default" basedir=".">
    <description>Builds, tests, and runs the project jocl-demos.</description>

    <condition property="rootrel.build" value="build">
      <not>
          <isset property="rootrel.build"/>
      </not>
    </condition>

    <import file="nbproject/build-impl.xml"/>

    <target name="-post-jar" depends="tag.build,create-all-jnlps"/>

    <target name="create-all-jnlps">

        <property name="jocl.codepase"       value="http://jogamp.org/deployment/webstart-next/jocl"/>
        <property name="jocl-demos.codepase" value="http://jogamp.org/deployment/webstart-next/jocl-demos"/>
        
        <antcall target="create-jnlp" inheritrefs="true">
            <param name="jnlp.name"         value="glclinterop"/>
            <param name="jnlp.title"        value="JOGL - JOCL interoperability example."/>
            <param name="jnlp.jogl"         value="true"/>
            <param name="jnlp.mainclass"    value="com.jogamp.opencl.demos.joglinterop.GLCLInteroperabilityDemo"/>
        </antcall>

        <antcall target="create-jnlp" inheritrefs="true">
            <param name="jnlp.name"         value="julia3d"/>
            <param name="jnlp.title"        value="3D Julia Set Fractal demo."/>
            <param name="jnlp.jogl"         value="true"/>
            <param name="jnlp.mainclass"    value="com.jogamp.opencl.demos.julia3d.Julia3d"/>
        </antcall>

        <antcall target="create-jnlp" inheritrefs="true">
            <param name="jnlp.name"         value="multi-device-fractal"/>
            <param name="jnlp.title"        value="Multi Device Mandelbrot Fractal example."/>
            <param name="jnlp.jogl"         value="true"/>
            <param name="jnlp.mainclass"    value="com.jogamp.opencl.demos.fractal.MultiDeviceFractal"/>
        </antcall>

        <antcall target="create-jnlp" inheritrefs="true">
            <param name="jnlp.name"         value="clinfo"/>
            <param name="jnlp.title"        value="OpenCL diagnostics."/>
            <param name="jnlp.jogl"         value="false"/>
            <param name="jnlp.mainclass"    value="com.jogamp.opencl.demos.info.CLInfo"/>
        </antcall>
        
    </target>

    <target name="tag.build">
        <property file="${dist.jar.dir}/artifact.properties"/>
        <property name="jocl-demos.build.number" value="manual-build"/>
        <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=${build.number}${line.separator}" append="true" />
    </target>

    <target name="create-jnlp">
        <condition  property="jogl.extension"
                    value='&lt;extension name="jogl-all-awt" href="http://jogamp.org/deployment/webstart-next/jogl-all-awt.jnlp"/&gt;'
                    else="">
            <istrue value="${jnlp.jogl}"/>
        </condition>
        <copy file="demo-template.jnlp" tofile="${dist.jar.dir}/${jnlp.name}.jnlp">
            <filterchain>
                <replacestring from="DEMO_TITLE" to="${jnlp.title}"/>
                <replacestring from="NAME_TAG" to="${jnlp.name}"/>
                <replacestring from="CLASS_TAG" to="${jnlp.mainclass}"/>
                <replacestring from="DEMO_CODEBASE_TAG" to="${jocl-demos.codepase}/"/>
                <replacestring from="JOCL_CODEBASE_TAG" to="${jocl.codepase}"/>
                <replacestring from="EXTENSION" to="${jogl.extension}"/>
            </filterchain>
        </copy>
    </target>

</project>