1 |
< |
<!-- build file for server --> |
1 |
> |
<!-- build file for i-scream CMS server --> |
2 |
> |
<!-- $Id$ --> |
3 |
> |
|
4 |
|
<project name="iscream-server" default="usage"> |
5 |
|
|
4 |
– |
<!-- |
5 |
– |
TODO: |
6 |
– |
install target |
7 |
– |
cvs version build (including cleanup) |
8 |
– |
sql table generation -- to be removed |
9 |
– |
--> |
10 |
– |
|
6 |
|
<!-- |
7 |
|
===================================================== |
8 |
|
Initialisation & Configuration |
29 |
|
These are the targets supported by this ANT build script: |
30 |
|
|
31 |
|
fetch - fetch all the JAR library files |
32 |
+ |
|
33 |
|
idl - generate java source from IDL |
34 |
|
build - compile all source code |
35 |
|
package - generate JAR package and distributions |
36 |
|
packageutil - generate UTIL JAR package |
37 |
+ |
|
38 |
+ |
cvsbuild - build from cvs tag |
39 |
+ |
use -Drev=TAG switch to specify cvs tag |
40 |
+ |
|
41 |
|
javadoc - generate javadoc API |
42 |
+ |
install - install server |
43 |
+ |
use -Dprefix=/path/ switch to specify dest |
44 |
+ |
run - run the server |
45 |
+ |
|
46 |
|
clean - clean all generated files |
47 |
|
distclean - remove 'fetched' libraries + clean |
48 |
< |
run - run the server |
48 |
> |
|
49 |
> |
Recommend to run the following target order: |
50 |
> |
|
51 |
> |
fetch packageutil package javadoc install |
52 |
|
</echo> |
53 |
|
</target> |
54 |
|
|
63 |
|
--> |
64 |
|
|
65 |
|
<!-- this uses static names, which is messy --> |
66 |
< |
<!-- fullcleanup target has same problem --> |
66 |
> |
<!-- distclean target has same problem --> |
67 |
|
<target name="fetch" depends="config"> |
68 |
|
<get |
69 |
|
src="${LIBURL}/crimson.jar" |
86 |
|
verbose="true" usetimestamp="true" |
87 |
|
/> |
88 |
|
<get |
89 |
< |
src="${LIBURL}/mm.mysql-2.0.4-bin.jar" |
90 |
< |
dest="${LIBDIR}/mm.mysql-2.0.4-bin.jar" |
89 |
> |
src="${LIBURL}/mm.mysql-2.0.11-bin.jar" |
90 |
> |
dest="${LIBDIR}/mm.mysql-2.0.11-bin.jar" |
91 |
|
verbose="true" usetimestamp="true" |
92 |
|
/> |
93 |
+ |
<get |
94 |
+ |
src="${LIBURL}/pircbot.jar" |
95 |
+ |
dest="${LIBDIR}/pircbot.jar" |
96 |
+ |
verbose="true" usetimestamp="true" |
97 |
+ |
/> |
98 |
|
<!-- also get jacorb.properties? --> |
99 |
|
</target> |
100 |
|
|
108 |
|
<target name="idl" depends="config"> |
109 |
|
<echo message="Generating Java source from IDL"/> |
110 |
|
<java classname="${IDLPARSER}"> |
111 |
< |
<arg line="-d ${IDLDIR} ${IDLFILE}"/> |
111 |
> |
<arg line="-sloppy_names -d ${IDLDIR} ${IDLFILE}"/> |
112 |
|
<classpath path="${IDLPARSERJAR}"/> |
113 |
|
</java> |
114 |
|
</target> |
152 |
|
<target name="makejar" depends="build"> |
153 |
|
<echo file="${BUILDDIR}/MANIFEST_TMP" |
154 |
|
>Manifest-Version: 1.0 |
155 |
< |
Created-By: www.i-scream.org.uk |
155 |
> |
Created-By: www.i-scream.org |
156 |
|
Main-Class: ${MFMAINCLASS} |
157 |
|
Class-Path: ${MFCLPATH} |
158 |
|
</echo> |
195 |
|
<target name="clean" depends="config"> |
196 |
|
<delete dir="${IDLDIR}/${ROOTPKG}"/> |
197 |
|
<delete dir="${BUILDDIR}/${ROOTPKG}"/> |
186 |
– |
<delete file="${BUILDDIR}/${SERVERJAR}"/> |
187 |
– |
<delete file="${BUILDDIR}/${UTILJAR}"/> |
188 |
– |
<delete file="${BUILDDIR}/${TARFILE}"/> |
189 |
– |
<delete file="${BUILDDIR}/${TARGZFILE}"/> |
190 |
– |
<delete file="${BUILDDIR}/${ZIPFILE}"/> |
198 |
|
<delete dir="${JDOCDIR}"/> |
199 |
+ |
<delete dir="${CVSBUILDTEMP}"/> |
200 |
+ |
<delete> |
201 |
+ |
<fileset dir="${BUILDDIR}"> |
202 |
+ |
<include name="${SERVERJAR}"/> |
203 |
+ |
<include name="${UTILJAR}"/> |
204 |
+ |
<include name="${ARCNAME}*${TAREXT}"/> |
205 |
+ |
<include name="${ARCNAME}*${TARGZEXT}"/> |
206 |
+ |
<include name="${ARCNAME}*${ZIPEXT}"/> |
207 |
+ |
</fileset> |
208 |
+ |
</delete> |
209 |
|
</target> |
210 |
|
|
211 |
|
<target name="distclean" depends="clean"> |
284 |
|
basedir="${BUILDDIR}" |
285 |
|
includes="uk/**/*.class" |
286 |
|
/> |
287 |
+ |
</target> |
288 |
+ |
|
289 |
+ |
<!-- |
290 |
+ |
===================================================== |
291 |
+ |
Install |
292 |
+ |
===================================================== |
293 |
+ |
--> |
294 |
+ |
|
295 |
+ |
<target name="install" depends="config, makejar"> |
296 |
+ |
<mkdir dir="${INSTALLDEST}"/> |
297 |
+ |
<mkdir dir="${INSTALLDEST}/etc"/> |
298 |
+ |
<mkdir dir="${INSTALLDEST}/lib"/> |
299 |
+ |
<copy file="${BUILDDIR}/${SERVERJAR}" todir="${INSTALLDEST}"/> |
300 |
+ |
<copy file="${BUILDDIR}/run.sh" todir="${INSTALLDEST}"/> |
301 |
+ |
<copy file="${BUILDDIR}/run.bat" todir="${INSTALLDEST}"/> |
302 |
+ |
<copy todir="${INSTALLDEST}/lib" > |
303 |
+ |
<fileset dir="${LIBDIR}"> |
304 |
+ |
<include name="**/*.jar"/> |
305 |
+ |
<exclude name="**/CVS/*"/> |
306 |
+ |
</fileset> |
307 |
+ |
</copy> |
308 |
+ |
<copy todir="${INSTALLDEST}/etc" > |
309 |
+ |
<fileset dir="${BUILDDIR}/etc"> |
310 |
+ |
<include name="**/*"/> |
311 |
+ |
<exclude name="**/CVS/*"/> |
312 |
+ |
</fileset> |
313 |
+ |
</copy> |
314 |
+ |
<copy file="${BUILDDIR}/README" todir="${INSTALLDEST}"/> |
315 |
+ |
</target> |
316 |
+ |
|
317 |
+ |
<!-- |
318 |
+ |
===================================================== |
319 |
+ |
CVS Build |
320 |
+ |
===================================================== |
321 |
+ |
--> |
322 |
+ |
|
323 |
+ |
<target name="cvsbuild" depends="config"> |
324 |
+ |
<mkdir dir="${CVSBUILDTEMP}"/> |
325 |
+ |
<cvs |
326 |
+ |
cvsRoot="${CVSROOT}" |
327 |
+ |
command="export -d ${CVSBUILDTEMP}" |
328 |
+ |
tag="${REVISION}" |
329 |
+ |
package="${CVSMODULE}" |
330 |
+ |
/> |
331 |
+ |
<!-- it would be IDEAL to use the ant target here. |
332 |
+ |
BUT, it would need to use it's OWN properties. |
333 |
+ |
exec is a poor substitute. |
334 |
+ |
no idea about windows compatibility. --> |
335 |
+ |
<exec executable="ant" dir="${CVSBUILDTEMP}"> |
336 |
+ |
<arg value="fetch"/> |
337 |
+ |
</exec> |
338 |
+ |
<exec executable="ant" dir="${CVSBUILDTEMP}"> |
339 |
+ |
<arg value="packageutil"/> |
340 |
+ |
</exec> |
341 |
+ |
<exec executable="ant" dir="${CVSBUILDTEMP}"> |
342 |
+ |
<arg value="package"/> |
343 |
+ |
</exec> |
344 |
+ |
<copy file="${CVSBUILDTEMP}/build/${TARGZFILE}" |
345 |
+ |
tofile="${BUILDDIR}/${ARCNAME}-${REVISION}${TARGZEXT}"/> |
346 |
+ |
<copy file="${CVSBUILDTEMP}/build/${ZIPFILE}" |
347 |
+ |
tofile="${BUILDDIR}/${ARCNAME}-${REVISION}${ZIPEXT}"/> |
348 |
+ |
<!-- should we be overwriting any old util jar here? --> |
349 |
+ |
<copy file="${CVSBUILDTEMP}/build/${UTILJAR}" todir="${BUILDDIR}"/> |
350 |
|
</target> |
351 |
|
|
352 |
|
</project> |