]> git.proxmox.com Git - sencha-touch.git/blame - src/examples/icons/.sencha/app/init-impl.xml
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / examples / icons / .sencha / app / init-impl.xml
CommitLineData
c4685c84
TL
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 <x-load-properties>
63 <!-- Load user-defined properties for environment then general: -->
64 <file path="${app.config.dir}/${build.environment}.properties" required="false"/>
65 <file path="${app.config.dir}/build.properties" required="false"/>
66 <!-- Pick up the defaults by framework/environment followed by general: -->
67 <file path="${app.config.dir}/${framework.name}.properties" required="true"/>
68 <file path="${app.config.dir}/${build.environment}.defaults.properties" required="true"/>
69 <file path="${app.config.dir}/defaults.properties" required="true"/>
70 </x-load-properties>
71
72 <!--
73 calculate the appropriate build.compression value
74 -->
75 <condition property="build.compression" value="-yui">
76 <x-is-true value="${build.compression.yui}"/>
77 </condition>
78
79 <condition property="build.compression" value="-closure">
80 <x-is-true value="${build.compression.closure}"/>
81 </condition>
82
83 <condition property="build.compression" value="-uglify">
84 <x-is-true value="${build.compression.uglify}"/>
85 </condition>
86
87 <property name="build.compression" value=""/>
88
89 <x-verify-app-cmd-ver/>
90
91 <!--
92 this id string is used to share a common compiler instance
93 for all x-compile calls in this project
94 -->
95 <property name="compiler.ref.id" value="app-compiler"/>
96
97 <!--
98 this property is set indicating we've reached the end of the
99 core init phase. it's presence will indicate that we've already
100 executed this target, and will bypass firing the init code
101 repeatedly in sub projects (antcall, x-ant-call)
102 See the above 'unless' attribute on the -init target
103 -->
104 <property name="internal.x-sencha-initialized" value="true"/>
105 </target>
106 <target name="-after-init"/>
107
108 <target name="-before-init-defaults"/>
109 <target name="-init-defaults">
110 <!--
111 This property can be modified to change general build options
112 such as excluding files from the set. The format expects newlines
113 for each argument, for example:
114
115 <property name="build.operations"/>
116 exclude
117 -namespace=Ext
118 </property>
119 -->
120 <property name="build.operations" value=""/>
121
122 <!--
123 This property can be modified to change concatenation
124 specific options
125
126 -strip-comments: comment suppression
127 -remove-text-references: transform string literal class references to objects
128 -beautify: unpack the source
129
130 <property name="build.concat.options"/>
131 -strip-comments
132 -remove-text-references
133 -beautify
134 </property>
135 -->
136 <property name="build.concat.options" value=""/>
137
138 <!--
139 This property can be modified to change page compilation options
140
141 -scripts: inject the given script path into the generated markup ahead of the all classes file
142
143 <property name="build.page.options"/>
144 -scripts=framework.js
145 </property>
146 -->
147 <property name="build.page.options" value=""/>
148 </target>
149 <target name="-after-init-defaults"/>
150
151 <!--
152 Initializes the compiler instances, reading in the app.json and package.json
153 definitions, as well as scanning and parsing all js files found on the
154 various classpath entries for the framework, workspace, packages, and app
155 -->
156 <target name="-init-compiler" depends="-init">
157 <condition property="internal.app.css.rel" value="${app.out.css.rel}">
158 <x-is-true value="${enable.ext42.themes}"/>
159 </condition>
160 <property name="internal.app.css.rel" value=""/>
161
162 <x-compile refid="${compiler.ref.id}"
163 dir="${app.dir}"
164 initOnly="true"
165 inheritAll="true">
166 <![CDATA[
167 # base build command
168 -tempDir=${build.compile.temp.dir}
169 -keepTempDir=${build.compile.temp.dir.keep}
170 -options=${build.options}
171 load-app
172 -frameworkFile=${build.framework.name}
173 -jsBundleFile=${build.classes.name}
174 -cssBundleFile=${internal.app.css.rel}
175 -tempDir=${build.app.temp.dir}
176 -tag=${build.tag.name}
177 and
178 restore
179 ${build.tag.name}
180 and
181 meta
182 +packages
183 -out=${build.out.package.versions}
184 and
185 classpath
186 -path=${build.out.package.versions}
187 -name=framework
188 and
189 require
190 -source=@${build.tag.name}
191 -requires=@overrides
192 -allow-unmet=true
193 and
194 require
195 -scopeName=framework
196 -source=Ext.util.Observable
197 -requires=${build.out.package.versions}
198 -allow-unmet=false
199 and
200 union
201 -recursive
202 -tag=${build.tag.name}
203 and
204 save
205 ${build.tag.name}-overrides
206 and
207 ${build.operations}
208 and
209 save
210 page
211 ]]>
212 </x-compile>
213 </target>
214</project>