forked from vincent-petithory/stdpx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·162 lines (136 loc) · 5.03 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="stdpx" default="c" basedir=".">
<!-- Properties -->
<property file="${basedir}/build/build.properties" />
<taskdef file="${basedir}/build/flexc.tasks" classpath="${basedir}/build/flexc.jar" />
<!-- Master tasks -->
<target
name="c"
depends="c.kernels, c.swc, c.asdoc"
description="Creates the whole library"
/>
<target
name="clean"
depends="clean.kernels, clean.swc"
description="Cleans all"
/>
<!-- pack -->
<target name="clean.pack">
<delete>
<fileset dir="${lib.output.dir}" includes="**/stdpx*.zip" excludes="**/asdoc-stdpx.*.zip" />
</delete>
</target>
<target name="pack" depends="clean.pack, build.get">
<!-- zip -->
<loadresource property="project.archive">
<propertyresource name="project.archive.pattern" />
<filterchain>
<replacetokens>
<token key="BUILD" value="${project.build.number}"/>
</replacetokens>
</filterchain>
</loadresource>
<zip destfile="${project.archive}">
<zipfileset dir="${asdoc.dir}" prefix="asdoc" />
<zipfileset dir="${lib.output.dir}" includes="*.swc" />
<zipfileset dir="${lib.output.dir}" includes="${project.readme}" />
<zipfileset dir="${lib.output.dir}" includes="LICENSE" />
</zip>
</target>
<!-- kernels -->
<target name="clean.kernels">
<delete>
<fileset dir="${project.kernels}" includes="**/*.pbj" />
</delete>
</target>
<target name="c.kernels" depends="clean.kernels">
<property name="pixelbender.compiler" value="./build/pixelbender/pbutil.exe" />
<pixelbender failonerror="true" compiler="${pixelbender.compiler}">
<fileset dir="${project.kernels}" includes="**/*.pbk" />
</pixelbender>
</target>
<!-- swc -->
<target name="clean.swc">
<delete>
<fileset dir="${lib.output.dir}" includes="**/*.swc" />
</delete>
</target>
<target name="c.swc" depends="clean.swc, timestamp, build.new, build.get">
<mkdir dir="${lib.output.dir}" />
<loadresource property="project.out">
<propertyresource name="project.out.pattern" />
<filterchain>
<replacetokens>
<token key="BUILD" value="${project.build.number}"/>
</replacetokens>
</filterchain>
</loadresource>
<compc failonerror="true">
<arg value="-debug=true"/>
<arg value="-title ${project.metadata.title} " />
<arg value="-description ${project.metadata.description}" />
<arg value="-publisher ${project.metadata.publisher}" />
<arg value="-creator ${project.metadata.creator}" />
<arg value="-date ${project.metadata.date}" />
<arg value="-language ${project.metadata.language}" />
<arg value="-sp ${project.src}" />
<arg value="-is ${project.sources}" />
<arg value="-ic ${project.classes}" />
<arg value="-target-player=10" />
<arg value="-o ${project.out}" />
</compc>
<copy file="${project.root}/${project.license}" toDir="${lib.output.dir}" />
<copy file="${project.root}/${project.readme}" toDir="${lib.output.dir}" />
</target>
<!-- asdoc -->
<target name="clean.asdoc">
<delete dir="${asdoc.dir}" />
<delete>
<fileset dir="${lib.output.dir}" includes="**/asdoc-stdpx*.zip" />
</delete>
</target>
<target name="c.asdoc" depends="clean.asdoc, timestamp, build.get">
<mkdir dir="${asdoc.dir}" />
<asdoc failonerror="true">
<arg value="-main-title=${asdoc.title.main}" />
<arg value="-window-title=${asdoc.title.window}" />
<arg value="-footer=${asdoc.title.footer}" />
<arg value="-title ${asdoc.metadata.title} " />
<arg value="-description ${asdoc.metadata.description}" />
<arg value="-publisher ${asdoc.metadata.publisher}" />
<arg value="-creator ${asdoc.metadata.creator}" />
<arg value="-date ${asdoc.metadata.date}" />
<arg value="-language ${asdoc.metadata.language}" />
<arg value="-templates-path ${asdoc.templatespath}" />
<arg value="-load-config+=${asdoc.config}" />
<arg value="-sp ${project.src}" />
<arg value="-target-player=10" />
<arg value="-doc-sources ${asdoc.sources}" />
<arg value="-doc-classes ${asdoc.classes}" />
<arg value="-o ${asdoc.dir}" />
</asdoc>
<!-- zip -->
<loadresource property="asdoc.archive">
<propertyresource name="asdoc.archive.pattern" />
<filterchain>
<replacetokens>
<token key="BUILD" value="${project.build.number}"/>
</replacetokens>
</filterchain>
</loadresource>
<zip destfile="${asdoc.archive}" basedir="${asdoc.dir}" />
</target>
<target name="build.new">
<buildnumber file="${project.build.file}" />
</target>
<target name="build.get">
<property file="${project.build.file}" prefix="project" />
</target>
<target name="timestamp" unless="timestamp.done">
<property name="timestamp.done" value="true" />
<tstamp>
<format property="project.metadata.date" pattern="dd/MM/yyyy" locale="en,UK"/>
<format property="asdoc.metadata.date" pattern="dd/MM/yyyy" locale="en,UK"/>
</tstamp>
</target>
</project>