commit | author | age
|
2e729d
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
JK |
2 |
<!-- *** GENERATED FROM project.xml - DO NOT EDIT *** --> |
|
3 |
<project name="Brydz-impl" default="jar" basedir=".."> |
|
4 |
<!--load-properties--> |
|
5 |
<target name="pre-load-properties"> |
|
6 |
<property file="nbproject/private/private.properties"/> |
|
7 |
<property name="user.properties.file" location="${netbeans.user}/build.properties"/> |
|
8 |
<available property="user.properties.file.exists" file="${user.properties.file}"/> |
|
9 |
</target> |
|
10 |
<target name="exists.config.active" unless="config.active"> |
|
11 |
<echo level="warning" message="Active configuration (config.active property) is not set - using default."/> |
|
12 |
<property value="" name="config.active"/> |
|
13 |
</target> |
|
14 |
<target name="exists.netbeans.user" unless="netbeans.user"> |
|
15 |
<echo level="warning" message="NetBeans IDE user directory (netbeans.user property) is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: ant-ext library home, ...). You could also open this project in the NetBeans IDE - in this case this property would be set automatically."/> |
|
16 |
</target> |
|
17 |
<target name="exists.user.properties.file" unless="user.properties.file.exists"> |
|
18 |
<echo level="warning" message="User properties file (user.properties.file) property is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: libraries, platforms, ...)."/> |
|
19 |
</target> |
|
20 |
<target name="load-properties" depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file"> |
|
21 |
<loadproperties srcfile="nbproject/project.properties"> |
|
22 |
<filterchain> |
|
23 |
<containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/> |
|
24 |
<concatfilter prepend="nbproject/project.properties"/> |
|
25 |
<containsregex pattern="^platform.active=|^deployment.method=|^deployment.instance="/> |
|
26 |
</filterchain> |
|
27 |
</loadproperties> |
|
28 |
<property name="deployment.instance" value="default"/> |
|
29 |
<loadproperties srcfile="${user.properties.file}"> |
|
30 |
<filterchain> |
|
31 |
<replaceregex pattern="^platforms\.${platform.active}\." replace="platform."/> |
|
32 |
<replaceregex pattern="^deployment\.${deployment.method}\.scriptfile=" replace="deployment.scriptfile="/> |
|
33 |
<replaceregex pattern="^deployments\.${deployment.method}\.${deployment.instance}\.([^=]+)=" replace="\1="/> |
|
34 |
</filterchain> |
|
35 |
</loadproperties> |
|
36 |
<loadproperties srcfile="nbproject/project.properties"> |
|
37 |
<filterchain> |
|
38 |
<containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/> |
|
39 |
<concatfilter prepend="nbproject/project.properties"/> |
|
40 |
</filterchain> |
|
41 |
</loadproperties> |
|
42 |
</target> |
|
43 |
<!--basic-init--> |
|
44 |
<target name="exists.platform.active" unless="platform.active"> |
|
45 |
<echo level="warning" message="Active platform (platform.active property) in not set. If you set this and user.properties.file property, many properties required by the project will be automatically evaluated (e.g.: platform home, platform classpath, ...)."/> |
|
46 |
</target> |
|
47 |
<target name="exists.platform.configuration" unless="platform.configuration"> |
|
48 |
<echo level="warning" message="Platform configuration (platform.configuration) is not set. Using default (CLDC-1.0) configuration."/> |
|
49 |
<property name="platform.configuration" value="CLDC-1.0"/> |
|
50 |
</target> |
|
51 |
<target name="exists.platform.profile" unless="platform.profile"> |
|
52 |
<echo level="warning" message="Platform profile (platform.profile) is not set. Using default (MIDP-1.0) profile."/> |
|
53 |
<property name="platform.profile" value="MIDP-1.0"/> |
|
54 |
</target> |
|
55 |
<target name="basic-init" depends="exists.platform.active,exists.platform.configuration,exists.platform.profile"> |
|
56 |
<fail unless="libs.j2me_ant_ext.classpath">Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-mobility-antext.jar file in the IDE installation directory.</fail> |
|
57 |
<fail unless="platform.home">Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location.</fail> |
|
58 |
<fail unless="platform.bootclasspath">Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator.</fail> |
|
59 |
<fail unless="src.dir">Must set src.dir</fail> |
|
60 |
<fail unless="build.dir">Must set build.dir</fail> |
|
61 |
<fail unless="dist.dir">Must set dist.dir</fail> |
|
62 |
<fail unless="dist.jar">Must set dist.jar</fail> |
|
63 |
<property name="javac.source" value="1.3"/> |
|
64 |
<property name="javac.target" value="1.1"/> |
|
65 |
<property name="javac.encoding" value="${file.encoding}"/> |
|
66 |
<property name="deployment.number" value="0.0.1"/> |
|
67 |
<property name="deployment.counter" value="000002"/> |
|
68 |
<condition property="no.deps"> |
|
69 |
<istrue value="${no.dependencies}"/> |
|
70 |
</condition> |
|
71 |
<condition property="no.preprocess"> |
|
72 |
<isfalse value="${use.preprocessor}"/> |
|
73 |
</condition> |
|
74 |
<condition property="no.javadoc.preview"> |
|
75 |
<isfalse value="${javadoc.preview}"/> |
|
76 |
</condition> |
|
77 |
<condition property="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes},**/*Test.java,**/test,**/test/**"> |
|
78 |
<istrue value="${filter.exclude.tests}"/> |
|
79 |
</condition> |
|
80 |
<property name="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes}"/> |
|
81 |
<condition property="deployment.do.override.jarurl" value=""> |
|
82 |
<istrue value="${deployment.override.jarurl}"/> |
|
83 |
</condition> |
|
84 |
<condition property="config.active.name" value="DefaultConfiguration"> |
|
85 |
<length string="${config.active}" trim="true" length="0"/> |
|
86 |
</condition> |
|
87 |
<property name="config.active.name" value="${config.active}"/> |
|
88 |
<taskdef resource="org/netbeans/mobility/antext/defs.properties"> |
|
89 |
<classpath> |
|
90 |
<pathelement path="${libs.j2me_ant_ext.classpath}"/> |
|
91 |
</classpath> |
|
92 |
</taskdef> |
|
93 |
<condition property="skip.deployment"> |
|
94 |
<equals arg1="${deployment.method}" arg2="NONE" casesensitive="false" trim="true"/> |
|
95 |
</condition> |
|
96 |
<condition property="app-version.autoincrement.trigger"> |
|
97 |
<istrue value="${app-version.autoincrement}"/> |
|
98 |
</condition> |
|
99 |
<condition property="debug.timeout" value="30000"> |
|
100 |
<or> |
|
101 |
<equals arg1="${debugger.timeout}" arg2="" trim="true"/> |
|
102 |
<not> |
|
103 |
<isset property="debugger.timeout"/> |
|
104 |
</not> |
|
105 |
</or> |
|
106 |
</condition> |
|
107 |
<property name="debug.timeout" value="${debugger.timeout}"/> |
|
108 |
<nb-overrideproperty name="buildsystem.baton" value="${src.dir}"/> |
|
109 |
</target> |
|
110 |
<!--cldc-init--> |
|
111 |
<target name="cldc-pre-init"> |
|
112 |
<condition property="cldc-platform.trigger"> |
|
113 |
<equals arg1="CLDC" arg2="${platform.trigger}" casesensitive="false"/> |
|
114 |
</condition> |
|
115 |
</target> |
|
116 |
<target name="cldc-init" depends="cldc-pre-init" if="cldc-platform.trigger"> |
|
117 |
<property name="preverify.sources.dir" location="${build.dir}/preverifysrc"/> |
|
118 |
<property name="manifest.build.file" location="${build.dir}/manifest.mf"/> |
|
119 |
<property name="platform.device" value=""/> |
|
120 |
<property name="dist.jad.url" value="file://"/> |
|
121 |
<property name="run.cmd.options" value=""/> |
|
122 |
<condition property="evaluated.run.security.domain" value=""> |
|
123 |
<isfalse value="${run.use.security.domain}"/> |
|
124 |
</condition> |
|
125 |
<property name="evaluated.run.security.domain" value="${run.security.domain}"/> |
|
126 |
<condition property="override.jarurl.trigger"> |
|
127 |
<and> |
|
128 |
<istrue value="${cldc-platform.trigger}"/> |
|
129 |
<istrue value="${deployment.override.jarurl}"/> |
|
130 |
</and> |
|
131 |
</condition> |
|
132 |
<property name="deployment.jad" location="${dist.dir}/${dist.jad}"/> |
|
133 |
<property name="deployment.jar" location="${dist.dir}/${dist.jar}"/> |
|
134 |
<property name="deployment.dir" location="${dist.dir}"/> |
|
135 |
<patternset id="deployment.patternset"> |
|
136 |
<include name="${dist.jad}"/> |
|
137 |
<include name="${dist.jar}"/> |
|
138 |
</patternset> |
|
139 |
</target> |
|
140 |
<!--cdc-init--> |
|
141 |
<target name="cdc-init"> |
|
142 |
<condition property="cdc-platform.trigger"> |
|
143 |
<equals arg1="CDC" arg2="${platform.trigger}" casesensitive="false"/> |
|
144 |
</condition> |
|
145 |
<available file="${manifest.file}" property="manifest.available"/> |
|
146 |
<condition property="main.class.applet"> |
|
147 |
<equals arg1="${main.class.class}" arg2="applet" casesensitive="false"/> |
|
148 |
</condition> |
|
149 |
<condition property="main.class.xlet"> |
|
150 |
<equals arg1="${main.class.class}" arg2="xlet" casesensitive="false"/> |
|
151 |
</condition> |
|
152 |
<condition property="manifest.available+main.class+fat.jar"> |
|
153 |
<and> |
|
154 |
<isset property="manifest.available"/> |
|
155 |
<isset property="main.class"/> |
|
156 |
<istrue value="${platform.fat.jar}"/> |
|
157 |
<not> |
|
158 |
<equals arg1="${main.class}" arg2="" trim="true"/> |
|
159 |
</not> |
|
160 |
</and> |
|
161 |
</condition> |
|
162 |
<condition property="manifest.available+main.class"> |
|
163 |
<and> |
|
164 |
<isset property="manifest.available"/> |
|
165 |
<isset property="main.class"/> |
|
166 |
<isfalse value="${platform.fat.jar}"/> |
|
167 |
<not> |
|
168 |
<equals arg1="${main.class}" arg2="" trim="true"/> |
|
169 |
</not> |
|
170 |
</and> |
|
171 |
</condition> |
|
172 |
<condition property="application.version.invalid" value="true"> |
|
173 |
<equals arg1="${deployment.number}" arg2="" trim="true"/> |
|
174 |
</condition> |
|
175 |
<fail if="application.version.invalid" message="Property deployment.number must not be empty and must contain version in format %d.%d.%d!"/> |
|
176 |
<condition property="sign.jar.trigger" value="true"> |
|
177 |
<and> |
|
178 |
<isset property="cdc-platform.trigger"/> |
|
179 |
<istrue value="${sign.enabled}"/> |
|
180 |
</and> |
|
181 |
</condition> |
|
182 |
</target> |
|
183 |
<!--semc-init--> |
|
184 |
<target name="semc-pre-init" if="cdc-platform.trigger"> |
|
185 |
<condition property="semc-platform.trigger"> |
|
186 |
<equals arg1="semc" arg2="${platform.type}" casesensitive="false"/> |
|
187 |
</condition> |
|
188 |
</target> |
|
189 |
<target name="semc-init" depends="semc-pre-init" if="semc-platform.trigger"> |
|
190 |
<condition property="semc.icon.invalid" value="true"> |
|
191 |
<or> |
|
192 |
<contains string="${semc.application.icon}" substring="$${"/> |
|
193 |
<equals arg1="${semc.application.icon}" arg2="" trim="true"/> |
|
194 |
</or> |
|
195 |
</condition> |
|
196 |
<condition property="no.certificateorkey" value="true"> |
|
197 |
<or> |
|
198 |
<isset property="no.application.uid"/> |
|
199 |
<equals arg1="${semc.certificate.path}" arg2="" trim="true"/> |
|
200 |
<contains string="${semc.certificate.path}" substring="$${semc.certificate.path"/> |
|
201 |
<equals arg1="${semc.private.key.path}" arg2="" trim="true"/> |
|
202 |
<contains string="${semc.private.key.path}" substring="$${semc.private.key.path"/> |
|
203 |
</or> |
|
204 |
</condition> |
|
205 |
<property name="j9.dist" location="${build.dir}/j9/${semc.application.uid}.j9"/> |
|
206 |
<taskdef resource="org/netbeans/modules/j2me/cdc/project/defs.properties"> |
|
207 |
<classpath> |
|
208 |
<pathelement path="${libs.cdc-ant-utils.classpath}"/> |
|
209 |
</classpath> |
|
210 |
</taskdef> |
|
211 |
<taskdef resource="org/netbeans/modules/j2me/cdc/project/semc/defs.properties"> |
|
212 |
<classpath> |
|
213 |
<pathelement path="${libs.semc-ant-utils.classpath}"/> |
|
214 |
</classpath> |
|
215 |
</taskdef> |
|
216 |
<property name="deployment.dir" location="${dist.dir}"/> |
|
217 |
<patternset id="deployment.patternset"> |
|
218 |
<include name="*.sis"/> |
|
219 |
<include name="*.SIS"/> |
|
220 |
</patternset> |
|
221 |
</target> |
|
222 |
<!--savaje-init--> |
|
223 |
<target name="savaje-pre-init" if="cdc-platform.trigger"> |
|
224 |
<condition property="savaje-platform.trigger"> |
|
225 |
<equals arg1="savaje" arg2="${platform.type}" casesensitive="false"/> |
|
226 |
</condition> |
|
227 |
</target> |
|
228 |
<target name="savaje-init" depends="savaje-pre-init" if="savaje-platform.trigger"> |
|
229 |
<property name="savaje.application.uid" value="TBD"/> |
|
230 |
<condition property="savaje.bundle.base.invalid" value="true"> |
|
231 |
<or> |
|
232 |
<equals arg1="${savaje.bundle.base}" arg2="" trim="true"/> |
|
233 |
<contains string="${savaje.bundle.base}" substring="$${savaje.bundle.base"/> |
|
234 |
</or> |
|
235 |
</condition> |
|
236 |
<condition property="savaje.unsupported.main" value="true"> |
|
237 |
<or> |
|
238 |
<equals arg1="${main.class.applet}" arg2="true"/> |
|
239 |
</or> |
|
240 |
</condition> |
|
241 |
<condition property="savaje.icon.invalid" value="true"> |
|
242 |
<or> |
|
243 |
<isset property="no.application.uid"/> |
|
244 |
<contains string="${savaje.application.icon}" substring="$${"/> |
|
245 |
<equals arg1="${savaje.application.icon}" arg2="" trim="true"/> |
|
246 |
</or> |
|
247 |
</condition> |
|
248 |
<property name="jnlp.dist" value="${build.dir}/jnlp/bundle.jnlp"/> |
|
249 |
<property name="deployment.dir" location="${dist.dir}"/> |
|
250 |
<patternset id="deployment.patternset"> |
|
251 |
<include name="bundle.jnlp"/> |
|
252 |
<include name="bundle.policy"/> |
|
253 |
<include name="lib/*"/> |
|
254 |
</patternset> |
|
255 |
</target> |
|
256 |
<!--sjmc-init--> |
|
257 |
<target name="sjmc-pre-init" if="cdc-platform.trigger"> |
|
258 |
<condition property="sjmc-platform.trigger"> |
|
259 |
<equals arg1="sjmc" arg2="${platform.type}" casesensitive="false"/> |
|
260 |
</condition> |
|
261 |
</target> |
|
262 |
<target name="sjmc-init" depends="sjmc-pre-init" if="sjmc-platform.trigger"/> |
|
263 |
<!--ojec-init--> |
|
264 |
<target name="ojec-pre-init" if="cdc-platform.trigger"> |
|
265 |
<condition property="ojec-platform.trigger"> |
|
266 |
<equals arg1="ojec" arg2="${platform.type}" casesensitive="false"/> |
|
267 |
</condition> |
|
268 |
</target> |
|
269 |
<target name="ojec-init" depends="ojec-pre-init" if="ojec-platform.trigger"/> |
|
270 |
<!--cdc-hi-init--> |
|
271 |
<target name="cdc-hi-pre-init" if="cdc-platform.trigger"> |
|
272 |
<condition property="cdc-hi-platform.trigger"> |
|
273 |
<equals arg1="cdc-hi" arg2="${platform.type}" casesensitive="false"/> |
|
274 |
</condition> |
|
275 |
</target> |
|
276 |
<target name="cdc-hi-init" depends="cdc-hi-pre-init" if="cdc-hi-platform.trigger"/> |
|
277 |
<!--nokiaS80-init--> |
|
278 |
<target name="nokiaS80-pre-init" if="cdc-platform.trigger"> |
|
279 |
<condition property="nokiaS80-platform.trigger"> |
|
280 |
<equals arg1="nokiaS80" arg2="${platform.type}" casesensitive="false"/> |
|
281 |
</condition> |
|
282 |
</target> |
|
283 |
<target name="nokiaS80-init" depends="nokiaS80-pre-init" if="nokiaS80-platform.trigger"> |
|
284 |
<property name="j9.dist" location="${build.dir}/j9/NOKIA.j9"/> |
|
285 |
<property name="manifest.build.file" location="${build.dir}/manifest.mf"/> |
|
286 |
<condition property="nokia.icon.invalid"> |
|
287 |
<or> |
|
288 |
<contains string="${nokiaS80.application.icon}" substring="$${"/> |
|
289 |
<equals arg1="${nokiaS80.application.icon}" arg2="" trim="true"/> |
|
290 |
</or> |
|
291 |
</condition> |
|
292 |
<property name="deployment.dir" location="${dist.dir}"/> |
|
293 |
<patternset id="deployment.patternset"> |
|
294 |
<include name="${dist.jar}"/> |
|
295 |
</patternset> |
|
296 |
</target> |
|
297 |
<!--init--> |
|
298 |
<target name="pre-init"/> |
|
299 |
<target name="post-init"/> |
|
300 |
<target name="init" depends="pre-init,load-properties,basic-init,cldc-init,cdc-init,semc-init,savaje-init,sjmc-init,ojec-init,cdc-hi-init,nokiaS80-init,post-init"/> |
|
301 |
<!--conditional clean--> |
|
302 |
<target name="conditional-clean-init"> |
|
303 |
<uptodate property="no.clean.before.build" targetfile="${build.dir}/.timestamp"> |
|
304 |
<srcfiles dir="nbproject"> |
|
305 |
<include name="project.properties"/> |
|
306 |
<include name="build-impl.xml"/> |
|
307 |
</srcfiles> |
|
308 |
</uptodate> |
|
309 |
</target> |
|
310 |
<target name="conditional-clean" depends="init,conditional-clean-init" unless="no.clean.before.build" description="Clean project in case its meta information has changed."> |
|
311 |
<antcall target="do-clean" inheritall="true" inheritrefs="true"/> |
|
312 |
</target> |
|
313 |
<!--deps-jar--> |
|
314 |
<target name="deps-jar" depends="conditional-clean" unless="no.deps"/> |
|
315 |
<!--preprocess--> |
|
316 |
<target name="pre-preprocess"/> |
|
317 |
<target name="do-preprocess" unless="no.preprocess"> |
|
318 |
<fail unless="preprocessed.dir">Must set preprocessed.dir</fail> |
|
319 |
<property name="abilities" value=""/> |
|
320 |
<property name="debug.level" value="debug"/> |
|
321 |
<mkdir dir="${preprocessed.dir}"/> |
|
322 |
<echo message="ignore me" file="${build.dir}/.timestamp"/> |
|
323 |
<nb-prep destdir="${preprocessed.dir}" preprocessfor="${config.active.name},${abilities},DebugLevel=${debug.level}" encoding="${javac.encoding}"> |
|
324 |
<fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated}"/> |
|
325 |
</nb-prep> |
|
326 |
<copy todir="${preprocessed.dir}"> |
|
327 |
<fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/> |
|
328 |
</copy> |
|
329 |
<nb-overrideproperty name="buildsystem.baton" value="${preprocessed.dir}"/> |
|
330 |
</target> |
|
331 |
<target name="post-preprocess"/> |
|
332 |
<target name="preprocess" depends="deps-jar,pre-preprocess,do-preprocess,post-preprocess" description="Preprocess project sources."/> |
|
333 |
<!--compile--> |
|
334 |
<target name="pre-compile"/> |
|
335 |
<target name="do-compile"> |
|
336 |
<fail unless="build.classes.dir">Must set build.classes.dir</fail> |
|
337 |
<mkdir dir="${build.classes.dir}"/> |
|
338 |
<javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" destdir="${build.classes.dir}" srcdir="${buildsystem.baton}" bootclasspath="${platform.bootclasspath}" encoding="${javac.encoding}"> |
|
339 |
<classpath> |
|
340 |
<path path="${libs.classpath}"/> |
|
341 |
</classpath> |
|
342 |
</javac> |
|
343 |
<copy todir="${build.classes.dir}"> |
|
344 |
<fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/> |
|
345 |
</copy> |
|
346 |
<nb-overrideproperty name="buildsystem.baton" value="${build.classes.dir}"/> |
|
347 |
</target> |
|
348 |
<target name="extract-libs" description="Extracts all bundled libraries."> |
|
349 |
<mkdir dir="${build.classes.dir}"/> |
|
350 |
<nb-extract dir="${build.classes.dir}" excludeManifest="true" classpath="${libs.classpath}" excludeclasspath="${extra.classpath}"/> |
|
351 |
</target> |
|
352 |
<target name="post-compile"/> |
|
353 |
<target name="compile" depends="preprocess,pre-compile,extract-libs,do-compile,post-compile" description="Compile project classes."/> |
|
354 |
<!--compile-single--> |
|
355 |
<target name="pre-compile-single"/> |
|
356 |
<target name="do-compile-single"> |
|
357 |
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
|
358 |
<mkdir dir="${build.classes.dir}"/> |
|
359 |
<javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" srcdir="${buildsystem.baton}" destdir="${build.classes.dir}" bootclasspath="${platform.bootclasspath}" includes="${javac.includes}" encoding="${javac.encoding}"> |
|
360 |
<classpath> |
|
361 |
<path path="${libs.classpath}"/> |
|
362 |
</classpath> |
|
363 |
</javac> |
|
364 |
</target> |
|
365 |
<target name="post-compile-single"/> |
|
366 |
<target name="compile-single" depends="preprocess,pre-compile-single,do-compile-single,post-compile-single" description="Compile selected project classes."/> |
|
367 |
<!--proguard--> |
|
368 |
<target name="proguard-init" description="Up-to-date check before obfuscation."> |
|
369 |
<property name="obfuscation.level" value="0"/> |
|
370 |
<condition property="no.obfusc"> |
|
371 |
<or> |
|
372 |
<equals arg1="${obfuscation.level}" arg2="0"/> |
|
373 |
<uptodate targetfile="${obfuscator.destjar}"> |
|
374 |
<srcfiles dir="${buildsystem.baton}"/> |
|
375 |
</uptodate> |
|
376 |
</or> |
|
377 |
</condition> |
|
378 |
<uptodate property="obfuscation.up-to-date" targetfile="${obfuscator.destjar}"> |
|
379 |
<srcfiles dir="${buildsystem.baton}"/> |
|
380 |
</uptodate> |
|
381 |
</target> |
|
382 |
<target name="skip-obfuscation" depends="proguard-init" if="obfuscation.up-to-date"> |
|
383 |
<fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail> |
|
384 |
<nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/> |
|
385 |
</target> |
|
386 |
<target name="proguard" depends="skip-obfuscation" description="Obfuscate project classes." unless="no.obfusc"> |
|
387 |
<fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail> |
|
388 |
<fail unless="obfuscator.srcjar">Must set obfuscator.srcjar</fail> |
|
389 |
<fail unless="obfuscator.destjar">Must set obfuscator.destjar</fail> |
|
390 |
<property name="obfuscator.classpath" value=""/> |
|
391 |
<dirname file="${obfuscator.srcjar}" property="obfuscator.srcjar.dir"/> |
|
392 |
<dirname file="${obfuscator.destjar}" property="obfuscator.destjar.dir"/> |
|
393 |
<mkdir dir="${obfuscator.srcjar.dir}"/> |
|
394 |
<mkdir dir="${obfuscator.destjar.dir}"/> |
|
395 |
<jar jarfile="${obfuscator.srcjar}" basedir="${buildsystem.baton}"/> |
|
396 |
<property name="obfuscation.custom" value=""/> |
|
397 |
<nb-obfuscate srcjar="${obfuscator.srcjar}" destjar="${obfuscator.destjar}" obfuscatorclasspath="${obfuscator.classpath}" classpath="${platform.bootclasspath}:${extra.classpath}" obfuscationLevel="${obfuscation.level}" extraScript="${obfuscation.custom}"/> |
|
398 |
<mkdir dir="${obfuscated.classes.dir}"/> |
|
399 |
<unjar src="${obfuscator.destjar}" dest="${obfuscated.classes.dir}"/> |
|
400 |
<nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/> |
|
401 |
</target> |
|
402 |
<!--obfuscate--> |
|
403 |
<target name="pre-obfuscate"/> |
|
404 |
<target name="post-obfuscate"/> |
|
405 |
<target name="obfuscate" depends="compile,pre-obfuscate,proguard,post-obfuscate" description="Obfuscate project classes."/> |
|
406 |
<!--lwuit-build--> |
|
407 |
<import file="lwuit.xml" optional="true"/> |
|
408 |
<target name="-lwuit-check"> |
|
409 |
<condition property="lwuit.allowed"> |
|
410 |
<and> |
|
411 |
<available file="nbproject/lwuit.xml"/> |
|
412 |
<isset property="is.mesdk_lwuit"/> |
|
413 |
</and> |
|
414 |
</condition> |
|
415 |
</target> |
|
416 |
<target name="-pre-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"/> |
|
417 |
<target name="-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"> |
|
418 |
<antcall target="lwuit_build"/> |
|
419 |
</target> |
|
420 |
<target name="-post-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"/> |
|
421 |
<target name="lwuit-build" depends="-lwuit-check,-pre-lwuit-build, -lwuit-build, -post-lwuit-build" if="lwuit.allowed"/> |
|
422 |
<!--preverify--> |
|
423 |
<target name="pre-preverify"/> |
|
424 |
<target name="do-preverify" if="cldc-platform.trigger"> |
|
425 |
<fail unless="preverify.classes.dir">Must set preverify.classes.dir</fail> |
|
426 |
<mkdir dir="${preverify.sources.dir}"/> |
|
427 |
<copy todir="${preverify.sources.dir}"> |
|
428 |
<fileset dir="${buildsystem.baton}" includes="**/*.class"/> |
|
429 |
</copy> |
|
430 |
<mkdir dir="${preverify.classes.dir}"/> |
|
431 |
<nb-preverify srcdir="${preverify.sources.dir}" destdir="${preverify.classes.dir}" classpath="${platform.bootclasspath}:${extra.classpath}" configuration="${platform.configuration}" platformhome="${platform.home}" platformtype="${platform.type}" commandline="${platform.preverifycommandline}"/> |
|
432 |
<copy todir="${preverify.classes.dir}"> |
|
433 |
<fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/> |
|
434 |
</copy> |
|
435 |
<nb-overrideproperty name="buildsystem.baton" value="${preverify.classes.dir}"/> |
|
436 |
</target> |
|
437 |
<target name="post-preverify"/> |
|
438 |
<target name="preverify" depends="obfuscate,lwuit-build,pre-preverify,do-preverify,post-preverify" description="Preverify project classes."/> |
|
439 |
<!--set-password--> |
|
440 |
<target name="set-password-init"> |
|
441 |
<property name="sign.enabled" value="false"/> |
|
442 |
<condition property="skip-sign-keystore-password-input"> |
|
443 |
<or> |
|
444 |
<isfalse value="${sign.enabled}"/> |
|
445 |
<and> |
|
446 |
<isset property="sign.keystore"/> |
|
447 |
<isset property="sign.keystore.password"/> |
|
448 |
<not> |
|
449 |
<equals arg1="${sign.keystore}" arg2="" trim="true"/> |
|
450 |
</not> |
|
451 |
<not> |
|
452 |
<equals arg1="${sign.keystore.password}" arg2="" trim="true"/> |
|
453 |
</not> |
|
454 |
</and> |
|
455 |
</or> |
|
456 |
</condition> |
|
457 |
<condition property="skip-sign-alias-password-input"> |
|
458 |
<or> |
|
459 |
<isfalse value="${sign.enabled}"/> |
|
460 |
<and> |
|
461 |
<isset property="sign.keystore"/> |
|
462 |
<isset property="sign.alias"/> |
|
463 |
<isset property="sign.alias.password"/> |
|
464 |
<not> |
|
465 |
<equals arg1="${sign.keystore}" arg2="" trim="true"/> |
|
466 |
</not> |
|
467 |
<not> |
|
468 |
<equals arg1="${sign.alias}" arg2="" trim="true"/> |
|
469 |
</not> |
|
470 |
<not> |
|
471 |
<equals arg1="${sign.alias.password}" arg2="" trim="true"/> |
|
472 |
</not> |
|
473 |
</and> |
|
474 |
</or> |
|
475 |
</condition> |
|
476 |
</target> |
|
477 |
<target name="set-keystore-password" if="netbeans.home" unless="skip-sign-keystore-password-input"> |
|
478 |
<nb-enter-password keystore="${sign.keystore}" passwordproperty="sign.keystore.password"/> |
|
479 |
</target> |
|
480 |
<target name="set-alias-password" if="netbeans.home" unless="skip-sign-alias-password-input"> |
|
481 |
<nb-enter-password keystore="${sign.keystore}" keyalias="${sign.alias}" passwordproperty="sign.alias.password"/> |
|
482 |
</target> |
|
483 |
<target name="set-password" depends="set-password-init,set-keystore-password,set-alias-password"/> |
|
484 |
<!--create JAD--> |
|
485 |
<target name="add-configuration" unless="contains.manifest.configuration"> |
|
486 |
<nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration} |
|
487 |
</nb-output> |
|
488 |
<nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration} |
|
489 |
</nb-output> |
|
490 |
</target> |
|
491 |
<target name="add-profile" unless="contains.manifest.profile"> |
|
492 |
<nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile} |
|
493 |
</nb-output> |
|
494 |
<nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile} |
|
495 |
</nb-output> |
|
496 |
</target> |
|
497 |
<target name="create-jad" if="cldc-platform.trigger"> |
|
498 |
<fail unless="dist.jad">Must set dist.jad</fail> |
|
499 |
<mkdir dir="${build.dir}"/> |
|
500 |
<dirname file="${dist.dir}/${dist.jad}" property="dist.jad.dir"/> |
|
501 |
<mkdir dir="${dist.jad.dir}"/> |
|
502 |
<condition property="evaluated.manifest.apipermissions" value="${manifest.apipermissions}"> |
|
503 |
<not> |
|
504 |
<equals arg1="${platform.profile}" arg2="MIDP-1.0"/> |
|
505 |
</not> |
|
506 |
</condition> |
|
507 |
<condition property="evaluated.manifest.pushregistry" value="${manifest.pushregistry}"> |
|
508 |
<not> |
|
509 |
<equals arg1="${platform.profile}" arg2="MIDP-1.0"/> |
|
510 |
</not> |
|
511 |
</condition> |
|
512 |
<condition property="contains.manifest.configuration"> |
|
513 |
<contains substring="MicroEdition-Configuration: " string="${manifest.others}"/> |
|
514 |
</condition> |
|
515 |
<condition property="contains.manifest.profile"> |
|
516 |
<contains substring="MicroEdition-Profile: " string="${manifest.others}"/> |
|
517 |
</condition> |
|
518 |
<property value="" name="evaluated.manifest.apipermissions"/> |
|
519 |
<property value="" name="evaluated.manifest.pushregistry"/> |
|
520 |
<property name="manifest.jad" value=""/> |
|
521 |
<property name="manifest.manifest" value=""/> |
|
522 |
<nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad}</nb-output> |
|
523 |
<nb-output file="${manifest.build.file}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest}</nb-output> |
|
524 |
<antcall target="add-configuration" inheritall="true" inheritrefs="true"/> |
|
525 |
<antcall target="add-profile" inheritall="true" inheritrefs="true"/> |
|
526 |
<property name="manifest.available" value="true"/> |
|
527 |
</target> |
|
528 |
<!--do-extra-libs--> |
|
529 |
<target name="do-extra-libs" if="extra.classpath"> |
|
530 |
<property name="dist.lib.dir" value="${dist.dir}/lib"/> |
|
531 |
<mkdir dir="${dist.lib.dir}"/> |
|
532 |
<copy todir="${dist.lib.dir}"> |
|
533 |
<path path="${extra.classpath}"/> |
|
534 |
<flattenmapper/> |
|
535 |
</copy> |
|
536 |
</target> |
|
537 |
<!--nokiaS80-manifest--> |
|
538 |
<target name="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger"> |
|
539 |
<fail message="Main class is not set!"> |
|
540 |
<condition> |
|
541 |
<equals arg1="${main.class}" arg2="" trim="true"/> |
|
542 |
</condition> |
|
543 |
</fail> |
|
544 |
<mkdir dir="${build.dir}/j9"/> |
|
545 |
<taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/> |
|
546 |
<j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/> |
|
547 |
<copy file="${manifest.file}" tofile="${manifest.build.file}" failonerror="false"/> |
|
548 |
<property name="manifest.available" value="true"/> |
|
549 |
<loadfile property="nokia.manifest.j9" srcFile="${j9.dist}"/> |
|
550 |
</target> |
|
551 |
<target name="nokiaS80-prepare-manifest" depends="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger" unless="nokia.icon.invalid"> |
|
552 |
<pathconvert property="logo.icon.name" pathsep=" "> |
|
553 |
<path path="${nokiaS80.application.icon}"/> |
|
554 |
<chainedmapper> |
|
555 |
<flattenmapper/> |
|
556 |
<globmapper from="*" to="*"/> |
|
557 |
</chainedmapper> |
|
558 |
</pathconvert> |
|
559 |
<copy file="${nokiaS80.application.icon}" todir="${buildsystem.baton}"/> |
|
560 |
<manifest file="${manifest.build.file}" mode="update"> |
|
561 |
<attribute name="Main-Class" value="${main.class}"/> |
|
562 |
<attribute name="PproApp-Name" value="${application.name}"/> |
|
563 |
<attribute name="PproApp-Vendor" value="${application.vendor}"/> |
|
564 |
<attribute name="PproApp-Version" value="${deployment.number}"/> |
|
565 |
<attribute name="PproApp-Icon" value="${logo.icon.name}"/> |
|
566 |
<attribute name="x-ibm-pp-j9" value="${nokia.manifest.j9}"/> |
|
567 |
</manifest> |
|
568 |
</target> |
|
569 |
<target name="nokiaS80-prepare-manifest-no-icon" depends="nokiaS80-prepare-j9" if="nokia.icon.invalid"> |
|
570 |
<manifest file="${manifest.build.file}" mode="update"> |
|
571 |
<attribute name="Main-Class" value="${main.class}"/> |
|
572 |
<attribute name="PproApp-Name" value="${application.name}"/> |
|
573 |
<attribute name="PproApp-Vendor" value="${application.vendor}"/> |
|
574 |
<attribute name="PproApp-Version" value="${deployment.number}"/> |
|
575 |
<attribute name="x-ibm-pp-j9" value="${nokia.manifest.j9}"/> |
|
576 |
</manifest> |
|
577 |
</target> |
|
578 |
<target name="nokiaS80-create-manifest" depends="nokiaS80-prepare-j9,nokiaS80-prepare-manifest,nokiaS80-prepare-manifest-no-icon" if="nokiaS80-platform.trigger"/> |
|
579 |
<!--jad-jsr211-properties--> |
|
580 |
<target name="jad-jsr211-properties.check"> |
|
581 |
<condition property="jad-jsr211-properties.allowed"> |
|
582 |
<and> |
|
583 |
<isset property="cldc-platform.trigger"/> |
|
584 |
<isset property="netbeans.home"/> |
|
585 |
<isset property="is.mesdk_jsr211"/> |
|
586 |
</and> |
|
587 |
</condition> |
|
588 |
</target> |
|
589 |
<target name="jad-jsr211-properties" description="Updates JAD and manifest with JSR211 properties." depends="jad-jsr211-properties.check" if="jad-jsr211-properties.allowed"> |
|
590 |
<jadjsr211properties jadfile="${dist.dir}/${dist.jad}" manifestfile="${build.dir}/${manifest.file}"/> |
|
591 |
</target> |
|
592 |
<!--semc-build-j9--> |
|
593 |
<target name="semc-build-j9" if="semc-platform.trigger"> |
|
594 |
<epocpathsetter home="${platform.home}"/> |
|
595 |
<property name="semc.application.caps" value=""/> |
|
596 |
<mkdir dir="${platform.home}/epoc32/winscw/c/private/${semc.application.uid}"/> |
|
597 |
<mkdir dir="${build.dir}/j9"/> |
|
598 |
<fail message="Main class is not set!"> |
|
599 |
<condition> |
|
600 |
<equals arg1="${main.class}" arg2="" trim="true"/> |
|
601 |
</condition> |
|
602 |
</fail> |
|
603 |
<j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="${semc.application.uid}" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/> |
|
604 |
</target> |
|
605 |
<!--do-jar--> |
|
606 |
<target name="do-jar" if="manifest.available"> |
|
607 |
<dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/> |
|
608 |
<mkdir dir="${dist.jar.dir}"/> |
|
609 |
<property name="manifest.build.file" location="${manifest.file}"/> |
|
610 |
<jar compress="${jar.compress}" jarfile="${dist.dir}/${dist.jar}" manifest="${manifest.build.file}" manifestencoding="UTF-8"> |
|
611 |
<fileset dir="${buildsystem.baton}"/> |
|
612 |
</jar> |
|
613 |
</target> |
|
614 |
<!--do-jar-no-manifest--> |
|
615 |
<target name="do-jar-no-manifest" unless="manifest.available"> |
|
616 |
<dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/> |
|
617 |
<mkdir dir="${dist.jar.dir}"/> |
|
618 |
<jar compress="${jar.compress}" jarfile="${dist.dir}/${dist.jar}"> |
|
619 |
<fileset dir="${buildsystem.baton}"/> |
|
620 |
</jar> |
|
621 |
</target> |
|
622 |
<!--update-jad--> |
|
623 |
<target name="update-jad" if="cldc-platform.trigger"> |
|
624 |
<nb-jad jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" url="${dist.jar}" sign="${sign.enabled}" keystore="${sign.keystore}" keystorepassword="${sign.keystore.password}" alias="${sign.alias}" aliaspassword="${sign.alias.password}" encoding="UTF-8"/> |
|
625 |
</target> |
|
626 |
<target name="sign-jar" if="sign.jar.trigger"> |
|
627 |
<signjar jar="${dist.dir}/${dist.jar}" alias="${sign.alias}" keystore="${sign.keystore}" storepass="${sign.keystore.password}" keypass="${sign.alias.password}"/> |
|
628 |
</target> |
|
629 |
<!--savaje-build-jnlp--> |
|
630 |
<target name="savaje-prepare-icon" if="savaje-platform.trigger" unless="savaje.icon.invalid"> |
|
631 |
<pathconvert property="savaje.application.icon.name" pathsep=" "> |
|
632 |
<path path="${savaje.application.icon}"/> |
|
633 |
<chainedmapper> |
|
634 |
<flattenmapper/> |
|
635 |
<globmapper from="*" to="*"/> |
|
636 |
</chainedmapper> |
|
637 |
</pathconvert> |
|
638 |
<mkdir dir="${dist.dir}/lib"/> |
|
639 |
<copy tofile="${dist.dir}/lib/${savaje.application.icon.name}" file="${savaje.application.icon}" overwrite="true" failonerror="false"/> |
|
640 |
</target> |
|
641 |
<target name="savaje-build-jnlp" depends="savaje-prepare-icon" if="savaje-platform.trigger"> |
|
642 |
<mkdir dir="${build.dir}/jnlp/"/> |
|
643 |
<taskdef resource="org/netbeans/modules/j2me/cdc/project/savaje/defs.properties"> |
|
644 |
<classpath> |
|
645 |
<pathelement path="${libs.savaje-ant-utils.classpath}"/> |
|
646 |
</classpath> |
|
647 |
</taskdef> |
|
648 |
<jnlp dir="${build.dir}/jnlp/" file="bundle.jnlp" codebase="WTK_AGUI" distjar="lib/${dist.jar.name}" applicationicon="lib/${savaje.application.icon.name}" smallicon="${savaje.application.icon.small}" focusedicon="${savaje.application.icon.focused}" applicationtitle="${application.name}" applicationvendor="${application.vendor}" applicationDescription="${application.description}" applicationArgs="${application.args}" mainClass="${main.class}" debug="${savaje.bundle.debug}" debugport="${savaje.bundle.debug.port}"> |
|
649 |
<fileset dir="${dist.dir}/lib"/> |
|
650 |
</jnlp> |
|
651 |
<policy file="${build.dir}/jnlp/bundle.policy" codebase="WTK_AGUI"/> |
|
652 |
<copy tofile="${dist.dir}/lib/classes.jar" file="${dist.dir}/${dist.jar}" overwrite="true"/> |
|
653 |
<copy todir="${dist.dir}" file="${build.dir}/jnlp/bundle.jnlp" overwrite="true"/> |
|
654 |
<copy tofile="${dist.dir}/bundle.policy" file="${build.dir}/jnlp/bundle.policy" overwrite="true"/> |
|
655 |
<copy todir="${dist.dir}/lib" overwrite="true" failonerror="false"> |
|
656 |
<fileset dir="${resources.dir}"/> |
|
657 |
</copy> |
|
658 |
</target> |
|
659 |
<!--jar--> |
|
660 |
<target name="pre-jar"/> |
|
661 |
<target name="post-jar"/> |
|
662 |
<target name="jar" depends="preverify,pre-jar,set-password,create-jad,do-extra-libs,nokiaS80-create-manifest,jad-jsr211-properties,semc-build-j9,do-jar,do-jar-no-manifest,update-jad,sign-jar,savaje-build-jnlp,post-jar" description="Build jar and application descriptor."/> |
|
663 |
<!--override-jad--> |
|
664 |
<target name="override-jad" if="override.jarurl.trigger"> |
|
665 |
<property name="deployment.jarurl" value="${dist.jar}"/> |
|
666 |
<nb-jad jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" url="${deployment.jarurl}" sign="${sign.enabled}" keystore="${sign.keystore}" keystorepassword="${sign.keystore.password}" alias="${sign.alias}" aliaspassword="${sign.alias.password}" encoding="UTF-8"/> |
|
667 |
</target> |
|
668 |
<!--semc-make-sis--> |
|
669 |
<target name="-semc-sis-init" if="semc-platform.trigger" description="Init necessary properties for SEMC platform"> |
|
670 |
<property name="pprolauncher.dir" value="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}"/> |
|
671 |
</target> |
|
672 |
<target name="semc-ppro-arm" if="semc-platform.trigger" description="Builds neccessary files for semc device"> |
|
673 |
<exec executable="${platform.home}/epoc32/tools/create-ppro-app.bat" dir="${platform.home}/epoc32/tools/"> |
|
674 |
<arg value="arm"/> |
|
675 |
<arg value="${application.name}"/> |
|
676 |
<arg value="${semc.application.uid}"/> |
|
677 |
<arg value="${j9.dist}"/> |
|
678 |
<arg value="${semc.application.caps}"/> |
|
679 |
<env key="SDKDRIVE" value="${sdkdrive}"/> |
|
680 |
<env key="EPOCROOT" value="${epocroot}"/> |
|
681 |
<env key="Path" value="${epocpath}"/> |
|
682 |
</exec> |
|
683 |
</target> |
|
684 |
<target name="semc-make-sis-icon" if="semc-platform.trigger" unless="semc.icon.invalid"> |
|
685 |
<copy file="${semc.application.icon}" tofile="${pprolauncher.dir}/${semc.application.uid}.mbm" failonerror="false"/> |
|
686 |
</target> |
|
687 |
<target name="semc-make-sis" depends="semc-ppro-arm,semc-make-sis-icon" if="semc-platform.trigger" unless="no.application.uid" description="Builds SIS file for device"> |
|
688 |
<property name="dll.dir" location="dll"/> |
|
689 |
<mkdir dir="${dll.dir}"/> |
|
690 |
<copy todir="${pprolauncher.dir}"> |
|
691 |
<fileset dir="${dist.dir}"> |
|
692 |
<exclude name="javadoc/**"/> |
|
693 |
</fileset> |
|
694 |
</copy> |
|
695 |
<copy todir="${pprolauncher.dir}"> |
|
696 |
<fileset dir="${dll.dir}"> |
|
697 |
<include name="**/*.dll"/> |
|
698 |
</fileset> |
|
699 |
</copy> |
|
700 |
<copy todir="${pprolauncher.dir}" failonerror="false"> |
|
701 |
<fileset dir="${resources.dir}"/> |
|
702 |
</copy> |
|
703 |
<pkgmake workdir="${pprolauncher.dir}" id="${semc.application.uid}" appname="${application.name}" appicon="${semc.application.uid}.mbm" vendor="${application.vendor}" version="${deployment.number}" logo="${logo.image}" logoinstallonly="${logo.image.installonly}"> |
|
704 |
<fileset dir="${dist.dir}"> |
|
705 |
<exclude name="javadoc/**"/> |
|
706 |
</fileset> |
|
707 |
<fileset dir="${dll.dir}"> |
|
708 |
<include name="**/*.dll"/> |
|
709 |
</fileset> |
|
710 |
<fileset dir="${resources.dir}"/> |
|
711 |
</pkgmake> |
|
712 |
<exec executable="${platform.home}/epoc32/tools/makesis" dir="${pprolauncher.dir}"> |
|
713 |
<arg value="-d${pprolauncher.dir}"/> |
|
714 |
<arg value="PProLauncher${semc.application.uid}.pkg"/> |
|
715 |
<arg value="${application.name}.sis"/> |
|
716 |
<env key="SDKDRIVE" value="${sdkdrive}"/> |
|
717 |
<env key="EPOCROOT" value="${epocroot}"/> |
|
718 |
<env key="Path" value="${epocpath}"/> |
|
719 |
</exec> |
|
720 |
<copy todir="${dist.dir}"> |
|
721 |
<fileset dir="${pprolauncher.dir}"> |
|
722 |
<include name="**/*.SIS"/> |
|
723 |
<include name="**/*.sis"/> |
|
724 |
</fileset> |
|
725 |
</copy> |
|
726 |
</target> |
|
727 |
<target name="semc-sign-sis" if="semc-platform.trigger" depends="semc-make-sis" unless="no.certificateorkey" description="Sign SIS file"> |
|
728 |
<exec executable="${platform.home}/epoc32/tools/signsis" dir="${pprolauncher.dir}"> |
|
729 |
<arg value="-s"/> |
|
730 |
<arg value="${pprolauncher.dir}/${application.name}.sis"/> |
|
731 |
<arg value="${pprolauncher.dir}/${application.name}-SIGNED.sis"/> |
|
732 |
<arg value="${semc.certificate.path}"/> |
|
733 |
<arg value="${semc.private.key.path}"/> |
|
734 |
<arg value="${semc.private.key.password}"/> |
|
735 |
<env key="SDKDRIVE" value="${sdkdrive}"/> |
|
736 |
<env key="EPOCROOT" value="${epocroot}"/> |
|
737 |
<env key="Path" value="${epocpath}"/> |
|
738 |
</exec> |
|
739 |
<copy todir="${dist.dir}"> |
|
740 |
<fileset dir="${pprolauncher.dir}"> |
|
741 |
<include name="**/*.SIS"/> |
|
742 |
<include name="**/*.sis"/> |
|
743 |
</fileset> |
|
744 |
</copy> |
|
745 |
</target> |
|
746 |
<target name="semc-no-sign-sis" depends="semc-make-sis" if="no.certificateorkey" unless="no.application.uid" description="Prints out only info when SIS is not signed "> |
|
747 |
<echo message="Signed SIS was not created! Set up path to certificate and private key in project properties!"/> |
|
748 |
</target> |
|
749 |
<target name="-pre-semc-sis" if="semc-platform.trigger" description="Customizable target called before SIS file is built"/> |
|
750 |
<target name="semc-sis" if="semc-platform.trigger" depends="-semc-sis-init, -pre-semc-sis, semc-sign-sis,semc-no-sign-sis, -post-semc-sis" unless="no.application.uid"/> |
|
751 |
<target name="-post-semc-sis" if="semc-platform.trigger" description="Customizable target called after SIS file is built"/> |
|
752 |
<!--increment-app-version--> |
|
753 |
<target name="increment-app-version" if="app-version.autoincrement.trigger"> |
|
754 |
<propertyfile file="nbproject/private/private.properties"> |
|
755 |
<entry key="deployment.counter" type="int" operation="+" default="2" pattern="0"/> |
|
756 |
<entry key="deployment.number" value="000000${deployment.counter}"/> |
|
757 |
</propertyfile> |
|
758 |
<property name="deployment.number.pattern" value="\2\3.\5\6.\8\9"/> |
|
759 |
<replaceregexp byline="true" file="nbproject/private/private.properties" match="^deployment.number=[0-9]*(0|([1-9]))([0-9])(0|([1-9]))([0-9])(0|([1-9]))([0-9])$" replace="deployment.number=${deployment.number.pattern}"/> |
|
760 |
</target> |
|
761 |
<!--build--> |
|
762 |
<target name="pre-build"/> |
|
763 |
<target name="post-build"/> |
|
764 |
<target name="build" depends="jar,pre-build,override-jad,semc-sis,increment-app-version,post-build" description="Builds final distribution of the application."/> |
|
765 |
<!--open-netmon--> |
|
766 |
<target name="netmon.check"> |
|
767 |
<condition property="netmon.allowed"> |
|
768 |
<and> |
|
769 |
<not> |
|
770 |
<isset property="bdj-platform.trigger"/> |
|
771 |
</not> |
|
772 |
<isset property="netbeans.home"/> |
|
773 |
<isset property="is.mesdk_netmon"/> |
|
774 |
</and> |
|
775 |
</condition> |
|
776 |
</target> |
|
777 |
<target name="open-netmon" description="Open network monitor" depends="netmon.check" if="netmon.allowed"> |
|
778 |
<opennetmon device="${platform.device}"/> |
|
779 |
</target> |
|
780 |
<!--cldc-run--> |
|
781 |
<target name="cldc-run" if="cldc-platform.trigger"> |
|
782 |
<nb-run jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" jadurl="${dist.jad.url}" device="${platform.device}" platformhome="${platform.home}" platformtype="${platform.type}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.runcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/> |
|
783 |
</target> |
|
784 |
<!--semc-run-and-debug-prepare-targets--> |
|
785 |
<target name="semc-icon-assembly" if="semc-platform.trigger" unless="semc.icon.invalid"> |
|
786 |
<copy file="${semc.application.icon}" tofile="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm" failonerror="false"/> |
|
787 |
<iconassembly home="${platform.home}" uid="${semc.application.uid}" count="${application.icon.count}"/> |
|
788 |
</target> |
|
789 |
<target name="semc-ppro-emulator" if="semc-platform.trigger" description="Builds neccessary files for semc emulator"> |
|
790 |
<exec executable="${platform.home}/epoc32/tools/create-ppro-app.bat" dir="${platform.home}/epoc32/tools/"> |
|
791 |
<arg value="win32"/> |
|
792 |
<arg value="${application.name}"/> |
|
793 |
<arg value="${semc.application.uid}"/> |
|
794 |
<arg value="${j9.dist}"/> |
|
795 |
<arg value="${semc.application.caps}"/> |
|
796 |
<env key="SDKDRIVE" value="${sdkdrive}"/> |
|
797 |
<env key="EPOCROOT" value="${epocroot}"/> |
|
798 |
<env key="Path" value="${epocpath}"/> |
|
799 |
</exec> |
|
800 |
</target> |
|
801 |
<target name="semc-do-run" if="semc-platform.trigger" description="Prepare log folders, copy necessary files"> |
|
802 |
<copy todir="${platform.home}/epoc32/winscw/C/private/${semc.application.uid}"> |
|
803 |
<fileset dir="${dist.dir}"> |
|
804 |
<exclude name="javadoc/**"/> |
|
805 |
</fileset> |
|
806 |
</copy> |
|
807 |
<mkdir dir="${platform.home}/epoc32/winscw/c/logs/j9vm"/> |
|
808 |
<epocinipath file="${platform.home}/epoc32/data/epoc.ini"/> |
|
809 |
<exec executable="${platform.home}/epoc32/release/winscw/udeb/epoc.exe"> |
|
810 |
<env key="SDKDRIVE" value="${sdkdrive}"/> |
|
811 |
<env key="EPOCROOT" value="${epocroot}"/> |
|
812 |
<env key="Path" value="${epocpath}"/> |
|
813 |
</exec> |
|
814 |
</target> |
|
815 |
<!--semc-run--> |
|
816 |
<target name="semc-run" depends="semc-icon-assembly,semc-ppro-emulator,semc-do-run" if="semc-platform.trigger"/> |
|
817 |
<!--savaje-run--> |
|
818 |
<target name="savaje-run" if="savaje-platform.trigger"> |
|
819 |
<sunEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}"> |
|
820 |
<fileset dir="${dist.dir}"> |
|
821 |
<exclude name="javadoc/**"/> |
|
822 |
</fileset> |
|
823 |
</sunEmulatorExec> |
|
824 |
</target> |
|
825 |
<!--sjmc-run--> |
|
826 |
<target name="sjmc-run" if="sjmc-platform.trigger"> |
|
827 |
<taskdef name="sjmcEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.sjmc.SJMCToolkitEmulatorExecTask" classpath="${libs.sjmc-ant-utils.classpath}"/> |
|
828 |
<sjmcEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}"> |
|
829 |
<fileset dir="${dist.dir}"> |
|
830 |
<exclude name="javadoc/**"/> |
|
831 |
</fileset> |
|
832 |
</sjmcEmulatorExec> |
|
833 |
</target> |
|
834 |
<!--ojec-run--> |
|
835 |
<target name="ojec-run" if="ojec-platform.trigger"> |
|
836 |
<taskdef name="ojecEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.ojec.OJECToolkitEmulatorExecTask" classpath="${libs.ojec-ant-utils.classpath}"/> |
|
837 |
<ojecEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}"> |
|
838 |
<fileset dir="${dist.dir}"> |
|
839 |
<exclude name="javadoc/**"/> |
|
840 |
</fileset> |
|
841 |
</ojecEmulatorExec> |
|
842 |
</target> |
|
843 |
<!--nokiaS80-run--> |
|
844 |
<target name="nokiaS80-run" if="nokiaS80-platform.trigger"> |
|
845 |
<mkdir dir="${platform.home}/epoc32/wins/c/PP_Applications"/> |
|
846 |
<mkdir dir="${platform.home}/epoc32/wins/c/logs/j9vm"/> |
|
847 |
<taskdef name="nokiaexec" classname="org.netbeans.modules.j2me.cdc.project.nokiaS80.NokiaEmulatorExecTask" classpath="${libs.nokiaS80-ant-utils.classpath}"/> |
|
848 |
<nokiaexec jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" device="${platform.device}" xlet="${main.class.xlet}" applet="${main.class.applet}"> |
|
849 |
<fileset dir="${dist.dir}"> |
|
850 |
<exclude name="javadoc/**"/> |
|
851 |
</fileset> |
|
852 |
</nokiaexec> |
|
853 |
</target> |
|
854 |
<!--cdc-hi-run--> |
|
855 |
<target name="-pre-cdc-hi-run" if="cdc-hi-platform.trigger"/> |
|
856 |
<target name="-cdc-hi-run" if="cdc-hi-platform.trigger"> |
|
857 |
<fail message="Main class is not set!"> |
|
858 |
<condition> |
|
859 |
<equals arg1="${main.class}" arg2=""/> |
|
860 |
</condition> |
|
861 |
</fail> |
|
862 |
<exec executable="${platform.home}/bin/emulator"> |
|
863 |
<arg value="-cp"/> |
|
864 |
<arg value="${basedir}/${dist.dir}/${dist.jar}"/> |
|
865 |
<arg value="-Xdevice:${platform.device}"/> |
|
866 |
<arg value="${run.cmd.options}"/> |
|
867 |
<arg value="-Xmain:${main.class}"/> |
|
868 |
<arg value="${application.args}"/> |
|
869 |
</exec> |
|
870 |
</target> |
|
871 |
<target name="-post-cdc-hi-run" if="cdc-hi-platform.trigger"/> |
|
872 |
<target name="cdc-hi-run" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-run, -cdc-hi-run, -post-cdc-hi-run"/> |
|
873 |
<!--open-profiler--> |
|
874 |
<target name="profiler.check"> |
|
875 |
<condition property="profiler.allowed"> |
|
876 |
<and> |
|
877 |
<not> |
|
878 |
<isset property="bdj-platform.trigger"/> |
|
879 |
</not> |
|
880 |
<isset property="netbeans.home"/> |
|
881 |
<isset property="is.mesdk_profiler"/> |
|
882 |
</and> |
|
883 |
</condition> |
|
884 |
</target> |
|
885 |
<target name="open-profiler" description="Open profiler snapshot" depends="profiler.check" if="profiler.allowed"> |
|
886 |
<openprofiler device="${platform.device}"/> |
|
887 |
</target> |
|
888 |
<!--run--> |
|
889 |
<target name="pre-run"/> |
|
890 |
<target name="run" depends="jar,pre-run,open-netmon,cldc-run,semc-run,savaje-run,sjmc-run,ojec-run,nokiaS80-run,cdc-hi-run,open-profiler" description="Run MIDlet suite."/> |
|
891 |
<target name="run-no-build" depends="init,pre-run,open-netmon,cldc-run,semc-run,savaje-run,sjmc-run,ojec-run,nokiaS80-run,cdc-hi-run,open-profiler" description="Quick Run already built MIDlet suite."/> |
|
892 |
<!--cldc-debug--> |
|
893 |
<target name="cldc-debug" if="cldc-platform.trigger"> |
|
894 |
<parallel> |
|
895 |
<nb-run debug="true" debugsuspend="true" debugserver="true" debuggeraddressproperty="jpda.port" platformtype="${platform.type}" platformhome="${platform.home}" device="${platform.device}" jadfile="${dist.dir}/${dist.jad}" jadurl="${dist.jad.url}" jarfile="${dist.dir}/${dist.jar}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.debugcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/> |
|
896 |
<sequential> |
|
897 |
<sleep seconds="5"/> |
|
898 |
<antcall target="nbdebug"/> |
|
899 |
</sequential> |
|
900 |
</parallel> |
|
901 |
</target> |
|
902 |
<!--semc-debug--> |
|
903 |
<!--semc-build-j9-debug--> |
|
904 |
<target name="semc-build-j9-debug" if="semc-platform.trigger"> |
|
905 |
<fail message="Main class is not set!"> |
|
906 |
<condition> |
|
907 |
<equals arg1="${main.class}" arg2=""/> |
|
908 |
</condition> |
|
909 |
</fail> |
|
910 |
<j9builder jvmargs="${run.jvmargs} -Xrunjdwp:server=n,address=${jpda.port}" mainclass="${main.class}" args="${application.args}" platform="${platform.type}" home="${platform.home}" dist="${j9.dist}" id="${semc.application.uid}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/> |
|
911 |
</target> |
|
912 |
<target name="semc-debug-start" if="semc-platform.trigger"> |
|
913 |
<nbjpdastart transport="dt_socket" addressproperty="jpda.port" name="${main.class}"> |
|
914 |
<classpath> |
|
915 |
<path path="${build.classes.dir}"/> |
|
916 |
</classpath> |
|
917 |
<bootclasspath> |
|
918 |
<path path="${platform.bootclasspath}"/> |
|
919 |
</bootclasspath> |
|
920 |
</nbjpdastart> |
|
921 |
</target> |
|
922 |
<target name="semc-debug" depends="semc-debug-start,semc-build-j9-debug,semc-icon-assembly,semc-ppro-emulator,semc-do-run" if="semc-platform.trigger"/> |
|
923 |
<!--savaje-debug--> |
|
924 |
<target name="savaje-debug" if="savaje-platform.trigger"> |
|
925 |
<parallel> |
|
926 |
<sunEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port"> |
|
927 |
<fileset dir="${dist.dir}"> |
|
928 |
<exclude name="javadoc/**"/> |
|
929 |
</fileset> |
|
930 |
</sunEmulatorExec> |
|
931 |
<sequential> |
|
932 |
<sleep seconds="5"/> |
|
933 |
<antcall target="nbdebug"/> |
|
934 |
</sequential> |
|
935 |
</parallel> |
|
936 |
</target> |
|
937 |
<!--sjmc-debug--> |
|
938 |
<target name="sjmc-debug" if="sjmc-platform.trigger"> |
|
939 |
<taskdef name="sjmcEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.sjmc.SJMCToolkitEmulatorExecTask" classpath="${libs.sjmc-ant-utils.classpath}"/> |
|
940 |
<parallel> |
|
941 |
<sjmcEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port"> |
|
942 |
<fileset dir="${dist.dir}"> |
|
943 |
<exclude name="javadoc/**"/> |
|
944 |
</fileset> |
|
945 |
</sjmcEmulatorExec> |
|
946 |
<sequential> |
|
947 |
<sleep seconds="1"/> |
|
948 |
<antcall target="nbdebug"/> |
|
949 |
</sequential> |
|
950 |
</parallel> |
|
951 |
</target> |
|
952 |
<!--ojec-debug--> |
|
953 |
<target name="ojec-debug" if="ojec-platform.trigger"> |
|
954 |
<taskdef name="ojecEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.ojec.OJECToolkitEmulatorExecTask" classpath="${libs.ojec-ant-utils.classpath}"/> |
|
955 |
<parallel> |
|
956 |
<ojecEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port"> |
|
957 |
<fileset dir="${dist.dir}"> |
|
958 |
<exclude name="javadoc/**"/> |
|
959 |
</fileset> |
|
960 |
</ojecEmulatorExec> |
|
961 |
<sequential> |
|
962 |
<sleep seconds="1"/> |
|
963 |
<antcall target="nbdebug"/> |
|
964 |
</sequential> |
|
965 |
</parallel> |
|
966 |
</target> |
|
967 |
<!--cdc-hi-debug--> |
|
968 |
<target name="-pre-cdc-hi-debug" if="cdc-hi-platform.trigger"/> |
|
969 |
<target name="-cdc-hi-debug" if="cdc-hi-platform.trigger"> |
|
970 |
<taskdef name="freePortRetriever" classname="org.netbeans.modules.j2me.cdc.project.savaje.FreePortRetriever" classpath="${libs.savaje-ant-utils.classpath}"/> |
|
971 |
<freePortRetriever debuggerPortProperty="active.debug.port"/> |
|
972 |
<parallel> |
|
973 |
<exec executable="${platform.home}/bin/emulator"> |
|
974 |
<arg value="-cp"/> |
|
975 |
<arg value="${basedir}/${dist.dir}/${dist.jar}"/> |
|
976 |
<arg value="-Xdevice:${platform.device}"/> |
|
977 |
<arg value="-Xmain:${main.class}"/> |
|
978 |
<arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/> |
|
979 |
<arg value="-Xdebug"/> |
|
980 |
</exec> |
|
981 |
<sequential> |
|
982 |
<property name="debug.delay" value="500"/> |
|
983 |
<nb-mobility-debug address="${active.debug.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/> |
|
984 |
</sequential> |
|
985 |
</parallel> |
|
986 |
</target> |
|
987 |
<target name="-post-cdc-hi-debug" if="cdc-hi-platform.trigger"/> |
|
988 |
<target name="cdc-hi-debug" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-debug, -cdc-hi-debug, -post-cdc-hi-debug"/> |
|
989 |
<!--nokiaS80-debug--> |
|
990 |
<target name="nokiaS80-debug" if="nokiaS80-platform.trigger"> |
|
991 |
<taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/> |
|
992 |
<j9builder jvmargs="${run.jvmargs} -Xrunjdwp:server=n,address=${jpda.port}" mainclass="${main.class}" args="${application.args}" platform="${platform.type}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/> |
|
993 |
<mkdir dir="${platform.home}/epoc32/wins/c/logs/j9vm"/> |
|
994 |
<taskdef name="nokiaexec" classname="org.netbeans.modules.j2me.cdc.project.nokiaS80.NokiaEmulatorExecTask" classpath="${libs.nokiaS80-ant-utils.classpath}"/> |
|
995 |
<parallel> |
|
996 |
<nokiaexec debug="true" debuggeraddressproperty="jpda.port" jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" device="${platform.device}" xlet="${main.class.xlet}" applet="${main.class.applet}"> |
|
997 |
<fileset dir="${dist.dir}"> |
|
998 |
<exclude name="javadoc/**"/> |
|
999 |
</fileset> |
|
1000 |
</nokiaexec> |
|
1001 |
<sequential> |
|
1002 |
<sleep seconds="10"/> |
|
1003 |
<antcall target="nbdebug"/> |
|
1004 |
</sequential> |
|
1005 |
</parallel> |
|
1006 |
</target> |
|
1007 |
<!--debug--> |
|
1008 |
<target name="remove-timestamp"> |
|
1009 |
<delete file="$/.timestamp"/> |
|
1010 |
</target> |
|
1011 |
<target name="pre-debug"/> |
|
1012 |
<target name="debug" description="Debug project." depends="clean,jar,remove-timestamp,pre-debug,cldc-debug,semc-debug,savaje-debug,sjmc-debug,ojec-debug,cdc-hi-debug,nokiaS80-debug"/> |
|
1013 |
<target name="nbdebug" description="Start NetBeans debugger" if="netbeans.home"> |
|
1014 |
<property name="debug.delay" value="5000"/> |
|
1015 |
<nb-mobility-debug address="${jpda.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/> |
|
1016 |
</target> |
|
1017 |
<target name="debug-run-base" depends="cldc-debug-run,cdc-hi-debug-run"/> |
|
1018 |
<target name="-pre-cldc-debug-run" if="cldc-platform.trigger"/> |
|
1019 |
<target name="-cldc-debug-run" depends="init,jar" if="cldc-platform.trigger"> |
|
1020 |
<echo> Starting emulator with port number ${active.debug.port} </echo> |
|
1021 |
<exec executable="${platform.home}/bin/emulator"> |
|
1022 |
<arg value="-Xdescriptor:${basedir}/${dist.dir}/${dist.jad}"/> |
|
1023 |
<arg value="-Xdevice:${platform.device}"/> |
|
1024 |
<arg value="-Xdebug"/> |
|
1025 |
<arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/> |
|
1026 |
</exec> |
|
1027 |
</target> |
|
1028 |
<target name="-post-cldc-debug-run" if="cldc-platform.trigger"/> |
|
1029 |
<target name="cldc-debug-run" if="cldc-platform.trigger" depends="-pre-cldc-debug-run, -cldc-debug-run, -post-cldc-debug-run"/> |
|
1030 |
<target name="-pre-cdc-hi-debug-run" if="cdc-hi-platform.trigger"/> |
|
1031 |
<target name="-cdc-hi-debug-run" depends="init,jar" if="cdc-hi-platform.trigger"> |
|
1032 |
<fail message="Main class is not set!"> |
|
1033 |
<condition> |
|
1034 |
<equals arg1="${main.class}" arg2=""/> |
|
1035 |
</condition> |
|
1036 |
</fail> |
|
1037 |
<echo> Starting emulator with port number ${active.debug.port} </echo> |
|
1038 |
<exec executable="${platform.home}/bin/emulator"> |
|
1039 |
<arg value="-cp"/> |
|
1040 |
<arg value="${basedir}/${dist.dir}/${dist.jar}"/> |
|
1041 |
<arg value="-Xdevice:${platform.device}"/> |
|
1042 |
<arg value="-Xmain:${main.class}"/> |
|
1043 |
<arg value="-Xdebug"/> |
|
1044 |
<arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/> |
|
1045 |
</exec> |
|
1046 |
</target> |
|
1047 |
<target name="-post-cdc-hi-debug-run" if="cdc-hi-platform.trigger"/> |
|
1048 |
<target name="cdc-hi-debug-run" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-debug-run, -cdc-hi-debug-run, -post-cdc-hi-debug-run"/> |
|
1049 |
<!--javadoc--> |
|
1050 |
<target name="browse-javadoc" if="netbeans.home" unless="no.javadoc.preview"> |
|
1051 |
<nbbrowse file="${dist.javadoc.dir}/index.html"/> |
|
1052 |
</target> |
|
1053 |
<target name="javadoc" depends="preprocess"> |
|
1054 |
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> |
|
1055 |
<mkdir dir="${dist.javadoc.dir}"/> |
|
1056 |
<javadoc source="${javac.source}" destdir="${dist.javadoc.dir}" bootclasspath="${platform.bootclasspath}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" encoding="${javac.encoding}" docencoding="${javac.encoding}" charset="${javac.encoding}"> |
|
1057 |
<classpath> |
|
1058 |
<path path="${libs.classpath}"/> |
|
1059 |
</classpath> |
|
1060 |
<sourcepath> |
|
1061 |
<pathelement location="${buildsystem.baton}"/> |
|
1062 |
</sourcepath> |
|
1063 |
</javadoc> |
|
1064 |
<antcall target="browse-javadoc"/> |
|
1065 |
</target> |
|
1066 |
<!--clean and build--> |
|
1067 |
<target name="rebuild" depends="clean,build" description="Rebuild the application."/> |
|
1068 |
<target name="clean-timestamp"> |
|
1069 |
<delete file="${build.dir}/.timestamp"/> |
|
1070 |
</target> |
|
1071 |
<target name="clean-preprocessed"> |
|
1072 |
<delete dir="${preprocessed.dir}"/> |
|
1073 |
</target> |
|
1074 |
<target name="clean-classes"> |
|
1075 |
<delete dir="${build.classes.dir}"/> |
|
1076 |
</target> |
|
1077 |
<target name="clean-obfuscated"> |
|
1078 |
<delete file="${obfuscator.srcjar}"/> |
|
1079 |
<delete file="${obfuscator.destjar}"/> |
|
1080 |
<delete dir="${obfuscated.classes.dir}"/> |
|
1081 |
</target> |
|
1082 |
<target name="clean-preverified"> |
|
1083 |
<delete dir="${preverify.sources.dir}"/> |
|
1084 |
<delete dir="${preverify.classes.dir}"/> |
|
1085 |
</target> |
|
1086 |
<target name="clean-manifest" if="manifest.build.file"> |
|
1087 |
<delete file="${manifest.build.file}"/> |
|
1088 |
</target> |
|
1089 |
<target name="clean-jar"> |
|
1090 |
<delete file="${dist.dir}/${dist.jar}"/> |
|
1091 |
</target> |
|
1092 |
<target name="clean-jad"> |
|
1093 |
<delete file="${dist.dir}/${dist.jad}"/> |
|
1094 |
</target> |
|
1095 |
<target name="clean-javadoc"> |
|
1096 |
<delete dir="${dist.javadoc.dir}"/> |
|
1097 |
</target> |
|
1098 |
<target name="clean-j9" if="j9.dist"> |
|
1099 |
<delete file="${j9.dist}"/> |
|
1100 |
</target> |
|
1101 |
<target name="clean-semc" if="semc-platform.trigger"> |
|
1102 |
<delete dir="${dist.dir}" includes="*.sis,*.SIS"/> |
|
1103 |
<delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/win32/PProLauncher${semc.application.uid}"/> |
|
1104 |
<delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}"/> |
|
1105 |
<delete file="${platform.home}/epoc32/release/winscw/udeb/PProLauncher${semc.application.uid}.exe"/> |
|
1106 |
<delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/PProLauncher${semc.application.uid}.rsc"/> |
|
1107 |
<delete file="${platform.home}/epoc32/release/winscw/udeb/z/private/10003a3f/apps/PProLauncher${semc.application.uid}_reg.rsc"/> |
|
1108 |
<delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/PProLauncher${semc.application.uid}_loc.R01"/> |
|
1109 |
<delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm"/> |
|
1110 |
<delete file="${platform.home}/epoc32/data/Z/private/10003a3f/apps/PProLauncher${semc.application.uid}_reg.rsc"/> |
|
1111 |
<delete file="${platform.home}/epoc32/data/Z/Resource/Apps/PProLauncher${semc.application.uid}.rsc"/> |
|
1112 |
<delete file="${platform.home}/epoc32/data/Z/Resource/Apps/PProLauncher${semc.application.uid}_loc.R01"/> |
|
1113 |
<delete dir="${platform.home}/epoc32/winscw/C/private/${semc.application.uid}"/> |
|
1114 |
</target> |
|
1115 |
<target name="clean-savaje" if="savaje-platform.trigger"> |
|
1116 |
<delete dir="${build.dir}/jnlp"/> |
|
1117 |
<delete file="${dist.dir}/bundle.jnlp"/> |
|
1118 |
<delete file="${dist.dir}/bundle.policy"/> |
|
1119 |
<delete dir="${dist.dir}/lib"/> |
|
1120 |
</target> |
|
1121 |
<target name="clean-sjmc" if="sjmc-platform.trigger"> |
|
1122 |
<delete dir="${dist.dir}/lib"/> |
|
1123 |
</target> |
|
1124 |
<target name="clean-ojec" if="ojec-platform.trigger"> |
|
1125 |
<delete dir="${dist.dir}/lib"/> |
|
1126 |
</target> |
|
1127 |
<!--clean--> |
|
1128 |
<target name="pre-clean"/> |
|
1129 |
<target name="post-clean"/> |
|
1130 |
<target name="-clean-configuration"> |
|
1131 |
<condition property="can.clean.config.completely"> |
|
1132 |
<not> |
|
1133 |
<equals arg1="${config.active}" arg2="" trim="true"/> |
|
1134 |
</not> |
|
1135 |
</condition> |
|
1136 |
</target> |
|
1137 |
<target name="-clean-configuration-root" depends="-clean-configuration" if="can.clean.config.completely"> |
|
1138 |
<delete dir="${build.dir}"/> |
|
1139 |
<delete dir="${dist.dir}"/> |
|
1140 |
<available property="dist.dir.exists" file="dist"/> |
|
1141 |
<condition property="dist.dir.empty"> |
|
1142 |
<and> |
|
1143 |
<isset property="dist.dir.exists"/> |
|
1144 |
<resourcecount count="0"> |
|
1145 |
<fileset dir="dist"/> |
|
1146 |
</resourcecount> |
|
1147 |
</and> |
|
1148 |
</condition> |
|
1149 |
</target> |
|
1150 |
<target name="-clean-default-configuration-root" depends="-clean-configuration" unless="can.clean.config.completely"> |
|
1151 |
<tempfile deleteonexit="true" property="tmp.exclude" prefix="convert"/> |
|
1152 |
<echo file="${tmp.exclude}">${all.configurations}</echo> |
|
1153 |
<replaceregexp file="${tmp.exclude}" match="(.)(,|$)" replace="\1/**\2" flags="g"/> |
|
1154 |
<loadfile srcfile="${tmp.exclude}" property="exclude.pattern"/> |
|
1155 |
<delete file="${tmp.exclude}"/> |
|
1156 |
<delete quiet="true"> |
|
1157 |
<fileset dir="${build.dir}" excludes="${exclude.pattern}"/> |
|
1158 |
</delete> |
|
1159 |
<delete quiet="true"> |
|
1160 |
<fileset dir="${dist.dir}" excludes="${exclude.pattern}"/> |
|
1161 |
</delete> |
|
1162 |
<delete quiet="true"> |
|
1163 |
<fileset dir="${dist.dir}/lib"/> |
|
1164 |
</delete> |
|
1165 |
<available property="dist.dir.exists" file="dist"/> |
|
1166 |
<condition property="dist.dir.empty"> |
|
1167 |
<and> |
|
1168 |
<isset property="dist.dir.exists"/> |
|
1169 |
<resourcecount count="0"> |
|
1170 |
<fileset dir="dist"/> |
|
1171 |
</resourcecount> |
|
1172 |
</and> |
|
1173 |
</condition> |
|
1174 |
</target> |
|
1175 |
<target name="-clean-completely" if="dist.dir.empty"> |
|
1176 |
<delete dir="build" quiet="true"/> |
|
1177 |
<delete dir="dist" quiet="true"/> |
|
1178 |
</target> |
|
1179 |
<target name="do-clean" depends="pre-clean,clean-timestamp,clean-preprocessed,clean-classes,clean-obfuscated,clean-preverified,clean-manifest,clean-jar,clean-jad,clean-javadoc,clean-j9,clean-semc,clean-savaje,clean-sjmc,clean-ojec,-clean-default-configuration-root,-clean-configuration-root,-clean-completely,post-clean"/> |
|
1180 |
<target name="clean" depends="conditional-clean" if="no.clean.before.build" description="Clean build products."> |
|
1181 |
<antcall target="do-clean" inheritall="true" inheritrefs="true"/> |
|
1182 |
</target> |
|
1183 |
<!--deploy--> |
|
1184 |
<target name="pre-deploy"/> |
|
1185 |
<target name="do-deploy" if="deployment.method" unless="skip.deployment"> |
|
1186 |
<fail unless="deployment.scriptfile">Property deployment.${deployment.method}.scriptfile not set. The property should point to an Ant script providing ${deployment.method} deployment.</fail> |
|
1187 |
<ant antfile="${deployment.scriptfile}" inheritall="true" inheritrefs="true"/> |
|
1188 |
<antcall target="post-deploy" inheritall="true" inheritrefs="true"/> |
|
1189 |
</target> |
|
1190 |
<target name="post-deploy"/> |
|
1191 |
<target name="deploy" depends="build,pre-deploy,do-deploy,post-deploy"/> |
|
1192 |
<!--for-all-configs targets--> |
|
1193 |
<target name="for-all-configs" depends="load-properties"> |
|
1194 |
<fail unless="libs.ant-contrib.classpath">Classpath to Ant Contrib library (libs.ant-contrib.classpath property) is not set.</fail> |
|
1195 |
<property name="selected.configurations" value="${all.configurations}"/> |
|
1196 |
<taskdef resource="net/sf/antcontrib/antlib.xml"> |
|
1197 |
<classpath> |
|
1198 |
<pathelement path="${libs.ant-contrib.classpath}"/> |
|
1199 |
</classpath> |
|
1200 |
</taskdef> |
|
1201 |
<for list="${selected.configurations}" param="cfg" keepgoing="true" trim="true"> |
|
1202 |
<sequential> |
|
1203 |
<echo>Active project configuration: @{cfg}</echo> |
|
1204 |
<antcall target="${target.to.call}" inheritall="false" inheritrefs="false"> |
|
1205 |
<param name="config.active" value="@{cfg}"/> |
|
1206 |
<propertyset> |
|
1207 |
<propertyref name="no.deps"/> |
|
1208 |
</propertyset> |
|
1209 |
</antcall> |
|
1210 |
<property name="no.deps" value="true"/> |
|
1211 |
</sequential> |
|
1212 |
</for> |
|
1213 |
</target> |
|
1214 |
<target name="jar-all"> |
|
1215 |
<antcall target="for-all-configs"> |
|
1216 |
<param name="target.to.call" value="jar"/> |
|
1217 |
</antcall> |
|
1218 |
</target> |
|
1219 |
<target name="build-all"> |
|
1220 |
<antcall target="for-all-configs"> |
|
1221 |
<param name="target.to.call" value="build"/> |
|
1222 |
</antcall> |
|
1223 |
</target> |
|
1224 |
<target name="javadoc-all"> |
|
1225 |
<antcall target="for-all-configs"> |
|
1226 |
<param name="target.to.call" value="javadoc"/> |
|
1227 |
</antcall> |
|
1228 |
</target> |
|
1229 |
<target name="deploy-all"> |
|
1230 |
<antcall target="for-all-configs"> |
|
1231 |
<param name="target.to.call" value="deploy"/> |
|
1232 |
</antcall> |
|
1233 |
</target> |
|
1234 |
<target name="rebuild-all"> |
|
1235 |
<antcall target="for-all-configs"> |
|
1236 |
<param name="target.to.call" value="rebuild"/> |
|
1237 |
</antcall> |
|
1238 |
</target> |
|
1239 |
<target name="clean-all"> |
|
1240 |
<property file="nbproject/project.properties"/> |
|
1241 |
<fail unless="build.root.dir">Property build.root.dir is not set. By default its value should be \"build\".</fail> |
|
1242 |
<fail unless="dist.root.dir">Property dist.root.dir is not set. By default its value should be \"dist\".</fail> |
|
1243 |
<antcall target="for-all-configs"> |
|
1244 |
<param name="target.to.call" value="clean"/> |
|
1245 |
</antcall> |
|
1246 |
</target> |
|
1247 |
</project> |