-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.xml
208 lines (185 loc) · 8.4 KB
/
demo.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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Apache Ant build file used to build the Sphinx-4 demos.* -->
<!-- * To build the demos, just type the following: * -->
<!-- * * -->
<!-- * ant -buildfile demo.xml * -->
<!-- * * -->
<!-- * For more information: http://ant.apache.org/ * -->
<!-- * * -->
<!-- ********************************************************** -->
<project basedir="." default="all" name="Sphinx-4">
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Where to find things... * -->
<!-- * * -->
<!-- ********************************************************** -->
<property name="version" value="1_2_0"/>
<property name="src_dir" value="."/>
<property name="build_dir" value="bld"/>
<property name="classes_dir" value="${build_dir}/classes"/>
<property name="lib_dir" value="lib"/>
<property name="bin_dir" value="bin"/>
<property name="deploy_dir" value="deploy"/>
<path id="libs">
<pathelement path="${classes_dir}"/>
<pathelement location="${lib_dir}/sphinx4.jar"/>
<pathelement location="${lib_dir}/jsapi.jar"/>
</path>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Checks for the presence of jsapi.jar. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="check_jsapi_jar.isPresent">
<available file="lib/jsapi.jar" property="jsapi_jar.isPresent"/>
</target>
<target name="issue_jsapi_warning"
unless="jsapi_jar.isPresent">
<echo>
Cannot find lib/jsapi.jar. Will not build JSAPI demos.
See docs/jsapi_setup.html for information on setting up
your environment to use JSAPI.
</echo>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Builds just the demos (using package names for the * -->
<!-- * demos would have made this easier). * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="all"
depends="make_lib_dir,
compile_sphinx_demos"
description="Compiles and jars the demos"/>
<target name="make_lib_dir">
<mkdir dir="${lib_dir}"/>
</target>
<!-- Sphinx-4 (non-JSAPI) demos -->
<target name="compile_sphinx_demos"
depends="compile_sphinx_helloworld,
compile_sphinx_hellodigits,
compile_sphinx_hellongram,
compile_zipcity,
check_jsapi_jar.isPresent,
check_jsapi_jar.isPresent,
issue_jsapi_warning"
description="Compiles Sphinx-4 demos that do not use JSAPI"/>
<target name="compile_sphinx_helloworld">
<mkdir dir="${classes_dir}/demo/sphinx/helloworld"/>
<javac debug="true"
source="1.4"
deprecation="true"
srcdir="${src_dir}/demo/sphinx/helloworld"
destdir="${classes_dir}">
<classpath refid="libs"/>
</javac>
<copy file="${src_dir}/demo/sphinx/helloworld/hello.gram"
todir="${classes_dir}/demo/sphinx/helloworld"/>
<copy file="${src_dir}/demo/sphinx/helloworld/helloworld.config.xml"
todir="${classes_dir}/demo/sphinx/helloworld"/>
<mkdir dir="${bin_dir}"/>
<jar destfile="${bin_dir}/HelloWorld.jar"
manifest="${src_dir}/demo/sphinx/helloworld/helloworld.Manifest"
basedir="${classes_dir}"
includes="demo/sphinx/helloworld/**"
filesonly="true"
compress="true"/>
</target>
<target name="compile_sphinx_hellodigits">
<mkdir dir="${classes_dir}/demo/sphinx/hellodigits"/>
<javac debug="true"
source="1.4"
deprecation="true"
srcdir="${src_dir}/demo/sphinx/hellodigits"
destdir="${classes_dir}">
<classpath refid="libs"/>
</javac>
<copy file="${src_dir}/demo/sphinx/hellodigits/digits.gram"
todir="${classes_dir}/demo/sphinx/hellodigits"/>
<copy file="${src_dir}/demo/sphinx/hellodigits/hellodigits.config.xml"
todir="${classes_dir}/demo/sphinx/hellodigits"/>
<jar destfile="${bin_dir}/HelloDigits.jar"
manifest="${src_dir}/demo/sphinx/hellodigits/hellodigits.Manifest"
basedir="${classes_dir}"
includes="demo/sphinx/hellodigits/**"
filesonly="true"
compress="true"/>
<delete dir="${classes_dir}/demo/sphinx/hellodigits"/>
</target>
<target name="compile_sphinx_hellongram">
<mkdir dir="${classes_dir}/demo/sphinx/hellongram"/>
<javac debug="true"
source="1.4"
deprecation="true"
srcdir="${src_dir}/demo/sphinx/hellongram"
destdir="${classes_dir}">
<classpath refid="libs"/>
</javac>
<copy file="${src_dir}/demo/sphinx/hellongram/hellongram.trigram.lm"
todir="${classes_dir}/demo/sphinx/hellongram"/>
<copy file="${src_dir}/demo/sphinx/hellongram/hellongram.config.xml"
todir="${classes_dir}/demo/sphinx/hellongram"/>
<mkdir dir="${bin_dir}"/>
<jar destfile="${bin_dir}/HelloNGram.jar"
manifest="${src_dir}/demo/sphinx/hellongram/hellongram.Manifest"
basedir="${classes_dir}"
includes="demo/sphinx/hellongram/**"
filesonly="true"
compress="true"/>
<delete dir="${classes_dir}/demo/sphinx/hellongram"/>
</target>
<target name="init">
<available property="keystore.exists" file="tempKeystore"/>
<tstamp/>
</target>
<target name="keystore" unless="keystore.exists">
<genkey alias="unknown" storepass="public" keystore="tempKeystore"
dname="CN=Anonymous Signature, OU=unknown, o=unknown, c=unknown" />
</target>
<target name="compile_zipcity" depends="init,keystore">
<mkdir dir="${classes_dir}/demo/sphinx/zipcity"/>
<javac debug="true"
source="1.4"
deprecation="true"
srcdir="${src_dir}/demo/sphinx/zipcity"
destdir="${classes_dir}">
<classpath refid="libs"/>
</javac>
<copy file="${src_dir}/demo/sphinx/zipcity/zipcity.gram"
todir="${classes_dir}/demo/sphinx/zipcity"/>
<copy file="${src_dir}/demo/sphinx/zipcity/zipcity.config.xml"
todir="${classes_dir}/demo/sphinx/zipcity"/>
<copy file="${src_dir}/demo/sphinx/zipcity/zip.txt"
todir="${classes_dir}/demo/sphinx/zipcity"/>
<copy file="${src_dir}/demo/sphinx/zipcity/s4.jpg"
todir="${classes_dir}/demo/sphinx/zipcity"/>
<jar destfile="${bin_dir}/ZipCity.jar"
manifest="${src_dir}/demo/sphinx/zipcity/zipcity.Manifest"
basedir="${classes_dir}"
includes="demo/sphinx/zipcity/**"
filesonly="true"
compress="true"/>
<delete dir="${classes_dir}/demo/sphinx/zipcity"/>
</target>
<target name="release_zipcity" depends="compile_zipcity">
<copy todir="bld/zipcity" file="demo/sphinx/zipcity/zipcity.jnlp"/>
<copy todir="bld/zipcity" file="demo/sphinx/zipcity/zipcity_test.jnlp"/>
<copy todir="bld/zipcity" file="demo/sphinx/zipcity/s4.jpg"/>
<copy todir="bld/zipcity" file="demo/sphinx/zipcity/README.html"/>
<copy todir="bld/zipcity" file="bin/ZipCity.jar"/>
<copy todir="bld/zipcity" file="lib/sphinx4.jar"/>
<copy todir="bld/zipcity" file="lib/jsapi.jar"/>
<copy todir="bld/zipcity"
file="lib/TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar"/>
<signjar jar="bld/zipcity/ZipCity.jar" alias="unknown"
storepass="public" keystore="tempKeystore" />
<signjar jar="bld/zipcity/sphinx4.jar" alias="unknown"
storepass="public" keystore="tempKeystore" />
<signjar jar="bld/zipcity/jsapi.jar" alias="unknown"
storepass="public" keystore="tempKeystore" />
<signjar jar="bld/zipcity/TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar"
alias="unknown" storepass="public" keystore="tempKeystore" />
</target>
</project>