-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.xml
129 lines (113 loc) · 5.17 KB
/
build.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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="jtorchat" default="end" basedir=".">
<description>
build file for the jtorchat project
</description>
<!-- set global properties for this build -->
<property name="srcCore" location="src-core" />
<property name="srcGui" location="src-gui" />
<property name="srcNcurse" location="src-ncurse" />
<property name="srcIrcd" location="src-ircd" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<!-- Generate the folder that will be distributed-->
<mkdir dir="${dist}/torchat-${DSTAMP}"/>
<!-- Insert /data/ folder and other support files -->
<exec executable="cp">
<arg value="-p" />
<arg value="-r" />
<arg value="./includes/." />
<arg value="${dist}/torchat-${DSTAMP}" />
</exec>
<!-- Copy over the source code as well to /src/ in the distribution -->
<copy includeemptydirs="true" todir="${dist}/torchat-${DSTAMP}/data/src/src-core">
<fileset dir="./src-core"></fileset>
</copy>
<copy includeemptydirs="true" todir="${dist}/torchat-${DSTAMP}/data/src/src-gui">
<fileset dir="./src-gui"></fileset>
</copy>
<copy includeemptydirs="true" todir="${dist}/torchat-${DSTAMP}/data/src/src-ncurse">
<fileset dir="./src-ncurse"></fileset>
</copy>
<copy includeemptydirs="true" todir="${dist}/torchat-${DSTAMP}/data/src/src-ircd">
<fileset dir="./src-ircd"></fileset>
</copy>
</target>
<target name="compileCoreJar" depends="init" description="compile the core source and turn it into a jar ">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${srcCore}" destdir="${build}" includeantruntime="false" />
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/torchat-${DSTAMP}/jtorchat-core.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="alpha.TCPort" />
<!-- <attribute name="Class-Path" value="." /> -->
</manifest>
</jar>
<!-- Delete build folder so we can clear the way for the next jar -->
<delete dir="${build}" />
</target>
<target name="compileGuiJar" depends="compileCoreJar" description="compile the gui source and turn it into a jar ">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${srcGui}" destdir="${build}" includeantruntime="false" />
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/torchat-${DSTAMP}/jtorchat-gui.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="gui.gui" />
<attribute name="Class-Path" value="jtorchat-core.jar" />
</manifest>
</jar>
<!-- Delete build folder so we can clear the way for the next jar -->
<delete dir="${build}" />
</target>
<target name="compileNcurseJar" depends="compileGuiJar" description="compile the Ncurse source and turn it into a jar ">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${srcNcurse}" destdir="${build}" includeantruntime="false" />
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/torchat-${DSTAMP}/jtorchat-ncurse.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="ncurse.ncurse" />
<attribute name="Class-Path" value="jtorchat-core.jar" />
</manifest>
</jar>
<!-- Delete build folder so we can clear the way for the next jar -->
<delete dir="${build}" />
</target>
<target name="compileIrcdJar" depends="compileNcurseJar" description="compile the IRCD source and turn it into a jar ">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${srcIrcd}" destdir="${build}" includeantruntime="false" />
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/torchat-${DSTAMP}/jtorchat-ircd.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="ircd.ircd" />
<attribute name="Class-Path" value="jtorchat-core.jar" />
</manifest>
</jar>
<!-- Delete build folder so we can clear the way for the next jar -->
<delete dir="${build}" />
</target>
<target name="end" depends="compileIrcdJar" description="finished">
<!-- tar and gip the resulting project in dist-->
<tar compression="gzip" destfile="${dist}/tar-gzip-archive/jtorchat-${DSTAMP}.tar.gz">
<tarfileset dir="${dist}/torchat-${DSTAMP}/">
</tarfileset>
</tar>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
</project>