forked from sandflow/regxmllib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
95 lines (75 loc) · 3.4 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
<?xml version="1.0" encoding="UTF-8"?>
<project>
<property name="samples.dir" value="${resources.dir}/mxf-files"/>
<property name="ref.files.dir" value="${resources.dir}/regxml-files"/>
<property name="ref.regs.dir" value="${resources.dir}/registers/snapshot"/>
<property name="dict.dir" value="${resources.dir}/regxml-dicts"/>
<property name="elements.register" value="${ref.regs.dir}/Elements.xml"/>
<property name="groups.register" value="${ref.regs.dir}/Groups.xml"/>
<property name="types.register" value="${ref.regs.dir}/Types.xml"/>
<property name="labels.register" value="${ref.regs.dir}/Labels.xml"/>
<!--Generate Reference Test Files-->
<target name="build-reference-test-files">
<!-- properties that must be set by the caller -->
<fail message="Missing classpath property" unless="classpath"/>
<fail message="Missing resources.dir property" unless="resources.dir"/>
<!-- Do not overwrite existing reference file -->
<fail message="Reference regxml files already present. Delete manually.">
<condition>
<resourcecount when="greater" count="0">
<fileset dir="${ref.files.dir}" includes="*"/>
</resourcecount>
</condition>
</fail>
<fail message="Reference metadictionaries present already. Delete manually.">
<condition>
<resourcecount when="greater" count="0">
<fileset dir="${dict.dir}" includes="*"/>
</resourcecount>
</condition>
</fail>
<!--Generate RegXML dictionary-->
<java classname="com.sandflow.smpte.tools.XMLRegistersToDict" failonerror="true">
<arg value="-e"/>
<arg path="${elements.register}"/>
<arg value="-l"/>
<arg path="${labels.register}"/>
<arg value="-g"/>
<arg path="${groups.register}"/>
<arg value="-t"/>
<arg path="${types.register}"/>
<arg path="${dict.dir}"/>
<classpath>
<pathelement path="${classpath}"/>
</classpath>
</java>
<!-- Generate RegXML files -->
<fileset dir="${dict.dir}" id="dicts">
<include name="*.xml" />
</fileset>
<pathconvert property="dictpaths" refid="dicts" pathsep=" " />
<macrodef name="genreffile">
<attribute name="samplename"/>
<sequential>
<java fork="true" classname="com.sandflow.smpte.tools.RegXMLDump" output="${ref.files.dir}/@{samplename}.xml" logError="true">
<arg value="-all"/>
<arg value="-d"/>
<arg line="${dictpaths}"/>
<arg value="-i"/>
<arg path="${samples.dir}/@{samplename}.mxf"/>
<classpath>
<pathelement path="${classpath}"/>
</classpath>
</java>
</sequential>
</macrodef>
<genreffile samplename="video1"/>
<genreffile samplename="audio1"/>
<genreffile samplename="video2"/>
<genreffile samplename="audio2"/>
<genreffile samplename="indirect"/>
<genreffile samplename="utf8_embedded_text"/>
<genreffile samplename="class14"/>
<genreffile samplename="escape-chars"/>
</target>
</project>