1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <!-- |
---|
3 | *** GENERATED FROM jogl-projects module - DO NOT EDIT *** |
---|
4 | *** EDIT ../build.xml INSTEAD *** |
---|
5 | --> |
---|
6 | <project name="jogl-template-impl" default="default" basedir=".." > |
---|
7 | <description>Ant targets for JOGL projects.</description> |
---|
8 | |
---|
9 | <target name="-jogl-template-post-jar"> |
---|
10 | <echo message="Creating native distibutions"/> |
---|
11 | |
---|
12 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
13 | <param name="platform.name" value="linux-i586"/> |
---|
14 | </antcall> |
---|
15 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
16 | <param name="platform.name" value="linux-amd64"/> |
---|
17 | </antcall> |
---|
18 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
19 | <param name="platform.name" value="macosx-ppc"/> |
---|
20 | </antcall> |
---|
21 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
22 | <param name="platform.name" value="macosx-universal"/> |
---|
23 | </antcall> |
---|
24 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
25 | <param name="platform.name" value="solaris-sparc"/> |
---|
26 | </antcall> |
---|
27 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
28 | <param name="platform.name" value="solaris-sparcv9"/> |
---|
29 | </antcall> |
---|
30 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
31 | <param name="platform.name" value="solaris-i586"/> |
---|
32 | </antcall> |
---|
33 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
34 | <param name="platform.name" value="windows-i586"/> |
---|
35 | </antcall> |
---|
36 | <antcall target="-create-native-distribution" inheritall="true"> |
---|
37 | <param name="platform.name" value="windows-amd64"/> |
---|
38 | </antcall> |
---|
39 | <antcall target="-jogl-template-copy-natives" inheritall="true"/> |
---|
40 | </target> |
---|
41 | |
---|
42 | <target name="-jogl-template-copy-natives" depends="-jogl-template-test-jnlp-enabled" unless="is.jnlp.enabled"> |
---|
43 | <copy todir="${dist.dir}"> |
---|
44 | <fileset dir="${libs.JOGL.classpath}-natives-${natives.platform}" defaultexcludes="yes"/> |
---|
45 | <fileset dir="${libs.GLUEGEN-RT.classpath}-natives-${natives.platform}" defaultexcludes="yes"/> |
---|
46 | </copy > |
---|
47 | </target> |
---|
48 | |
---|
49 | <target name="-jogl-template-jnlp" depends="-jogl-template-test-jnlp-enabled,-jogl-template-patch-master-jnlp,jnlp-impl.jnlp" if="is.jnlp.enabled"> |
---|
50 | <!--remove jogl from dist/lib folder--> |
---|
51 | <delete file="${dist.dir}/lib/jogl.jar"/> |
---|
52 | <delete file="${dist.dir}/lib/gluegen-rt.jar"/> |
---|
53 | |
---|
54 | <!--remove jogl dependency from jnlp to add it later as jnlp extention--> |
---|
55 | <replace file="${dist.dir}/launch.jnlp"> |
---|
56 | <replacetoken><![CDATA[<jar href="lib/jogl.jar"/>]]></replacetoken> |
---|
57 | <replacevalue></replacevalue> |
---|
58 | </replace> |
---|
59 | <replace file="${dist.dir}/launch.jnlp"> |
---|
60 | <replacetoken><![CDATA[<jar href="lib/gluegen-rt.jar"/>]]></replacetoken> |
---|
61 | <replacevalue></replacevalue> |
---|
62 | </replace> |
---|
63 | <replace file="${dist.dir}/launch.jnlp"> |
---|
64 | <replacetoken><![CDATA[<jar href="lib/jogl.jar" download="eager"/>]]></replacetoken> |
---|
65 | <replacevalue></replacevalue> |
---|
66 | </replace> |
---|
67 | <replace file="${dist.dir}/launch.jnlp"> |
---|
68 | <replacetoken><![CDATA[<jar href="lib/gluegen-rt.jar" download="eager"/>]]></replacetoken> |
---|
69 | <replacevalue></replacevalue> |
---|
70 | </replace> |
---|
71 | </target> |
---|
72 | |
---|
73 | <!--noop in case jnlp-impl.xml is not available--> |
---|
74 | <target name="jnlp-impl.jnlp" ></target> |
---|
75 | |
---|
76 | |
---|
77 | <target name="-jogl-template-patch-master-jnlp" depends="-jogl-template-check-master-jnlp" if="is.jnlp.unpatched"> |
---|
78 | <replace file="master-${jnlp.descriptor}.jnlp"> |
---|
79 | <replacetoken><![CDATA[</resources>]]></replacetoken> |
---|
80 | <replacevalue><![CDATA[ <extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-1.x-webstart-current/jogl.jnlp" /> |
---|
81 | </resources>]]></replacevalue> |
---|
82 | </replace> |
---|
83 | </target> |
---|
84 | |
---|
85 | <target name="-jogl-template-check-master-jnlp" if="is.jnlp.enabled"> |
---|
86 | <loadfile property="master.jnlp.content" srcfile="master-${jnlp.descriptor}.jnlp"/> |
---|
87 | <condition property="is.jnlp.unpatched"> |
---|
88 | <not> |
---|
89 | <contains string="${master.jnlp.content}" substring='extension name="jogl"'/> |
---|
90 | </not> |
---|
91 | </condition> |
---|
92 | </target> |
---|
93 | |
---|
94 | <target name="-create-native-distribution"> |
---|
95 | <mkdir dir="${dist.dir}-${platform.name}"/> |
---|
96 | <!-- This is a bit of a hack to simulate string replacements with ant :/ --> |
---|
97 | <pathconvert pathsep=" " property="platformFiles"> |
---|
98 | <path> |
---|
99 | <fileset dir="${libs.JOGL.classpath}-natives-${natives.platform}" defaultexcludes="yes"/> |
---|
100 | <fileset dir="${libs.GLUEGEN-RT.classpath}-natives-${natives.platform}" defaultexcludes="yes"/> |
---|
101 | </path> |
---|
102 | </pathconvert> |
---|
103 | <echo file="${java.io.tmpdir}/platformExcludes.properties" message="platformExcludes: ${platformFiles}" /> |
---|
104 | <replace file="${java.io.tmpdir}/platformExcludes.properties" value=""> |
---|
105 | <replacefilter token="${libs.JOGL.classpath}-natives-${natives.platform}"/> |
---|
106 | <replacefilter token="${libs.GLUEGEN-RT.classpath}-natives-${natives.platform}"/> |
---|
107 | </replace> |
---|
108 | <property file="${java.io.tmpdir}/platformExcludes.properties"/> |
---|
109 | <delete file="${java.io.tmpdir}/platformExcludes.properties"/> |
---|
110 | <copy todir="${dist.dir}-${platform.name}" overwrite="yes"> |
---|
111 | <fileset dir="${dist.dir}" excludes="${platformExcludes}" defaultexcludes="no"/> |
---|
112 | <fileset dir="${libs.JOGL.classpath}-natives-${platform.name}"/> |
---|
113 | <fileset dir="${libs.GLUEGEN-RT.classpath}-natives-${platform.name}"/> |
---|
114 | </copy > |
---|
115 | </target> |
---|
116 | |
---|
117 | <target name="-jogl-template-post-clean"> |
---|
118 | <echo message="Removing native distibutions"/> |
---|
119 | <delete dir="${dist.dir}-linux-i586"/> |
---|
120 | <delete dir="${dist.dir}-linux-amd64"/> |
---|
121 | <delete dir="${dist.dir}-macosx-ppc"/> |
---|
122 | <delete dir="${dist.dir}-macosx-universal"/> |
---|
123 | <delete dir="${dist.dir}-solaris-sparc"/> |
---|
124 | <delete dir="${dist.dir}-solaris-sparcv9"/> |
---|
125 | <delete dir="${dist.dir}-solaris-i586"/> |
---|
126 | <delete dir="${dist.dir}-windows-i586"/> |
---|
127 | <delete dir="${dist.dir}-windows-amd64"/> |
---|
128 | </target> |
---|
129 | |
---|
130 | <target name="-jogl-template-test-jnlp-enabled"> |
---|
131 | <condition property="is.jnlp.enabled"> |
---|
132 | <equals arg1="${jnlp.enabled}" arg2="true" casesensitive="false" trim="true"/> |
---|
133 | </condition> |
---|
134 | </target> |
---|
135 | |
---|
136 | </project> |
---|