]> git.proxmox.com Git - extjs.git/blob - extjs/examples/classic/desktop/.sencha/app/init-impl.xml
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / classic / desktop / .sencha / app / init-impl.xml
1 <project name="init-impl">
2 <!--
3 Init-Local
4 -->
5 <target name="-before-init-local"/>
6 <target name="-init-local">
7 <!--
8 ${basedir} is actually the basedir of build.xml, in the app root
9 so this imports ${app.dir}/local.properties, if present
10 -->
11 <property file="${basedir}/local.properties"/>
12
13 <!--
14 This will traverse upwards in the file system, starting at the
15 app root directory, looking for the workspace. Once found,
16 ${workspace.dir}/local.properties will be imported into this
17 project
18 -->
19 <script language="javascript">
20 <![CDATA[
21 var f = new java.io.File(project.getProperty("basedir"));
22 var sub = ".sencha/workspace/sencha.cfg";
23
24 for (var p = f; p; p = p.getParentFile()) {
25 var t = new java.io.File(p, sub);
26 if (t.exists()) {
27 // we found the workspace folder!
28
29 t = new java.io.File(p, "local.properties");
30 if (t.exists()) {
31 var loader = project.createTask("property");
32 loader.setFile(new java.io.File(t.getCanonicalPath()));
33 loader.execute();
34 }
35
36 break;
37 }
38 }
39 ]]>
40 </script>
41
42 </target>
43 <target name="-after-init-local"/>
44 <target name="init-local"
45 depends="-before-init-local,-init-local,-after-init-local"/>
46
47 <target name="-before-init"/>
48 <target name="-init" unless="internal.x-sencha-initialized">
49 <!--
50 Now, apply various project updates, such as ant class loader path
51 updates, as well as loading Sencha Cmd config system properties
52 into ant property space
53 -->
54 <x-sencha-init prefix=""/>
55
56 <!--
57 default the build environment to production if it is unset by this point
58 -->
59 <property name="build.environment" value="production"/>
60 <property name="CR" value="&#10;"/>
61
62 <tstamp>
63 <!-- sets DSTAMP=yyyyMMdd, TSTAMP=hhmm -->
64 <format property="build.year" pattern="yyyy"/>
65 <format property="build.datetime" pattern="yyyy-MM-dd HH:mm:ss"/>
66 <format property="build.date" pattern="MMMM d, yyyy"/>
67 <format property="build.timestamp" pattern="yyyyMMddHHmmss"/>
68 </tstamp>
69
70 <x-load-properties>
71 <!-- If available, load user-defined properties for this build identifier -->
72 <file path="${app.config.dir}/${build.id}.properties" required="false"/>
73 <file path="${app.config.dir}/${app.locale}.properties" required="false"/>
74 <file path="${app.config.dir}/${app.theme}.properties" required="false"/>
75 <file path="${app.config.dir}/${build.name}.properties" required="false"/>
76 <file path="${app.config.dir}/multi-build.properties" required="false"/>
77 <!-- Load user-defined properties for environment then general: -->
78 <file path="${app.config.dir}/${build.environment}.properties" required="false"/>
79 <file path="${app.config.dir}/build.properties" required="false"/>
80 <!-- Pick up the defaults by framework/environment followed by general: -->
81 <file path="${app.config.dir}/${framework.name}.properties" required="true"/>
82 <file path="${app.config.dir}/${app.packager}.defaults.properties" required="false"/>
83 <file path="${app.config.dir}/${build.environment}.defaults.properties" required="true"/>
84 <file path="${app.config.dir}/defaults.properties" required="true"/>
85 </x-load-properties>
86
87 <!--
88 calculate the appropriate build.compression value
89 -->
90 <condition property="build.compression" value="-yui">
91 <or>
92 <x-is-true value="${build.compression.yui}"/>
93 <equals arg1="yui" arg2="${app.compressor.type}"/>
94 </or>
95 </condition>
96
97 <condition property="build.compression" value="-closure">
98 <or>
99 <x-is-true value="${build.compression.closure}"/>
100 <equals arg1="closure" arg2="${app.compressor.type}"/>
101 </or>
102 </condition>
103
104 <condition property="build.compression" value="-uglify">
105 <or>
106 <x-is-true value="${build.compression.uglify}"/>
107 <equals arg1="uglify" arg2="${app.compressor.type}"/>
108 </or>
109 </condition>
110
111 <property name="build.compression" value=""/>
112
113 <!--
114 this id string is used to share a common compiler instance
115 for all x-compile calls in this project
116 -->
117 <property name="compiler.ref.id" value="app-compiler"/>
118
119 <!--
120 this property is set indicating we've reached the end of the
121 core init phase. it's presence will indicate that we've already
122 executed this target, and will bypass firing the init code
123 repeatedly in sub projects (antcall, x-ant-call)
124 See the above 'unless' attribute on the -init target
125 -->
126 <property name="internal.x-sencha-initialized" value="true"/>
127
128 <!--
129 this is a helper property that is the relative path prefix from the
130 application's root directory to the root of the build directory
131 -->
132 <x-get-relative-path from="${app.dir}"
133 to="${build.out.base.path}"
134 property="build.dir.relative"/>
135
136
137 <if>
138 <isset property="app.toolkit"/>
139 <then>
140 <property name="app.sass.fashion" value="true"/>
141 </then>
142 </if>
143
144 <property name="app.sass.fashion" value="false"/>
145 <property name="app.sass.rhino" value="false"/>
146 <property name="app.sass.dynamic" value="false"/>
147 </target>
148 <target name="-after-init"/>
149
150 <target name="-before-init-defaults"/>
151 <target name="-init-defaults">
152 <!--
153 This property can be modified to change general build options
154 such as excluding files from the set. The format expects newlines
155 for each argument, for example:
156
157 <property name="build.operations"/>
158 exclude
159 -namespace=Ext
160 </property>
161 -->
162 <property name="build.operations" value=""/>
163
164 <!--
165 This property can be modified to change concatenation
166 specific options
167
168 -strip-comments: comment suppression
169 -remove-text-references: transform string literal class references to objects
170 -beautify: unpack the source
171
172 <property name="build.concat.options"/>
173 -strip-comments
174 -remove-text-references
175 -beautify
176 </property>
177 -->
178 <property name="build.concat.options" value=""/>
179
180 <!--
181 This property can be modified to change page compilation options
182
183 -scripts: inject the given script path into the generated markup ahead of the all classes file
184
185 <property name="build.page.options"/>
186 -scripts=framework.js
187 </property>
188 -->
189 <property name="build.page.options" value=""/>
190
191
192 <dirname property="build.out.page.dir" file="${build.out.page.path}"/>
193 <dirname property="build.out.js.dir" file="${build.out.js.path}"/>
194 <dirname property="build.out.framework.dir" file="${build.out.framework.path}"/>
195 <dirname property="build.out.css.dir" file="${build.out.css.path}"/>
196 <dirname property="build.out.microloader.dir" file="${build.out.microloader.path}"/>
197 <dirname property="build.out.manifest.dir" file="${build.out.manifest.path}"/>
198 <dirname property="build.out.metadata.dir" file="${build.out.metadata.path}"/>
199
200 <dirname property="build.bootstrap.page.dir" file="${build.bootstrap.page.path}"/>
201 <dirname property="build.bootstrap.css.dir" file="${build.bootstrap.css.path}"/>
202 <dirname property="build.bootstrap.microloader.dir" file="${build.bootstrap.microloader.path}"/>
203 <dirname property="build.bootstrap.manifest.dir" file="${build.bootstrap.manifest.path}"/>
204 <dirname property="build.bootstrap.metadata.dir" file="${build.bootstrap.metadata.path}"/>
205
206 <x-get-relative-path from="${build.out.base.path}" to="${build.out.js.path}" property="build.classes.name"/>
207 <x-get-relative-path from="${build.out.page.dir}" to="${build.out.microloader.path}" property="build.microloader.name"/>
208 <x-get-relative-path from="${build.out.page.dir}" to="${build.out.manifest.path}" property="app.manifest.name"/>
209 <x-get-relative-path from="${build.out.page.dir}" to="${build.out.appCache.path}" property="build.out.appCache.name"/>
210
211 <if>
212 <x-is-true value="${app.output.microloader.enable}"/>
213 <then>
214 <property name="build.output.markuponly" value="false"/>
215 </then>
216 <else>
217 <property name="build.output.markuponly" value="true"/>
218 </else>
219 </if>
220
221 <if>
222 <equals arg1="${app.toolkit}" arg2="modern"/>
223 <then>
224 <property name="skip.slice" value="1"/>
225 </then>
226 </if>
227
228 <if>
229 <!--If AppCache is FALSE or non-existent skip it-->
230 <or>
231 <x-is-false value="${app.output.appCache.enable}"/>
232 <not>
233 <isset property="app.output.appCache.enable"/>
234 </not>
235 </or>
236 <then>
237 <property name="skip.appCache" value="1"/>
238 </then>
239 </if>
240
241 <if>
242 <!--If Deltas are FALSE, deltas do not exist, or caching is disabled then skip delta patching-->
243 <or>
244 <x-is-false value="${app.cache.enable}"/>
245 <!-- This was done because deltas is possibly a boolean OR a string. x-is-false on any normal string appears a falsey value-->
246 <equals arg1="${app.cache.deltas}" arg2="false"/>
247 <not>
248 <isset property="app.cache.deltas"/>
249 </not>
250 </or>
251 <then>
252 <property name="skip.deltas" value="1"/>
253 </then>
254 </if>
255
256 <!-- If Deltas are True, 'yes' or 'on' default to 'deltas' otherwise set the appropriate delta path -->
257 <if>
258 <x-is-true value="${app.cache.deltas}"/>
259 <then>
260 <property name="build.out.deltas.path" location="${build.out.base.path}/deltas"/>
261 </then>
262 <else>
263 <property name="build.out.deltas.path" location="${build.out.base.path}/${app.cache.deltas}"/>
264 </else>
265 </if>
266
267 <!--<if>-->
268 <!--<not>-->
269 <!--<equals arg1="${build.environment}" arg2="development"/>-->
270 <!--</not>-->
271 <!--<then>-->
272 <!--<property name="skip.refresh" value="true"/>-->
273 <!--</then>-->
274 <!--</if>-->
275
276 </target>
277 <target name="-after-init-defaults"/>
278
279 <!--
280 Initializes the compiler instances, reading in the app.json and package.json
281 definitions, as well as scanning and parsing all js files found on the
282 various classpath entries for the framework, workspace, packages, and app
283 -->
284 <target name="-init-compiler" depends="-init">
285 <local name="include.versions.file"/>
286 <local name="include.versions.file.command"/>
287
288 <condition property="internal.app.css.rel" value="${app.out.css.rel}">
289 <x-is-true value="${enable.ext42.themes}"/>
290 </condition>
291 <property name="internal.app.css.rel" value=""/>
292
293 <property name="include.versions.file.command">
294 <![CDATA[
295 meta
296 +packages
297 -out=${build.out.package.versions}
298 and
299 classpath
300 -path=${build.out.package.versions}
301 -name=framework
302 and
303 require
304 -scopeName=framework
305 -source=Ext.Base
306 -requires=${build.out.package.versions}
307 -allow-unmet=false
308 and
309 ]]>
310 </property>
311
312 <property name="exclude.boot.command">
313 <![CDATA[
314 exclude
315 -class=Ext.Boot
316 and
317 ]]>
318 </property>
319
320 <condition property="include.versions.file" value="${include.versions.file.command}">
321 <x-is-false value="${build.skip.versions.file}"/>
322 </condition>
323
324 <property name="include.versions.file" value="#skip"/>
325
326 <condition property="exclude.boot" value="${exclude.boot.command}">
327 <not>
328 <x-is-true value="${build.output.markuponly}"/>
329 </not>
330 </condition>
331
332 <property name="exclude.boot" value="#skip"/>
333
334 <x-compile refid="${compiler.ref.id}"
335 dir="${app.dir}"
336 initOnly="true"
337 inheritAll="true">
338 <![CDATA[
339 # base build command
340 -tempDir=${build.compile.temp.dir}
341 -keepTempDir=${build.compile.temp.dir.keep}
342 -options=${build.options}
343 load-app
344 -splitFramework=${enable.split.mode}
345 -frameworkFile=${build.framework.name}
346 -jsBundleFile=${build.classes.name}
347 -cssBundleFile=${internal.app.css.rel}
348 -tempDir=${build.app.temp.dir}
349 -tag=${build.tag.name}
350 and
351 restore
352 ${build.tag.name}
353 and
354 ${include.versions.file}
355 union
356 -recursive
357 -tag=${build.tag.name}
358 and
359 save
360 ${build.tag.name}-overrides
361 and
362 ${build.operations}
363 and
364 ${exclude.boot}
365 save
366 page
367 ]]>
368 </x-compile>
369 </target>
370
371 <target name="-init-app-js-files" depends="-init-compiler">
372 <x-compile refid="${compiler.ref.id}">
373 <![CDATA[
374 union
375 -recursive
376 -tag=${build.tag.name}
377 and
378 save
379 ${build.tag.name}-overrides
380 and
381 ${build.operations}
382 and
383 ${exclude.boot}
384 save
385 page
386 ]]>
387 </x-compile>
388 </target>
389
390 <target name="-init-web-server">
391 <x-server port="${build.web.port}"
392 portPropertyName="build.web.port"
393 defaultSassFile="${app.out.scss}"
394 defaultCssFile="${app.out.css}"
395 refid="app.web.server"
396 saveVariablesProp="app.sass.save">
397 <mapping name="~cmd" path="${cmd.dir}"/>
398 <mapping name="" path="${build.web.root}"/>
399 </x-server>
400 <x-echo>Application available at http://localhost:${build.web.port}</x-echo>
401 </target>
402
403 </project>