]> git.proxmox.com Git - sencha-touch.git/blob - src/examples/kitchensink/.sencha/app/page-impl.xml
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / examples / kitchensink / .sencha / app / page-impl.xml
1 <project name="x-page-impl.xml">
2
3 <macrodef name="x-build-microload-markup">
4 <sequential>
5 <x-sencha-command dir="${app.dir}" inheritall="true">
6 <![CDATA[
7 fs
8 minify
9 ${build.embedded.microloader.compressor}
10 -from=${build.microloader.path}
11 -to=${build.microloader.path}
12 ]]>
13 </x-sencha-command>
14 <if>
15 <x-is-true value="${build.enable.embedded.microloader}"/>
16 <then>
17 <x-run-if-true value="${app.output.page.enable}">
18 <x-compile refid="${compiler.ref.id}">
19 <![CDATA[
20 markup
21 -contentFile=${build.microloader.path}
22 -tpl=${build.embedded.microloader.tpl}
23 -out=${build.out.page.path}
24 ]]>
25 </x-compile>
26 <!--once the generated microloader file is embedded, delete it-->
27 <delete file="${build.microloader.path}"/>
28 </x-run-if-true>
29 </then>
30 <else>
31 <x-run-if-true value="${app.output.page.enable}">
32 <x-compile refid="${compiler.ref.id}">
33 <![CDATA[
34 markup
35 -markup=${build.external.microloader.markup}
36 -out=${build.out.page.path}
37 ]]>
38 </x-compile>
39 </x-run-if-true>
40 </else>
41 </if>
42 </sequential>
43 </macrodef>
44
45 <target name="-build-output-manifest-page">
46 <local name="metadata.base.path"/>
47 <property name="metadata.base.path" value="${build.out.metadata.dir}"/>
48 <x-run-if-true value="${app.output.manifest.enable}">
49 <if>
50 <x-is-true value="${build.enable.embedded.manifest}"/>
51 <then>
52 <x-compile refid="${compiler.ref.id}">
53 <![CDATA[
54 # generate microloader file
55 # generate json file
56 microload
57 -operation=manifest
58 -tpl=${build.microloader.json.tpl.embedded}
59 -out=${build.microloader.path}
60 -resourcePath=${build.out.base.path}
61 -basePath=${metadata.base.path}
62 and
63 microload
64 -append
65 -operation=microloader
66 -microloaderPath=${app.microloader.path}
67 -bootPath=${build.boot.file}
68 -tpl=${build.microloader.code.tpl}
69 -out=${build.microloader.path}
70 ]]>
71 </x-compile>
72 </then>
73 <else>
74 <x-compile refid="${compiler.ref.id}">
75 <![CDATA[
76 # generate json file
77 microload
78 -operation=manifest
79 -tpl=${build.microloader.json.tpl.standalone}
80 -out=${build.out.json.path}
81 -resourcePath=${build.out.base.path}
82 -basePath=${metadata.base.path}
83 and
84 microload
85 -operation=manifest
86 -tpl=${build.microloader.json.tpl.external}
87 -out=${build.microloader.path}
88 -resourcePath=${build.out.base.path}
89 -basePath=${metadata.base.path}
90 and
91 # generate microloader file
92 microload
93 -append
94 -operation=microloader
95 -microloaderPath=${app.microloader.path}
96 -bootPath=${build.boot.file}
97 -tpl=${build.microloader.code.tpl}
98 -out=${build.microloader.path}
99 ]]>
100 </x-compile>
101 </else>
102 </if>
103 </x-run-if-true>
104 <x-build-microload-markup/>
105 </target>
106
107 <target name="-build-output-microload-page">
108 <if>
109 <x-is-true value="${build.enable.embedded.manifest}"/>
110 <then>
111 <x-compile refid="${compiler.ref.id}">
112 <![CDATA[
113 # generate microloader file
114 microload
115 -operation=microloader
116 -microloaderPath=${app.microloader.path}
117 -tpl=${build.microloader.code.tpl}
118 -out=${build.microloader.path}
119 and
120 # generate json file
121 microload
122 -operation=json
123 -append
124 -tpl=${build.microloader.json.tpl.embedded}
125 -out=${build.microloader.path}
126 ]]>
127 </x-compile>
128 </then>
129 <else>
130 <x-compile refid="${compiler.ref.id}">
131 <![CDATA[
132 # generate json file
133 microload
134 -operation=json
135 -tpl=${build.microloader.json.tpl.standalone}
136 -out=${build.out.json.path}
137 and
138 # generate microloader file
139 microload
140 -operation=microloader
141 -microloaderPath=${app.microloader.path}
142 -tpl=${build.microloader.code.tpl}
143 -out=${build.microloader.path}
144 and
145 microload
146 -operation=json
147 -append
148 -tpl=${build.microloader.json.tpl.external}
149 -out=${build.microloader.path}
150 ]]>
151 </x-compile>
152 </else>
153 </if>
154 <x-build-microload-markup/>
155 </target>
156
157 <!-- generates a separate json manifest for use with native packager -->
158 <target name="-build-standalone-json-manifest">
159 <x-run-if-true value="${enable.standalone.manifest}">
160 <x-compile refid="${compiler.ref.id}">
161 <![CDATA[
162 # generate json file
163 microload
164 -operation=json
165 -tpl=${build.microloader.json.tpl.standalone}
166 -out=${build.out.json.path}
167 ]]>
168 </x-compile>
169 </x-run-if-true>
170 </target>
171
172 <target name="-build-output-markup-page">
173 <condition property="internal.app.css.rel" value="${app.out.css.rel}">
174 <x-is-true value="${enable.ext42.themes}"/>
175 </condition>
176 <property name="internal.app.css.rel" value=""/>
177
178 <if>
179 <isset property="framework.isV5"/>
180 <then>
181 <x-compile refid="${compiler.ref.id}">
182 <![CDATA[
183 markup
184 -out=${build.out.page.path}
185 -basePath=${build.out.metadata.dir}
186 -resourcePath=${build.out.base.path}
187 and
188 # generate microloader file
189 # generate json file
190 microload
191 -operation=manifest
192 -tpl=${build.microloader.json.tpl.embedded}
193 -out=${build.microloader.path}
194 -resourcePath=${build.out.base.path}
195 -basePath=${build.out.metadata.dir}
196 ]]>
197 </x-compile>
198 <x-compress-js srcFile="${build.microloader.path}" outFile="${build.microloader.path}"/>
199 <concat destfile="${build.out.js.path}.tmp">
200 <fileset file="${build.microloader.path}"/>
201 <fileset file="${build.out.js.path}"/>
202 </concat>
203 <delete file="${build.microloader.path}"/>
204 <delete file="${build.out.js.path}"/>
205 <move file="${build.out.js.path}.tmp" tofile="${build.out.js.path}"/>
206 </then>
207 <else>
208 <x-compile refid="${compiler.ref.id}">
209 <![CDATA[
210 markup
211 -out=${build.out.page.path}
212 -resourcePath=${build.out.base.path}
213 -basePath=${build.out.metadata.dir}
214 ]]>
215 </x-compile>
216 </else>
217 </if>
218 </target>
219
220 <!-- '-detect-app-build-properties' is defined in js-impl.xml -->
221 <target name="-build-output-page"
222 depends="-detect-app-build-properties,-build-standalone-json-manifest">
223 <if>
224 <x-is-true value="${build.output.markuponly}"/>
225 <then>
226 <x-ant-call target="-build-output-markup-page"/>
227 </then>
228 <else>
229 <if>
230 <x-is-true value="${build.enable.appmanifest}"/>
231 <then>
232 <x-ant-call target="-build-output-manifest-page"/>
233 </then>
234 <else>
235 <x-ant-call target="-build-output-microload-page"/>
236 </else>
237 </if>
238 </else>
239 </if>
240 </target>
241
242 <target name="-copy-app-resources" depends="-init-compiler">
243 <x-compile refid="${compiler.ref.id}">
244 <![CDATA[
245 app-resources
246 -compress=${enable.resource.compression}
247 -out=${build.out.base.path}
248 ]]>
249 </x-compile>
250 </target>
251
252 <target name="-generate-deltas" depends="-init-compiler">
253 <x-run-if-true value="${app.output.deltas.enable}">
254 <if>
255 <and>
256 <x-is-true value="${enable.deltas}"/>
257 <x-is-false value="${build.output.markuponly}"/>
258 </and>
259 <then>
260 <x-compile refid="${compiler.ref.id}">
261 <![CDATA[
262 deltas
263 -archivePath=${build.out.archive.path}
264 -deltaPath=${build.out.delta.path}
265 -resourcePath=${build.out.base.path}
266 ]]>
267 </x-compile>
268 </then>
269 </if>
270 </x-run-if-true>
271 </target>
272
273 <target name="-generate-cache-manifest" depends="-init-compiler">
274 <x-run-if-true value="${app.output.cache.enable}">
275 <if>
276 <and>
277 <x-is-true value="${enable.cache.manifest}"/>
278 <x-is-false value="${build.output.markuponly}"/>
279 </and>
280 <then>
281 <x-compile refid="${compiler.ref.id}">
282 <![CDATA[
283 cache-manifest
284 -cacheManifestPath=${build.manifest.path}
285 ]]>
286 </x-compile>
287 <replace file="${build.out.page.path}"
288 token="&lt;html manifest=&quot;&quot;"
289 value="&lt;html manifest=&quot;${build.manifest.name}&quot;"/>
290 </then>
291 </if>
292 </x-run-if-true>
293 <!--remove manifest placeholder if present-->
294 <replace file="${build.out.page.path}"
295 token="&lt;html manifest=&quot;&quot;"
296 value="&lt;html"/>
297 </target>
298
299 <target name="-before-page"/>
300 <target name="-page"
301 depends="-copy-app-resources,
302 -generate-deltas,
303 -build-output-page,
304 -generate-cache-manifest"/>
305 <target name="-after-page"/>
306 </project>