-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
247 lines (210 loc) · 8.86 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
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<?xml version="1.0" encoding="UTF-8"?>
<project name="jVoiceBridge" default="jar" basedir=".">
<description>jVoiceBridge project</description>
<property name="top.dir" location="."/>
<!-- values in my.build.properties override build.properties -->
<property file="my.build.properties"/>
<property file="build.properties"/>
<!-- build and package -->
<target name="jar" depends="jar-common, jar-bridge, jar-softphone, jar-voicelib, jar-bridgemonitor"
description="Build all jar files"/>
<target name="jar-common" description="Build common jar files">
<ant dir="${common.dir}" antfile="build.xml" target="jar"/>
<ant dir="${stun.dir}" antfile="build.xml" target="jar"/>
</target>
<target name="jar-bridge" depends="jar-common"
description="Build bridge jar files">
<ant dir="${bridge.dir}" antfile="build.xml" target="jar"/>
</target>
<target name="jar-softphone" depends="jar-common"
description="Build softphone jar files">
<ant dir="${softphone.dir}" antfile="build.xml" target="jar"/>
</target>
<target name="jar-voicelib" depends="jar-common"
description="Build voicelib jar files">
<ant dir="${voicelib.dir}" antfile="build.xml" target="jar"/>
</target>
<target name="jar-bridgemonitor"
description="Build bridge monitor files">
<ant dir="${bridgemonitor.dir}" antfile="build.xml" target="jar"/>
</target>
<!-- copy to dist directory -->
<target name="dist" depends="jar, dist-bridge, dist-softphone, dist-voicelib, dist-bridgemonitor, dist-doc"
description="Build distribution directory">
<mkdir dir="dist"/>
<mkdir dir="tmp"/>
<mkdir dir="tmp/voicebridge"/>
<mkdir dir="tmp/voicebridge/bridgeModules"/>
<mkdir dir="tmp/voicebridge/nist-sip"/>
<mkdir dir="tmp/voicelib"/>
<mkdir dir="tmp/bridgemonitor"/>
<copy todir="tmp/voicebridge">
<fileset file="${bridge.dir}/build/lib/bridge_connector.jar"/>
<fileset file="${bridge.dir}/build/lib/bridge.jar"/>
<fileset file="${bridge.dir}/run.properties"/>
<fileset file="${bridge.dir}/run.xml"/>
<fileset file="${bridge.dir}/lib/codecLib_dtmf.jar"/>
<fileset file="${bridge.dir}/lib/codecLibwrapper_dtmf.jar"/>
<fileset file="${common.dir}/build/lib/voip.jar"/>
<fileset file="${common.dir}/lib/jspeex.jar"/>
<fileset file="${softphone.dir}/build/lib/libmedia.intel.jnilib"/>
<fileset file="${softphone.dir}/build/lib/libmedia.powerpc.jnilib"/>
<fileset file="${common.dir}/lib/log4j-1.2.8.jar"/>
<fileset file="${softphone.dir}/build/lib/softphone.jar"/>
<fileset file="${softphone.dir}/build/lib/softphone_native.jar"/>
<fileset file="${stun.dir}/build/lib/stun.jar"/>
<fileset file="${common.dir}/lib/freetts.jar"/>
<fileset file="${common.dir}/lib/mbrola.jar"/>
<fileset file="${common.dir}/lib/cmudict04.jar"/>
<fileset file="${common.dir}/lib/cmulex.jar"/>
<fileset file="${common.dir}/lib/cmu_time_awb.jar"/>
<fileset file="${common.dir}/lib/cmutimelex.jar"/>
<fileset file="${common.dir}/lib/cmu_us_kal.jar"/>
<fileset file="${common.dir}/lib/en_us.jar"/>
</copy>
<copy todir="tmp/voicebridge/nist-sip">
<fileset file="${common.dir}/lib/concurrent.jar"/>
<fileset file="${common.dir}/lib/JainSipApi1.2.jar"/>
<fileset file="${common.dir}/lib/JainSipRi1.2.jar"/>
</copy>
<copy todir="tmp/voicebridge/bridgeModules">
<fileset file="${bridge.dir}/modules/MP3AudioSource.jar"/>
<fileset file="${bridge.dir}/modules/jl1.0.jar"/>
</copy>
<copy todir="tmp/voicelib">
<fileset file="${voicelib.dir}/build/lib/voicelib.jar"/>
</copy>
<copy todir="tmp/bridgemonitor">
<fileset file="${dist.dir}/BridgeMonitor.jar"/>
</copy>
<zip zipfile="${dist.dir}/WonderlandAudio.zip">
<fileset dir="tmp">
<include name="**"/>
</fileset>
</zip>
<zip zipfile="${dist.dir}/jVoiceBridge.zip">
<fileset dir="${dist.dir}">
<include name="bridge/**"/>
<include name="softphone/**"/>
<include name="doc/**"/>
<include name="README"/>
</fileset>
</zip>
<!-- <delete dir="tmp"/> -->
</target>
<target name="dist-bridge" depends="jar-bridge"
description="Build bridge distribution directory">
<mkdir dir="${dist.dir}/bridge"/>
<copy todir="${dist.dir}/bridge">
<fileset dir="${common.dir}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${common.dir}/build/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${stun.dir}/build/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${bridge.dir}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${bridge.dir}/build/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${bridge.dir}">
<include name="run.properties"/>
<include name="run.xml"/>
</fileset>
</copy>
</target>
<target name="dist-softphone" depends="jar-softphone"
description="Build softphone distribution directory">
<mkdir dir="${dist.dir}/softphone"/>
<copy todir="${dist.dir}/softphone">
<fileset dir="${softphone.dir}/build/lib">
<include name="softphone.jar"/>
</fileset>
</copy>
</target>
<target name="dist-voicelib" depends="jar-voicelib"
description="Build voicelib distribution directory">
<mkdir dir="${dist.dir}/voicelib"/>
<copy todir="${dist.dir}/voicelib">
<fileset dir="${voicelib.dir}/build/lib">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="dist-bridgemonitor" depends="jar-bridgemonitor"
description="Build bridgemonitor distribution directory">
<mkdir dir="${dist.dir}/bridgemonitor"/>
<copy todir="${dist.dir}/bridgemonitor">
<fileset dir="${bridgemonitor.dir}/dist">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="dist-doc" description="Build documentation">
<mkdir dir="${dist.dir}/doc"/>
<mkdir dir="${dist.dir}/doc/example"/>
<ant dir="${bridge.dir}" antfile="build.xml" target="javadoc-connector"/>
<copy todir="${dist.dir}/doc">
<fileset dir="${bridge.dir}/build/javadoc">
<include name="connector/**"/>
</fileset>
</copy>
<!-- copy the placecall example -->
<copy todir="${dist.dir}/doc/example">
<fileset dir="${bridge.dir}/src/com/sun/voip/client/connector/test">
<include name="PlaceCall.java"/>
</fileset>
</copy>
<replace file="${dist.dir}/doc/example/PlaceCall.java"
token="package com.sun.voip.client.connector.test;"
value=""/>
<!-- copy readmes -->
<copy todir="${dist.dir}/bridge">
<fileset dir="${bridge.dir}/doc">
<include name="README"/>
</fileset>
</copy>
<copy todir="${dist.dir}/softphone">
<fileset dir="${softphone.dir}/doc">
<include name="README"/>
</fileset>
</copy>
<copy todir="${dist.dir}/doc">
<fileset dir="${bridge.dir}/doc">
<include name="README.connector"/>
</fileset>
</copy>
<copy todir="${dist.dir}">
<fileset dir="${common.dir}/doc">
<include name="README"/>
</fileset>
</copy>
</target>
<!-- run bridge -->
<target name="run-bridge" depends="dist-bridge">
<ant dir="${dist.dir}/bridge" antfile="run.xml"/>
</target>
<!-- run softphone -->
<target name="run-softphone" depends="dist-softphone">
<java jar="${dist.dir}/softphone/softphone.jar" fork="true">
<arg value="-r"/>
<arg value="${softphone.registrar}"/>
<arg value="-u"/>
<arg value="${softphone.username}"/>
</java>
</target>
<!-- clean targets -->
<target name="clean" depends="dist-clean">
<ant dir="${common.dir}" antfile="build.xml" target="clean"/>
<ant dir="${stun.dir}" antfile="build.xml" target="clean"/>
<ant dir="${bridge.dir}" antfile="build.xml" target="clean"/>
<ant dir="${softphone.dir}" antfile="build.xml" target="clean"/>
</target>
<target name="dist-clean">
<delete dir="${dist.dir}"/>
</target>
</project>