-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
690 lines (607 loc) · 30 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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="Sphinx-4">
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Where to find things... * -->
<!-- * * -->
<!-- ********************************************************** -->
<property name="version" value="1.0beta5"/>
<path id="libs">
<fileset dir="lib" includes="**/jsapi.jar,**/js.jar,**/junit-4.8.1.jar"/>
</path>
<property name="src_dir" value="src"/>
<property name="build_dir" value="bld"/>
<property name="classes_dir" value="${build_dir}"/>
<property name="lib_dir" value="lib"/>
<property name="bin_dir" value="bin"/>
<property name="deploy_dir" value="deploy"/>
<property name="javadoc_dir" value="javadoc"/>
<property name="javadoc_check_dir" value="${build_dir}/javadoc_check"/>
<property name="javadoc_zip" value="javadoc.zip"/>
<property name="build_model_dir" value="${classes_dir}"/>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * For generating the WSJ and TIDIGITS models. * -->
<!-- * * -->
<!-- ********************************************************** -->
<property name="wsj_name" value="WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz"/>
<property name="wsj_data_dir" value="models/acoustic/wsj"/>
<property name="wsj_8kHz_name" value="WSJ_8gau_13dCep_8kHz_31mel_200Hz_3500Hz"/>
<property name="wsj_8kHz_data_dir" value="models/acoustic/wsj_8kHz"/>
<property name="tidigits_name" value="TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz"/>
<property name="tidigits_data_dir" value="models/acoustic/tidigits"/>
<property name="rm1_name" value="RM1_8gau_13dCep_16k_40mel_130Hz_6800Hz"/>
<property name="rm1_data_dir" value="models/acoustic/rm1"/>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * For generating any model JARS from Sphinx-3 models. * -->
<!-- * * -->
<!-- ********************************************************** -->
<property name="model_name" value="${wsj_name}"/>
<property name="model_loader_name" value="${wsj_loader_name}"/>
<property name="model_data_dir" value="${wsj_data_dir}"/>
<!-- Load the environment -->
<property environment="env"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${lib_dir}/ant-contrib-0.6.jar"/>
</classpath>
</taskdef>
<condition property="javadoc_level"
value="${access}">
<isset property="access"/>
</condition>
<condition property="javadoc_level"
value="public">
<not>
<isset property="access"/>
</not>
</condition>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Determine which sources should be compiled depending * -->
<!-- * on the availability of lib/jsapi.jar. This creates a * -->
<!-- * property called "patternset_to_compile" and sets its * -->
<!-- * val to either "all_files" or "no_jsapi", which refers * -->
<!-- * to the name of a patternset. The value of * -->
<!-- * srcs_to_compile will be used in the javac target as a * -->
<!-- * patternset refid. * -->
<!-- * * -->
<!-- ********************************************************** -->
<!-- TODO - we are excluding a number of packages temporarily
from the build. This is a step along the road to refactoring
the system. The excluded packages have not yet been refactored
-->
<patternset id="all_files"
includes="edu/**,com/**"
excludes="edu/cmu/sphinx/research/distributed/**,
edu/cmu/sphinx/research/bushderby/**,
edu/cmu/sphinx/trainer/**,
edu/cmu/sphinx/linguist/acoustic/tiedstate/trainer/**"
/>
<patternset id="edu"
includes="edu/**"
excludes="com/**,
edu/cmu/sphinx/research/distributed/**,
edu/cmu/sphinx/research/bushderby/**,
edu/cmu/sphinx/trainer/**,
edu/cmu/sphinx/linguist/acoustic/tiedstate/trainer/**,
"/>
<patternset id="no_jsapi"
includes="edu/**"
excludes="com/**,
edu/cmu/sphinx/research/**,
edu/cmu/sphinx/trainer/**,
edu/cmu/sphinx/linguist/acoustic/tiedstate/trainer/**,
edu/cmu/sphinx/tools/tags/**,
edu/cmu/sphinx/jsapi/**"/>
<target name="set_patternset_to_compile">
<condition property="patternset_to_compile"
value="all_files">
<available file="lib/jsapi.jar"/>
</condition>
<condition property="patternset_to_compile"
value="no_jsapi">
<not>
<available file="lib/jsapi.jar"/>
</not>
</condition>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Determine which sources should be documented using * -->
<!-- * javadoc depending on the availability of * -->
<!-- * lib/jsapi.jar. This creates a property called * -->
<!-- * "patternset_to_doc" and sets its val to either * -->
<!-- * "all" or "no_jsapi", which refers to the name of a * -->
<!-- * patternset. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="set_patternset_to_doc">
<condition property="patternset_to_doc"
value="edu">
<available file="lib/jsapi.jar"/>
</condition>
<condition property="patternset_to_doc"
value="no_jsapi">
<not>
<available file="lib/jsapi.jar"/>
</not>
</condition>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Handle JSAPI: * -->
<!-- * * -->
<!-- * 1) If a jsapi.jar file can be found, use it and * -->
<!-- * compile all the sources. * -->
<!-- * * -->
<!-- * 2) If a jsapi.jar file cannot be found, issue a * -->
<!-- * message and just compile the sources that do * -->
<!-- * not depend upon jsapi.jar. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="check_jsapi_default_present">
<!-- Complicated way of doing a "if... else" -->
<!-- Check if the environment variable is set. If it is, set -->
<!-- the local variable to the same value. -->
<condition property="EXTERNAL_JSAPI_LOCATION"
value="${env.EXTERNAL_JSAPI_LOCATION}">
<isset property="env.EXTERNAL_JSAPI_LOCATION"/>
</condition>
<!-- If environment variable is not set, set the local -->
<!-- variable to a default value. -->
<condition property="EXTERNAL_JSAPI_LOCATION"
value="/lab/speech/sphinx4/lib/jsapi.jar">
<not>
<isset property="env.EXTERNAL_JSAPI_LOCATION"/>
</not>
</condition>
<available file="${EXTERNAL_JSAPI_LOCATION}"
property="jsapi_default_present"/>
</target>
<target name="copy_jsapi_jar" if="jsapi_default_present">
<copy file="${EXTERNAL_JSAPI_LOCATION}" tofile="lib/jsapi.jar"/>
</target>
<target name="check_jsapi_jar_present"
depends="check_jsapi_default_present,copy_jsapi_jar">
<available file="lib/jsapi.jar" property="jsapi_jar_present"/>
</target>
<target name="issue_jsapi_warning"
unless="jsapi_jar_present">
<echo>
Cannot find lib/jsapi.jar needed to build Java Speech API
(JSAPI) support for Sphinx-4. Will not build any sources
that require jsapi.jar. If you'd like to enable JSAPI
support, please extract jsapi.jar by running jsapi.sh or
jsapi.exe from the lib directory.
</echo>
</target>
<target name="handle_jsapi"
depends="check_jsapi_jar_present,
issue_jsapi_warning,
set_patternset_to_compile,
set_patternset_to_doc"/>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Builds srcs, jars, demos * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="all"
description="Build everything">
<antcall target="compile_src"/>
<mkdir dir="${build_model_dir}"/>
<antcall target="create_all_models"/>
<antcall target="jars"/>
<antcall target="demos"/>
<echo message="Build complete."/>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Builds just the srcs. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="compile_src"
depends="handle_jsapi"
description="Build just the srcs">
<mkdir dir="${classes_dir}"/>
<javac debug="true"
deprecation="true"
includeAntRuntime="false"
destdir="${classes_dir}">
<src path="${src_dir}/sphinx4"/>
<src path="${src_dir}/research"/>
<src path="${src_dir}/jsapi"/>
<patternset refid="${patternset_to_compile}"/>
<classpath refid="libs"/>
</javac>
<copy todir="${classes_dir}/edu/cmu/sphinx/config">
<fileset dir="${src_dir}/sphinx4/edu/cmu/sphinx/config">
<include name="**/*.xml"/>
</fileset>
</copy>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Builds just the demos. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="demos"
depends="compile_src"
description="Compiles and jars the demos">
<ant antfile="demo.xml"/>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Compiles unit tests. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="compile-tests" depends="compile_src" description="Compile unit tests">
<mkdir dir="${classes_dir}/test" />
<javac
debug="true"
deprecation="true"
includeAntRuntime="false"
srcdir="${src_dir}/test"
destdir="${classes_dir}/test">
<classpath refid="libs" />
<classpath path="${classes_dir}" />
</javac>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Runs unit tests. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="run-tests" depends="compile-tests" description="Run unit tests">
<mkdir dir="logs/tests"/>
<junit printsummary="yes" failureproperty="test.failure" fork="yes">
<jvmarg value="-mx256m"/>
<classpath refid="libs" />
<classpath path="${classes_dir}" />
<classpath path="${classes_dir}/test" />
<classpath location="${lib_dir}/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar" />
<formatter type="plain" />
<batchtest todir="logs/tests">
<fileset dir="${src_dir}/test">
<include name="**/*Test.java" />
<include name="**/*Tests.java" />
</fileset>
</batchtest>
</junit>
<fail if="test.failure" message="test failed" />
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Compiles other tests. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="compile-other-tests" depends="compile_src" description="Compile other tests">
<foreach target="compile-other" param="other.build.file">
<path>
<fileset dir="tests" includes="**/build.xml"/>
</path>
</foreach>
</target>
<target name="compile-other">
<echo message="Building ${other.build.file}" />
<ant antfile="${other.build.file}" target="compile" inheritAll="false" useNativeBasedir="true" />
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Generates the jar files * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="jars"
depends="jsapi10base_jar,sphinx4_jar,batch_jar,tags_jar,audiotool_jar"
description="Builds all the jar files"/>
<!-- sphinx4.jar -->
<property name="sphinx4_jar" value="${lib_dir}/sphinx4.jar"/>
<target name="sphinx4_jar"
depends="compile_src"
description="Create ${sphinx4_jar}">
<mkdir dir="${lib_dir}"/>
<jar destfile="${sphinx4_jar}"
manifest="${src_dir}/sphinx4/edu/cmu/sphinx/sphinx4.manifest"
compress="true"
basedir="${classes_dir}">
<include name="edu/**"/>
<include name="com/**"/>
<exclude name="edu/cmu/sphinx/tools/**"/>
<exclude name="com/sun/taglet/**"/>
<exclude name="edu/cmu/sphinx/demo/**"/>
<exclude name="edu/cmu/sphinx/demo/**"/>
<exclude name="edu/cmu/sphinx/model/**"/>
<exclude name="com/sun/speech/**"/>
<exclude name="edu/cmu/sphinx/jsapi/**"/>
</jar>
</target>
<!-- jsapi10base.jar -->
<property name="jsapi10base_jar" value="${lib_dir}/jsapi-1.0-base.jar"/>
<target name="jsapi10base_jar"
depends="compile_src"
description="Create ${jsapi10base_jar}">
<mkdir dir="${lib_dir}"/>
<jar destfile="${jsapi10base_jar}"
compress="true"
manifest="${src_dir}/jsapi/jsapi-base.manifest"
basedir="${classes_dir}">
<include name="com/sun/speech/**"/>
<include name="edu/cmu/sphinx/jsapi/**"/>
</jar>
</target>
<property name="batch_jar" value="${lib_dir}/batch.jar"/>
<target name="batch_jar"
depends="compile_src"
description="Create ${batch_jar}">
<mkdir dir="${lib_dir}"/>
<jar destfile="${batch_jar}"
compress="true"
includes="edu/cmu/sphinx/tools/**"
excludes="com/sun/taglet/**"
basedir="${classes_dir}"/>
</target>
<!-- tags.jar -->
<property name="tags_jar" value="${lib_dir}/tags.jar"/>
<target name="tags_jar"
depends="compile_src"
description="Create ${lib_dir}/tags.jar">
<mkdir dir="${lib_dir}"/>
<jar destfile="${tags_jar}"
manifest="${src_dir}/jsapi/edu/cmu/sphinx/tools/tags/Manifest"
compress="true"
includes="edu/cmu/sphinx/tools/tags/**"
basedir="${classes_dir}"/>
</target>
<!-- AudioTool.jar -->
<property name="audiotool_jar" value="${bin_dir}/AudioTool.jar"/>
<target name="audiotool_jar"
depends="compile_src"
description="Create ${audiotool_jar}">
<mkdir dir="${bin_dir}"/>
<jar destfile="${audiotool_jar}"
manifest="${src_dir}/sphinx4/edu/cmu/sphinx/tools/audio/Manifest"
compress="true">
<fileset dir="${classes_dir}"
includes="edu/cmu/sphinx/tools/audio/*"/>
<fileset dir="${src_dir}/sphinx4"
includes="edu/cmu/sphinx/tools/audio/spectrogram.config.xml"/>
</jar>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Generates an acoustic model JAR from a Sphinx-3 model * -->
<!-- * directory. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="s3_model_to_s4"
description="Generates an acoustic model JAR from a Sphinx-3 model directory.">
<mkdir dir="${build_model_dir}/${model_name}"/>
<antcall target="create_my_model">
<param name="my_model_data_dir" value="${model_data_dir}"/>
<param name="my_model_name" value="${model_name}"/>
</antcall>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Builds the TIDIGITS and WSJ acoustic model files. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="create_all_models"
description="Creates the WSJ and TIDIGITS acoustic model JARS.">
<antcall target="create_my_model">
<param name="my_model_data_dir" value="${wsj_data_dir}"/>
<param name="my_model_name" value="${wsj_name}"/>
</antcall>
<antcall target="create_my_model">
<param name="my_model_data_dir" value="${wsj_8kHz_data_dir}"/>
<param name="my_model_name" value="${wsj_8kHz_name}"/>
</antcall>
<antcall target="create_my_model">
<param name="my_model_data_dir" value="${tidigits_data_dir}"/>
<param name="my_model_name" value="${tidigits_name}"/>
</antcall>
<antcall target="create_my_model">
<param name="my_model_data_dir" value="${rm1_data_dir}"/>
<param name="my_model_name" value="${rm1_name}"/>
</antcall>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Builds an acoustic model JAR. * -->
<!-- * params: 'my_model_name' and 'my_model_data_dir' * -->
<!-- * 1) Copies everything in 'my_model_data_dir' to * -->
<!-- * ${build_model_dir}/${my_model_name}. * -->
<!-- * 2) Jars up the ${build_model_dir}/${my_model_name} dir * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="create_my_model"
depends="compile_src"
description="Creates an acoustic model JAR.">
<copy todir="${build_model_dir}/${my_model_name}">
<fileset dir="${my_model_data_dir}"/>
</copy>
<jar destfile="${lib_dir}/${my_model_name}.jar">
<fileset dir="${build_dir}"
includes="${my_model_name}/**"/>
</jar>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Generates the parser * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="javacc">
<sequential>
<javacc
target="${src_dir}/sphinx4/edu/cmu/sphinx/jsgf/parser/jsgf.jj"
outputDirectory="${src_dir}/sphinx4/edu/cmu/sphinx/jsgf/parser"
/>
<fixcrlf srcdir="@{outputDir}" includes="*.java">
<containsregexp expression="Generated.*By.*JavaCC"/>
</fixcrlf>
</sequential>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Generates the javadoc * -->
<!-- * * -->
<!-- ********************************************************** -->
<property name="javadoc_desc" value="Sphinx-4"/>
<target name="javadoc"
depends="handle_jsapi"
description="Generate javadoc, optionally with '-Daccess=private'">
<delete dir="${javadoc_dir}"/>
<mkdir dir="${javadoc_dir}"/>
<javadoc sourcepath="${src_dir}/sphinx4:${src_dir}/jsapi"
additionalparam="-breakiterator"
destdir="${javadoc_dir}"
overview="${src_dir}/sphinx4/overview.html"
windowtitle="${javadoc_desc}"
doctitle="${javadoc_desc}"
access="${javadoc_level}">
<link href="http://java.sun.com/products/java-media/speech/forDevelopers/jsapi-doc"
offline="true"
packagelistLoc="lib/jsapi"/>
<packageset dir="${src_dir}/sphinx4" defaultexcludes="yes">
<patternset refid="${patternset_to_doc}"/>
</packageset>
<classpath>
<path refid="libs"/>
<pathelement path="${java.class.path}"/>
</classpath>
</javadoc>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Checks javadocs * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="javadoc_check"
depends="handle_jsapi"
description="checks the javadocs">
<mkdir dir="${javadoc_check_dir}"/>
<javadoc sourcepath="${src_dir}/sphinx4:${src_dir}/jsapi"
packagenames="edu.*"
excludepackagenames="edu.cmu.sphinx.trainer"
destdir="${javadoc_check_dir}"
overview="${src_dir}/sphinx4/overview.html"
doclet="com.sun.tools.doclets.doccheck.DocCheck"
docletpath="lib/doccheck.jar"
access="${javadoc_level}">
<classpath refid="libs"/>
</javadoc>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Deletes all build output and *~ file droppings * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="clean" description="Delete all build output">
<antcall target="clean_not_deploy"/>
<delete dir="${deploy_dir}"/>
</target>
<target name="clean_not_deploy"
description="Delete all build output except for the deploy dir">
<delete>
<fileset defaultexcludes="no" dir="." includes="**/*~"/>
</delete>
<delete dir="${build_dir}" failonerror="false"/>
<delete dir="${javadoc_dir}" failonerror="false"/>
<delete dir="${bin_dir}" failonerror="false"/>
<delete file="${sphinx4_jar}" failonerror="false"/>
<delete file="${tags_jar}" failonerror="false"/>
<delete file="${batch_jar}" failonerror="false"/>
<delete file="${jsapi10base_jar}" failonerror="false"/>
<delete file="${lib_dir}/${wsj_name}.jar" failonerror="false"/>
<delete file="${lib_dir}/${wsj_8kHz_name}.jar" failonerror="false"/>
<delete file="${lib_dir}/${rm1_name}.jar" failonerror="false"/>
<delete file="${lib_dir}/${tidigits_name}.jar" failonerror="false"/>
<delete file="tempKeystore" failonerror="false"/>
<!-- antcall target="delete_all_model_classes"/ -->
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Deploys the bin.zip and src.zip files. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="deploy"
depends="check_jsapi_jar_present,issue_jsapi_error"
description="Deploys the bin.zip and src.zip files."
if="jsapi_jar_present">
<delete dir="${deploy_dir}"/>
<antcall target="deploy_bin_zip"/>
<antcall target="deploy_src_zip"/>
</target>
<target name="issue_jsapi_error"
unless="jsapi_jar_present">
<echo>
Cannot find lib/jsapi.jar needed to deploy Sphinx-4.
Please go to the "lib" directory and run jsapi.sh or jsapi.exe
to setup JSAPI.
</echo>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Deploys the sphinx4-{version}-bin.zip file. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="deploy_bin_zip"
description="Creates the bin.zip deploy file."
depends="clean,all,javadoc">
<mkdir dir="${deploy_dir}/sphinx4-${version}"/>
<copy todir="${deploy_dir}/sphinx4-${version}"
includeEmptyDirs="false">
<fileset dir="."
includes="demo.xml,
index.html,
license.terms,
README,
RELEASE_NOTES,
ANNOUNCE.txt"/>
<fileset dir="." includes="lib/**" excludes="lib/jsapi.jar"/>
<fileset dir="." includes="bin/*.jar"/>
<fileset dir="." includes="demo/**"/>
<fileset dir="." includes="doc-files/**"/>
<fileset dir="." includes="javadoc/**"/>
<fileset dir="."
includes="doc/jsapi_setup.html,doc/ProgrammersGuide.html,doc/Sphinx4-faq.html,doc/UsingSphinxTrainModels.html,doc/Sphinx4Whitepaper.pdf"/>
</copy>
<delete dir="${deploy_dir}/sphinx4-${version}/lib/jsapi"/>
<jar destfile="${deploy_dir}/sphinx4-${version}-bin.zip"
basedir="${deploy_dir}"
includes="sphinx4-${version}/**"
compress="true"/>
<delete dir="${deploy_dir}/sphinx4-${version}"/>
</target>
<!-- ********************************************************** -->
<!-- * * -->
<!-- * Deploys the sphinx4-{version}-src.zip file. * -->
<!-- * * -->
<!-- ********************************************************** -->
<target name="deploy_src_zip"
description="Creates the src.zip deploy file."
depends="clean_not_deploy">
<mkdir dir="${deploy_dir}/sphinx4-${version}"/>
<copy todir="${deploy_dir}/sphinx4-${version}"
includeEmptyDirs="false">
<fileset dir="."/>
</copy>
<delete dir="${deploy_dir}/sphinx4-${version}/bin"/>
<delete dir="${deploy_dir}/sphinx4-${version}/deploy"/>
<delete dir="${deploy_dir}/sphinx4-${version}/tests/frontend"/>
<delete dir="${deploy_dir}/sphinx4-${version}/tests/linguist"/>
<delete dir="${deploy_dir}/sphinx4-${version}/tests/other"/>
<delete dir="${deploy_dir}/sphinx4-${version}/tests/performance/parallel"/>
<delete dir="${deploy_dir}/sphinx4-${version}/tests/performance/wsj20k"/>
<delete dir="${deploy_dir}/sphinx4-${version}/tests/performance/wsj5k"/>
<delete dir="${deploy_dir}/sphinx4-${version}/tests/search"/>
<delete dir="${deploy_dir}/sphinx4-${version}/tests/trainer"/>
<delete file="${deploy_dir}/sphinx4-${version}/lib/jsapi.jar"/>
<jar destfile="${deploy_dir}/sphinx4-${version}-src.zip"
basedir="${deploy_dir}"
includes="sphinx4-${version}/**"
compress="true"/>
<delete dir="${deploy_dir}/sphinx4-${version}"/>
</target>
</project>