source: branches/FACT++_part_filenames/dim/WebDID/ext-4.2.1.883/build.xml

Last change on this file was 18350, checked in by tbretz, 9 years ago
Updated to v20r15
File size: 16.6 KB
Line 
1<project name="extjs" default="build" basedir=".">
2 <target name="find-cmd" unless="cmd.dir">
3 <!--
4 Run "sencha which" to find the Sencha Cmd basedir and get "cmd.dir" setup. We
5 need to execute the command with curdir set properly for Cmd to pick up that we
6 are running for an application.
7 -->
8 <exec executable="sencha" dir="${basedir}">
9 <arg value="which"/><arg value="-o=$cmddir$"/>
10 </exec>
11
12 <!-- Now read the generated properties file and delete it -->
13 <property file="$cmddir$"/>
14 <delete file="$cmddir$"/>
15 </target>
16
17 <target name="init-antcontrib" depends="find-cmd">
18 <echo>Using Sencha Cmd from ${cmd.dir}</echo>
19
20 <taskdef resource="net/sf/antcontrib/antlib.xml"
21 loaderref="senchaloader">
22 <classpath>
23 <pathelement location="${cmd.dir}/lib/ant-contrib-1.0b3.jar"/>
24 <pathelement location="${cmd.dir}/lib/commons-httpclient-3.0.1.jar"/>
25 <pathelement location="${cmd.dir}/lib/commons-logging-1.0.4.jar"/>
26 <pathelement location="${cmd.dir}/lib/commons-codec-1.3.jar"/>
27 </classpath>
28 </taskdef>
29 </target>
30
31 <target name="init-sencha-cmd" depends="init-antcontrib">
32 <taskdef resource="com/sencha/ant/antlib.xml"
33 classpath="${cmd.dir}/sencha.jar"
34 loaderref="senchaloader"/>
35 </target>
36
37 <target name="init-all" depends="init-sencha-cmd">
38 <property name="build.dir" location="${basedir}"/>
39 <property name="build.docs.dir" location="${build.dir}/docs"/>
40
41 <echo>build.dir: ${build.dir}</echo>
42 </target>
43
44 <!-- ****************************************************************** -->
45
46 <target name="build" depends="init-all"
47 description="Build the SDK from source">
48 <!--
49 Lay down the file header so we can append the rest from the compiler.
50 -->
51 <for list="ext-core,ext-foundation,ext-all-sandbox,ext-all-rtl-sandbox" param="file">
52 <sequential>
53 <for list=".js,-dev.js,-debug-w-comments.js" param="sfx">
54 <sequential>
55 <copy file="${build.dir}/file-header.js"
56 tofile="${build.dir}/builds/@{file}@{sfx}" overwrite="true"/>
57 </sequential>
58 </for>
59 </sequential>
60 </for>
61 <for list="ext,ext-all,ext-all-rtl" param="file">
62 <sequential>
63 <for list=".js,-dev.js,-debug-w-comments.js" param="sfx">
64 <sequential>
65 <copy file="${build.dir}/file-header.js"
66 tofile="${build.dir}/@{file}@{sfx}" overwrite="true"/>
67 </sequential>
68 </for>
69 </sequential>
70 </for>
71
72 <!--
73 Compile from sources and appending to stubs containing just the license header.
74 -->
75 <x-sencha-command dir="${basedir}">
76 compile
77 -ignore=diag
78
79 # Remove the license header from the source files:
80 -prefix
81 ${basedir}/file-header.js
82
83 # Build *-dev.js files - these have all "debug" conditional code active
84 # for use in development mode.
85
86 -options=debug:true
87 concatenate
88 +append
89 -output-file=${build.dir}/ext-all-rtl-dev.js
90 and
91 concatenate
92 +append
93 -sandbox=Ext4:x4-
94 -output-file=${build.dir}/builds/ext-all-rtl-sandbox-dev.js
95 and
96
97
98 exclude
99 -namespace=Ext.rtl
100 and
101
102
103 concatenate
104 +append
105 -output-file=${build.dir}/ext-all-dev.js
106 and
107 concatenate
108 +append
109 -sandbox=Ext4:x4-
110 -output-file=${build.dir}/builds/ext-all-sandbox-dev.js
111 and
112
113
114 union
115 -tag=core
116 and
117 concatenate
118 +append
119 -output-file=${build.dir}/ext-dev.js
120 and
121 concatenate
122 +append
123 -output-file=${build.dir}/builds/ext-core-dev.js
124 and
125
126
127 union
128 -tag=foundation
129 and
130 concatenate
131 +append
132 -output-file=${build.dir}/builds/ext-foundation-dev.js
133 and
134
135 # Build *-debug-w-comments.js files - these are comment stripped to give
136 # *-debug.js files. These have normal whitespace and are intended to be
137 # debuggable versions of *-all.js files. They do not contain "dev mode"
138 # diagnostic code.
139
140 -options=debug:false
141 include
142 +all
143 and
144
145 concatenate
146 +append
147 -output-file=${build.dir}/ext-all-rtl-debug-w-comments.js
148 and
149 concatenate
150 +append
151 -sandbox=Ext4:x4-
152 -output-file=${build.dir}/builds/ext-all-rtl-sandbox-debug-w-comments.js
153 and
154
155
156 exclude
157 -namespace=Ext.rtl
158 and
159
160
161 concatenate
162 +append
163 -output-file=${build.dir}/ext-all-debug-w-comments.js
164 and
165 concatenate
166 +append
167 -sandbox=Ext4:x4-
168 -output-file=${build.dir}/builds/ext-all-sandbox-debug-w-comments.js
169 and
170
171
172 union
173 -tag=core
174 and
175 concatenate
176 +append
177 -output-file=${build.dir}/ext-debug-w-comments.js
178 and
179 concatenate
180 +append
181 -output-file=${build.dir}/builds/ext-core-debug-w-comments.js
182 and
183
184
185 union
186 -tag=foundation
187 and
188 concatenate
189 +append
190 -output-file=${build.dir}/builds/ext-foundation-debug-w-comments.js
191 and
192
193 # Generate bootstrap data in to ext-dev.js and ext-debug-w-comments.js to
194 # enable the dynamic loader.
195
196 include
197 +all
198 and
199 exclude
200 -tag=core
201 and
202
203 metadata
204 +append
205 +alternates
206 -base-path=${build.dir}
207 -output-file=${build.dir}/ext-debug-w-comments.js
208 and
209 metadata
210 +append
211 +alias
212 -base-path=${build.dir}
213 -output-file=${build.dir}/ext-debug-w-comments.js
214 and
215
216 metadata
217 +append
218 +alternates
219 -base-path=${build.dir}
220 -output-file=${build.dir}/ext-dev.js
221 and
222 metadata
223 +append
224 +alias
225 -base-path=${build.dir}
226 -output-file=${build.dir}/ext-dev.js
227 and
228
229 # Optimize and compress the builds
230
231 -options=debug:false
232 include
233 +all
234 and
235 optimize
236 -define-rewrite
237 and
238
239
240 concatenate
241 +append
242 +yui
243 -output-file=${build.dir}/ext-all-rtl.js
244 and
245 concatenate
246 +append
247 +yui
248 -sandbox=Ext4:x4-
249 -output-file=${build.dir}/builds/ext-all-rtl-sandbox.js
250 and
251
252
253 exclude
254 -namespace=Ext.rtl
255 and
256 concatenate
257 +append
258 +yui
259 -output-file=${build.dir}/ext-all.js
260 and
261 concatenate
262 +append
263 +yui
264 -sandbox=Ext4:x4-
265 -output-file=${build.dir}/builds/ext-all-sandbox.js
266 and
267
268
269 union
270 -tag=core
271 and
272 concatenate
273 +append
274 +yui
275 -output-file=${build.dir}/ext.js
276 and
277 concatenate
278 +append
279 +yui
280 -output-file=${build.dir}/builds/ext-core.js
281 and
282
283
284 union
285 -tag=foundation
286 and
287 concatenate
288 +append
289 +yui
290 -output-file=${build.dir}/builds/ext-foundation.js
291
292 </x-sencha-command>
293
294 <!--
295 Strip comments and compress all flavors.
296 -->
297 <for list="ext,ext-all,ext-all-rtl,builds/ext-all-sandbox,builds/ext-all-rtl-sandbox,builds/ext-core,builds/ext-foundation"
298 param="kind">
299 <sequential>
300 <x-strip-js srcfile="${build.dir}/@{kind}-debug-w-comments.js"
301 outfile="${build.dir}/@{kind}-debug.js"/>
302 </sequential>
303 </for>
304
305 </target>
306
307 <target name="examples" depends="init-all">
308 <x-sencha-command>
309 compile
310 --ignore=diag,rtl/
311 --classpath=${basedir}/examples/shared,${basedir}/examples/ux
312 --classpath=${basedir}/examples/desktop
313 --classpath=${basedir}/examples/portal
314 --classpath=${basedir}/examples/grouptabs
315 --classpath=${basedir}/examples/kitchensink
316 --classpath=${basedir}/examples/app/simple
317 --classpath=${basedir}/examples/simple-tasks
318 --classpath=${basedir}/examples/app/nested-loading
319 --classpath=${basedir}/examples/app/feed-viewer
320 --options=debug:false
321 page
322 --scripts=../common.js
323 --input-file=${basedir}/examples/desktop/desktop.html
324 --output=${build.dir}/examples/desktop/compiled-desktop.html
325 --name=desktop
326 and
327 page
328 --scripts=../common.js
329 --input-file=${basedir}/examples/grouptabs/grouptabs.html
330 --output=${build.dir}/examples/grouptabs/compiled-grouptabs.html
331 --name=grouptabs
332 and
333 page
334 --scripts=../common.js
335 --input-file=${basedir}/examples/kitchensink/index.html
336 --output=${build.dir}/examples/kitchensink/compiled-index.html
337 --name=kitchensink
338 and
339 page
340 --scripts=../../common.js
341 --input-file=${basedir}/examples/app/simple/simple.html
342 --output=${build.dir}/examples/app/simple/compiled-simple.html
343 --name=simpleapp
344 and
345 page
346 --scripts=../common.js
347 --input-file=${basedir}/examples/simple-tasks/index.html
348 --output=${build.dir}/examples/simple-tasks/compiled-index.html
349 --name=simpletasks
350 and
351 page
352 --scripts=../../common.js
353 --input-file=${basedir}/examples/app/nested-loading/nested-loading.html
354 --output=${build.dir}/examples/app/nested-loading/compiled-nested-loading.html
355 --name=nested-loading
356 and
357 page
358 --scripts=../../common.js
359 --input-file=${basedir}/examples/app/feed-viewer/feed-viewer.html
360 --output=${build.dir}/examples/app/feed-viewer/compiled-feed-viewer.html
361 --name=feed-viewer
362 and
363 page
364 --scripts=../common.js
365 --input-file=${basedir}/examples/portal/portal.html
366 --output=${build.dir}/examples/portal/compiled-portal.html
367 --name=portal
368 and
369 intersect
370 -min=6
371 -set=desktop,grouptabs,kitchensink,simpleapp,simpletasks,nested-loading,feed-viewer,portal
372 and
373 save
374 common
375 and
376 concatenate
377 --strip-comments=true
378 --output-file=${build.dir}/examples/common.js
379 and
380 restore
381 portal
382 and
383 exclude
384 -set=common
385 and
386 concatenate
387 --output-file=${build.dir}/examples/portal/all-classes.js
388 and
389 restore
390 feed-viewer
391 and
392 exclude
393 -set=common
394 and
395 concatenate
396 --output-file=${build.dir}/examples/app/feed-viewer/all-classes.js
397 and
398 restore
399 nested-loading
400 and
401 exclude
402 -set=common
403 and
404 concatenate
405 --output-file=${build.dir}/examples/app/nested-loading/all-classes.js
406 and
407 restore
408 simpletasks
409 and
410 exclude
411 -set=common
412 and
413 concatenate
414 --output-file=${build.dir}/examples/simple-tasks/all-classes.js
415 and
416 restore
417 simpleapp
418 and
419 exclude
420 -set=common
421 and
422 concatenate
423 --output-file=${build.dir}/examples/app/simple/all-classes.js
424 and
425 restore
426 kitchensink
427 and
428 exclude
429 -set=common
430 and
431 concatenate
432 --output-file=${build.dir}/examples/kitchensink/all-classes.js
433 and
434 restore
435 grouptabs
436 and
437 exclude
438 -set=common
439 and
440 concatenate
441 --output-file=${build.dir}/examples/grouptabs/all-classes.js
442 and
443 restore
444 desktop
445 and
446 exclude
447 -set=common
448 and
449 concatenate
450 --output-file=${build.dir}/examples/desktop/all-classes.js
451 </x-sencha-command>
452 </target>
453</project>
Note: See TracBrowser for help on using the repository browser.