-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-old.xml
225 lines (200 loc) · 8.09 KB
/
build-old.xml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?xml version="1.0" encoding="UTF-8"?>
<project name="SoPraLOP" default="main" basedir=".">
<property name="plattform" value="linux" />
<property name="arch" value="i586" />
<property name="src.dir" value="${basedir}/src" />
<property file="${src.dir}/info/kriese/soPra/sopra.properties" />
<property name="build.dir" value="${basedir}/build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="jar.file" value="${build.dir}/${ant.project.name}.jar" />
<property name="java3d.dir" value="${basedir}/java3d" />
<property name="codebase" value="dist/" />
<property name="password" value="ChangeMe" />
<available property="lib-windows-i586" file="${java3d.dir}/windows/i586" />
<available property="lib-windows-amd64" file="${java3d.dir}/windows/amd64" />
<available property="lib-linux-i586" file="${java3d.dir}/linux/i586" />
<available property="lib-linux-amd64" file="${java3d.dir}/linux/amd64" />
<available property="lib-macosx-ppc" file="${java3d.dir}/macosx/ppc" />
<available property="lib-macosx-universal" file="${java3d.dir}/macosx/universal" />
<available property="lib-solaris-i586" file="${java3d.dir}/solaris/i586" />
<available property="lib-solaris-amd64" file="${java3d.dir}/solaris/amd64" />
<available property="lib-solaris-sparc" file="${java3d.dir}/solaris/sparc" />
<available property="lib-solaris-sparcv9" file="${java3d.dir}/solaris/sparcv9" />
<condition property="debug.txt" value=" Debug" else="">
<isset property="debug" />
</condition>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="compile" depends="clean">
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" source="1.5" target="1.5" classpath="lib/j3dcore.jar:lib/j3dutils.jar:lib/vecmath.jar" />
<java classname="info.kriese.soPra.test.SplashGenerator" failonerror="true" fork="true" dir="${basedir}">
<classpath>
<pathelement path="${classes.dir}" />
<pathelement path="${src.dir}" />
<pathelement path="${java.class.path}" />
</classpath>
</java>
</target>
<target name="jar" depends="compile">
<jar destfile="${jar.file}" update="true">
<manifest>
<attribute name="Built-By" value="${sopra.author}" />
<attribute name="Main-Class" value="info.kriese.soPra.SoPraLOP" />
<section name="info/kriese/soPra">
<attribute name="Specification-Title" value="${sopra.title}" />
<attribute name="Specification-Version" value="${sopra.version}" />
<attribute name="Specification-Vendor" value="${sopra.author}" />
<attribute name="Implementation-Title" value="info/kriese/soPra" />
<attribute name="Implementation-Version" value="${sopra.version}" />
<attribute name="Implementation-Vendor" value="${sopra.author}" />
</section>
</manifest>
<fileset dir="${classes.dir}" includes="**/*.class">
<exclude name="**/test/*.class" />
<exclude name="**/stuff/*" />
</fileset>
<fileset dir="${src.dir}">
<include name="**/*.properties" />
<include name="**/*.conf" />
<include name="**/*.gif" />
<include name="**/*.jpg" />
<include name="**/*.bmp" />
<include name="**/*.png" />
<include name="**/*.htm" />
<include name="**/*.css" />
<include name="**/*.lop" />
</fileset>
</jar>
<echo file="${dist.dir}/VERSION" message="${sopra.version}" />
</target>
<target name="webstart" depends="jar">
<mkdir dir="${dist.dir}" />
<signjar signedjar="${dist.dir}/${ant.project.name}.jar" jar="${jar.file}" alias="SoPra" storepass="${password}" />
<copy tofile="${dist.dir}/${ant.project.name}.jnlp" file="${basedir}/${ant.project.name}.jnlp" overwrite="true" />
<replace file="${dist.dir}/${ant.project.name}.jnlp" propertyfile="${src.dir}/info/kriese/soPra/sopra.properties">
<replacefilter token="[codebase]" value="${codebase}" />
<replacefilter token="[name]" property="sopra.name" />
<replacefilter token="[title]" property="sopra.title" />
<replacefilter token="[author]" property="sopra.author" />
<replacefilter token="[desc]" property="sopra.desc" />
<replacefilter token="[version]" property="sopra.version" />
<replacefilter token="[debug]" value="${debug.txt}" />
</replace>
<copy todir="${dist.dir}/" preservelastmodified="true">
<fileset dir="${basedir}/lib" excludes="j3dcore.jar j3dutils.jar vecmath.jar">
<exclude name="**/.svn/**" />
</fileset>
<fileset file="${basedir}/splash.png" />
<fileset file="${basedir}/CHANGES" />
<fileset file="${basedir}/COPYING" />
</copy>
</target>
<target name="src">
<mkdir dir="${dist.dir}/downloads" />
<zip destfile="${dist.dir}/downloads/${sopra.name}-${sopra.version}-src-all.zip" compress="true" update="true">
<fileset dir="${basedir}">
<exclude name="build/**" />
<exclude name="dist/**" />
<exclude name="bin/**" />
<exclude name="java3d/**" />
<exclude name="lib/j3dcore.jar" />
<exclude name="lib/j3dutils.jar" />
<exclude name="lib/vecmath.jar" />
<exclude name="**/.svn/**" />
</fileset>
</zip>
</target>
<target name="make-dist">
<echo message="Building archive for ${plattform}-${arch}" />
<zip destfile="${dist.dir}/downloads/${sopra.name}-${sopra.version}-${plattform}-${arch}.zip" compress="true" update="true">
<fileset dir="${java3d.dir}/${plattform}/${arch}/" excludes="**/.svn/**" />
<fileset dir="${java3d.dir}/${plattform}/bin/" excludes="**/.svn/**" />
<fileset dir="${basedir}">
<include name="licenses/**" />
<include name="lib/*.jar" />
<include name="COPYING" />
<include name="CHANGES" />
<include name="splash.png" />
<exclude name="**/.svn/**" />
</fileset>
<fileset file="${jar.file}" />
</zip>
</target>
<target name="windows-i586" if="lib-windows-i586">
<antcall target="make-dist">
<param name="plattform" value="windows" />
<param name="arch" value="i586" />
</antcall>
</target>
<target name="windows-amd64" if="lib-windows-amd64">
<antcall target="make-dist">
<param name="plattform" value="windows" />
<param name="arch" value="amd64" />
</antcall>
</target>
<target name="linux-i586" if="lib-linux-i586">
<antcall target="make-dist">
<param name="plattform" value="linux" />
<param name="arch" value="i586" />
</antcall>
</target>
<target name="linux-amd64" if="lib-linux-amd64">
<antcall target="make-dist">
<param name="plattform" value="linux" />
<param name="arch" value="amd64" />
</antcall>
</target>
<target name="macosx-ppc" if="lib-macosx-ppc">
<antcall target="make-dist">
<param name="plattform" value="macosx" />
<param name="arch" value="ppc" />
</antcall>
</target>
<target name="macosx-universal" if="lib-macosx-universal">
<antcall target="make-dist">
<param name="plattform" value="macosx" />
<param name="arch" value="universal" />
</antcall>
</target>
<target name="solaris-i586" if="lib-solaris-i586">
<antcall target="make-dist">
<param name="plattform" value="solaris" />
<param name="arch" value="i586" />
</antcall>
</target>
<target name="solaris-amd64" if="lib-solaris-amd64">
<antcall target="make-dist">
<param name="plattform" value="solaris" />
<param name="arch" value="amd64" />
</antcall>
</target>
<target name="solaris-sparc" if="lib-solaris-sparc">
<antcall target="make-dist">
<param name="plattform" value="solaris" />
<param name="arch" value="sparc" />
</antcall>
</target>
<target name="solaris-sparcv9" if="lib-solaris-sparcv9">
<antcall target="make-dist">
<param name="plattform" value="solaris" />
<param name="arch" value="sparcv9" />
</antcall>
</target>
<target name="dist" depends="jar">
<mkdir dir="${dist.dir}/downloads" />
<antcall target="windows-i586" />
<antcall target="windows-amd64" />
<antcall target="linux-i586" />
<antcall target="linux-amd64" />
<antcall target="macosx-ppc" />
<antcall target="macosx-universal" />
<antcall target="solaris-i586" />
<antcall target="solaris-amd64" />
<antcall target="solaris-sparc" />
<antcall target="solaris-sparcv9" />
</target>
<target name="main" depends="dist, webstart, src" />
</project>