|
1 <project name="com.symbian.sdb" default="all" basedir="."> |
|
2 |
|
3 |
|
4 <!--properties...--> |
|
5 <!-- The epoc.build property specifies the temp location for build files |
|
6 In the TCL build this will have been specified as a unique location |
|
7 and so this value will be ignored. |
|
8 NOTE: Do not use this directly - use build.dir instead --> |
|
9 <property name="epoc.build" value="${basedir}" /> |
|
10 |
|
11 <!-- The tools.rel property specifies the releease location for binaries |
|
12 In the TCL build this will have been specified as a unique location |
|
13 and so this value will be ignored --> |
|
14 <property name="tools.rel" value="${basedir}\rel" /> |
|
15 |
|
16 <!-- Add a new level of indirection to the build to location so we can |
|
17 ensure that we can delete the directory as we don't have permission |
|
18 to delect epoc.build --> |
|
19 <property name="build.dir" value="${epoc.build}\target"/> |
|
20 |
|
21 <property name="lib.dir" location="${basedir}/lib"/> |
|
22 |
|
23 <property name="shared.lib.dir" location="${tools.rel}/java/lib"/> |
|
24 |
|
25 <!-- These directories for monty --> |
|
26 <property name="monty.dir" value="${basedir}/monty" /> |
|
27 <property name="monty.output" value="${monty.dir}/output" /> |
|
28 <property name="monty.working.dir" value="${monty.dir}/testdir" /> |
|
29 |
|
30 <!-- source code directories for src and test code --> |
|
31 <property name="src.dir" value="${basedir}\src" /> |
|
32 <property name="test.src.dir" value="${basedir}\tests" /> |
|
33 |
|
34 <!-- This directory will store junit reports--> |
|
35 <property name="junit.reports.dir" value="${build.dir}\reports\junit"/> |
|
36 |
|
37 <!-- destination directories for built classes --> |
|
38 <property name="app.build.dir" value="${build.dir}\application-classes" /> |
|
39 <property name="test.build.dir" value="${build.dir}\test-classes" /> |
|
40 <property name="test.temp.dir" value="${build.dir}\test-temp" /> |
|
41 |
|
42 <!-- directory in which we construt releaseable distros --> |
|
43 <property name="dist.win.dir" value="${build.dir}\dist_win" /> |
|
44 <property name="dist.lin.dir" value="${build.dir}\dist_lin" /> |
|
45 |
|
46 <property name="deploy.location" value="\sdb-creator" /> |
|
47 <property name="deploy.location_lib" value="${deploy.location}\lib" /> |
|
48 <property name="deploy.location_ced" value="${deploy.location}\ced" /> |
|
49 <property name="deploy.location_config" value="${deploy.location}\config" /> |
|
50 |
|
51 <!-- log dir |
|
52 Note due to the command structure in SDB Creator we can't overwrite the |
|
53 default log dir for tests so it will still be written to the source tree--> |
|
54 |
|
55 <property name="log.dir" value="${basedir}\logs" /> |
|
56 |
|
57 <!-- Location for ced binaries --> |
|
58 <property name="ced.dir.win" location="${dist.win.dir}/sdb-creator/ced/" /> |
|
59 <property name="ced.dir.lin" location="${dist.lin.dir}/sdb-creator/ced/" /> |
|
60 |
|
61 <property name="ced.dev.dir" location="${basedir}/ced/" /> |
|
62 |
|
63 <property name="cedbin.dir" location="${basedir}\cedbin\" /> |
|
64 |
|
65 <property name="jar" value="${dist.win.dir}/sdb-creator/lib\sdb.jar" /> |
|
66 |
|
67 <property name="mainifest.common.path" value="dbmsjdbc.jar serializer.jar log4j-1.2.14.jar antlr-3.1.jar commons-cli-2.0-SNAPSHOT.jar google-collect-snapshot-20080820.jar parser.jar asm-3.1.jar commons-io-1.4.jar commons-logging.jar spring.jar xalan.jar xercesImpl.jar xml-apis.jar tools_vcard4j.jar commons-codec-1.3.jar" /> |
|
68 |
|
69 <!-- Load emulators configuration - used for emulator testing --> |
|
70 <property file="${user.home}/userConfig.properties" /> |
|
71 <property file="testdata/projectConfig.properties" /> |
|
72 |
|
73 <!-- List of variables to replace when configuring SDB --> |
|
74 <filterset id="project.variables"> |
|
75 <filter token="EMULATOR_CONFIG_XML_LOCATION" value="${test.emulatorsConfigurationXMLLocation}" /> |
|
76 </filterset> |
|
77 |
|
78 <!-- Distribution Zip --> |
|
79 <property name="sdb.zip" location="${tools.rel}\sdb.zip"/> |
|
80 <property name="sdb.tar" location="${tools.rel}\sdb.tar"/> |
|
81 <property name="sdb.tar.gz" location="${tools.rel}\sdb.tar.gz"/> |
|
82 <property name="sdb_instr.zip" location="${jars.instr.dir}\sdb_instr.zip"/> |
|
83 |
|
84 <!-- Compiler settings --> |
|
85 <property name="javacFailOnError" value="true" /> |
|
86 <property name="javacDebugInfo" value="on" /> |
|
87 <property name="javacVerbose" value="false" /> |
|
88 <property name="logExtension" value=".log" /> |
|
89 <property name="compilerArg" value="" /> |
|
90 <property name="javacSource" value="1.5" /> |
|
91 <property name="javacTarget" value="1.5" /> |
|
92 |
|
93 <path id="path_bootclasspath"> |
|
94 <fileset dir="${java.home}/lib"> |
|
95 <include name="*.jar" /> |
|
96 </fileset> |
|
97 </path> |
|
98 |
|
99 <condition property="isWindows"> |
|
100 <os family="windows" /> |
|
101 </condition> |
|
102 |
|
103 <condition property="isLinux"> |
|
104 <os family="unix" /> |
|
105 </condition> |
|
106 |
|
107 <path id="sdb_lib_classpath"> |
|
108 <fileset dir="${lib.dir}"> |
|
109 <include name="*.jar" /> |
|
110 <exclude name="sqlitejdbc-v053-native.jar" if="isWindows"/> |
|
111 <exclude name="sqlitejdbc-v033.jar" if="isLinux"/> |
|
112 </fileset> |
|
113 <fileset dir="${shared.lib.dir}"> |
|
114 <include name="*.jar"/> |
|
115 </fileset> |
|
116 </path> |
|
117 |
|
118 <property name="bootclasspath" refid="path_bootclasspath" /> |
|
119 <property name="bundleJavacSource" value="${javacSource}" /> |
|
120 <property name="bundleJavacTarget" value="${javacTarget}" /> |
|
121 <property name="bundleBootClasspath" value="${bootclasspath}" /> |
|
122 |
|
123 <!-- all does not include emu tests to maintain BaC with existing build configs --> |
|
124 <target name="all" depends="clean, copy-properties-files, panopticode.metrics, build.src, pmd, create.distros.seperate, monty" /> |
|
125 |
|
126 <target name="short.build" depends="clean, build.src, build.test, test.unit" /> |
|
127 |
|
128 <target name="build.release" depends="clean, build.src, build.test, create.distros.seperate" /> |
|
129 <target name="build.release.win" depends="clean, build.src, build.test, create.distros.win" /> |
|
130 <target name="build.release.lin" depends="clean, build.src, build.test, create.distros.lin" /> |
|
131 |
|
132 <target name="build.and.all.test" depends="clean, build.src, build.test, test.all" /> |
|
133 <target name="build.and.unit.test" depends="clean, build.src, build.test, test.unit" /> |
|
134 <target name="build.and.integration.test" depends="clean, build.src, build.test, test.int" /> |
|
135 <target name="build.and.emulator.test" depends="clean, build.src, build.test, test.emulator" /> |
|
136 |
|
137 <!-- ================================= |
|
138 target: clean |
|
139 |
|
140 - This target is mandatory for the Symbian buid process. |
|
141 - Please clean up all generated files during the build proccess. |
|
142 - Used by "abld clean" and "abld reallyclean". |
|
143 ================================= --> |
|
144 <target name="clean" description="Cleans the build using abld clean"> |
|
145 |
|
146 <delete dir="${build.dir}" /> |
|
147 <delete failonerror="false" file="${sdb.zip}" /> |
|
148 <delete failonerror="false" file="${sdb.tar}" /> |
|
149 <delete failonerror="false" file="${sdb.tar.gz}" /> |
|
150 <delete failonerror="false" dir="${monty.output}" /> |
|
151 <delete dir="${log.dir}" /> |
|
152 </target> |
|
153 |
|
154 <target name="panopticode.metrics"> |
|
155 <ant antfile="${basedir}/panopticode-build.xml" target="metrics" /> |
|
156 </target> |
|
157 |
|
158 <!-- This builds all the source code (exc test code) and puts it into |
|
159 ${build.dir} using the compiler settings defined above --> |
|
160 <target name="build.src" depends="if_unix, copy-properties-files" description="Build source code (excluding tests)"> |
|
161 |
|
162 <mkdir dir="${app.build.dir}" /> |
|
163 <mkdir dir="${tools.rel}/java/lib" /> |
|
164 <!-- compile the source code --> |
|
165 <javac destdir="${app.build.dir}" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}"> |
|
166 <classpath refid="sdb_lib_classpath" /> |
|
167 <src path="${src.dir}" /> |
|
168 <compilerarg value="-Xlint:unchecked" /> |
|
169 </javac> |
|
170 |
|
171 <copy todir="${app.build.dir}"> |
|
172 <fileset dir="${basedir}/src/"> |
|
173 </fileset> |
|
174 </copy> |
|
175 </target> |
|
176 |
|
177 <!-- Builds the test code into ${test.build.dir} --> |
|
178 <target name="build.test"> |
|
179 |
|
180 <mkdir dir="${test.build.dir}" /> |
|
181 <mkdir dir="${test.temp.dir}" /> |
|
182 |
|
183 <!-- compile the test code --> |
|
184 <javac destdir="${test.build.dir}" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}"> |
|
185 <classpath> |
|
186 <path refid="sdb_lib_classpath" /> |
|
187 <pathelement location="${app.build.dir}" /> |
|
188 </classpath> |
|
189 <src path="${test.src.dir}" /> |
|
190 </javac> |
|
191 <copy todir="${test.build.dir}" file="${basedir}/tests/applicationContext-integration-tests.xml" /> |
|
192 <copy todir="${test.build.dir}" file="${basedir}/tests/project.properties" /> |
|
193 </target> |
|
194 |
|
195 <target name="run.unit.tests" if="unit.test"> |
|
196 <junit printsummary="withOutAndErr" fork="yes" forkmode="perBatch" haltonfailure="no" failureproperty="junit.failed"> |
|
197 <classpath> |
|
198 <path refid="test.classpath" /> |
|
199 <path refid="sdb_lib_classpath" /> |
|
200 </classpath> |
|
201 <sysproperty key="tempdir" value="${test.temp.dir}" /> |
|
202 <formatter type="xml" /> |
|
203 <formatter type="plain" /> |
|
204 <batchtest todir="${junit.reports.dir}"> |
|
205 <fileset dir="${test.src.dir}"> |
|
206 <include name="**/*Test.java" /> |
|
207 <exclude name="**/*IntegrationTest*.java" /> |
|
208 <exclude name="**/*EmulatorTest*.java" /> |
|
209 <exclude name="**/DbmsTest.java" /> |
|
210 <exclude name="**/FieldContainerTest.java" /> |
|
211 <exclude name="**/TemplateManagerTest.java" /> |
|
212 <exclude name="**/TemplateMapperTest.java" /> |
|
213 <exclude name="**/CEDProcessFactoryTest.java" /> |
|
214 </fileset> |
|
215 </batchtest> |
|
216 <jvmarg value="-javaagent:${basedir}/lib/jmockit.jar" /> |
|
217 </junit> |
|
218 |
|
219 <junit printsummary="withOutAndErr" fork="yes" haltonfailure="no" failureproperty="junit.failed"> |
|
220 <classpath> |
|
221 <path refid="test.classpath" /> |
|
222 <path refid="sdb_lib_classpath" /> |
|
223 </classpath> |
|
224 <sysproperty key="tempdir" value="${test.temp.dir}" /> |
|
225 <formatter type="xml" /> |
|
226 <formatter type="plain" /> |
|
227 <batchtest todir="${junit.reports.dir}"> |
|
228 <fileset dir="${test.src.dir}"> |
|
229 <include name="**/DbmsTest.java" /> |
|
230 <include name="**/FieldContainerTest.java" /> |
|
231 <include name="**/TemplateManagerTest.java" /> |
|
232 <include name="**/TemplateMapperTest.java" /> |
|
233 <include name="**/CEDProcessFactoryTest.java" /> |
|
234 </fileset> |
|
235 </batchtest> |
|
236 <jvmarg value="-javaagent:${basedir}/lib/jmockit.jar" /> |
|
237 </junit> |
|
238 |
|
239 <antcall target="create.junit.report" /> |
|
240 <fail message="Unit test failure" if="junit.failed" /> |
|
241 |
|
242 </target> |
|
243 |
|
244 |
|
245 <target name="run.integration.tests" if="integration.test"> |
|
246 <junit printsummary="withOutAndErr" fork="yes" haltonfailure="no" failureproperty="junit.failed"> |
|
247 <classpath> |
|
248 <path refid="test.classpath" /> |
|
249 <path refid="sdb_lib_classpath" /> |
|
250 </classpath> |
|
251 <sysproperty key="tempdir" value="${test.temp.dir}" /> |
|
252 <formatter type="xml" /> |
|
253 <formatter type="plain" /> |
|
254 <batchtest todir="${junit.reports.dir}"> |
|
255 <fileset dir="${test.src.dir}"> |
|
256 <include name="**/*IntegrationTest.java" /> |
|
257 </fileset> |
|
258 </batchtest> |
|
259 |
|
260 <jvmarg value="-javaagent:${basedir}/lib/jmockit.jar" /> |
|
261 </junit> |
|
262 |
|
263 <property name="report.required" value="${junit.failed}" /> |
|
264 <antcall target="create.reports" /> |
|
265 |
|
266 <fail message="Integration test failure" if="junit.failed" /> |
|
267 </target> |
|
268 |
|
269 <target name="run.emulator.tests" if="emulator.test"> |
|
270 <junit printsummary="withOutAndErr" fork="yes" haltonfailure="no" failureproperty="junit.failed"> |
|
271 <classpath> |
|
272 <path refid="test.classpath" /> |
|
273 <path refid="sdb_lib_classpath" /> |
|
274 </classpath> |
|
275 <sysproperty key="tempdir" value="${test.temp.dir}" /> |
|
276 <formatter type="xml" /> |
|
277 <formatter type="plain" /> |
|
278 <batchtest todir="${junit.reports.dir}"> |
|
279 <fileset dir="${test.src.dir}"> |
|
280 <include name="**/*EmulatorTest.java" /> |
|
281 </fileset> |
|
282 </batchtest> |
|
283 |
|
284 <jvmarg value="-javaagent:${basedir}/lib/jmockit.jar" /> |
|
285 </junit> |
|
286 |
|
287 <property name="report.required" value="${junit.failed}" /> |
|
288 <antcall target="create.reports" /> |
|
289 |
|
290 <fail message="Emulator test failure" if="junit.failed" /> |
|
291 </target> |
|
292 |
|
293 <target name="test.all"> |
|
294 <property name="unit.test" value="true" /> |
|
295 <property name="integration.test" value="true" /> |
|
296 <property name="emulator.test" value="true" /> |
|
297 <antcall target="run.tests" /> |
|
298 </target> |
|
299 |
|
300 <target name="test.exEmu"> |
|
301 <property name="unit.test" value="true" /> |
|
302 <property name="integration.test" value="true" /> |
|
303 <antcall target="run.tests" /> |
|
304 </target> |
|
305 |
|
306 <target name="test.unit"> |
|
307 <property name="unit.test" value="true" /> |
|
308 <antcall target="run.tests" /> |
|
309 </target> |
|
310 |
|
311 <target name="test.int"> |
|
312 <property name="integration.test" value="true" /> |
|
313 <antcall target="run.tests" /> |
|
314 </target> |
|
315 |
|
316 <target name="test.emulator"> |
|
317 <property name="emulator.test" value="true" /> |
|
318 <antcall target="run.tests" /> |
|
319 </target> |
|
320 |
|
321 <!-- runs the junit tests and generates the reports --> |
|
322 <target name="run.tests"> |
|
323 |
|
324 <path id="test.classpath"> |
|
325 <pathelement path="${test.build.dir}" /> |
|
326 <pathelement path="${app.build.dir}" /> |
|
327 </path> |
|
328 |
|
329 <mkdir dir="${junit.reports.dir}" /> |
|
330 |
|
331 <antcall target="run.unit.tests" inheritrefs="true" inheritall="true" /> |
|
332 |
|
333 <antcall target="run.integration.tests" inheritrefs="true" inheritall="true" /> |
|
334 |
|
335 <antcall target="run.emulator.tests" inheritrefs="true" inheritall="true" /> |
|
336 |
|
337 <property name="report.required" value="true" /> |
|
338 <antcall target="create.reports" /> |
|
339 |
|
340 </target> |
|
341 |
|
342 <path id="pmd.classpath"> |
|
343 <pathelement location="${build}" /> |
|
344 <fileset dir="${basedir}/lib/"> |
|
345 <include name="*.jar" /> |
|
346 </fileset> |
|
347 </path> |
|
348 |
|
349 <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath" /> |
|
350 |
|
351 <target name="pmd"> |
|
352 <mkdir dir="${reports.dir}" /> |
|
353 <pmd rulesetfiles="rulesets/favorites.xml" minimumPriority="2" failOnRuleViolation="true"> |
|
354 <formatter type="net.sourceforge.pmd.renderers.HTMLRenderer" toFile="${reports.dir}\pmd_report.html" /> |
|
355 <fileset dir="${src.dir}"> |
|
356 <include name="**/*.java" /> |
|
357 </fileset> |
|
358 |
|
359 </pmd> |
|
360 </target> |
|
361 |
|
362 <target name="publish.monty.results" if="publish.monty.results"> |
|
363 <copy todir="c:\CruiseControl_2_8\TMS_Results\SDB_WIP" failonerror="false" flatten="true"> |
|
364 <fileset dir="${basedir}/monty/output/"> |
|
365 <include name="**/*.csv" /> |
|
366 </fileset> |
|
367 </copy> |
|
368 </target> |
|
369 |
|
370 <target name="create.reports" if="report.required"> |
|
371 <antcall target="create.junit.report" /> |
|
372 </target> |
|
373 |
|
374 <target name="create.junit.report"> |
|
375 <junitreport todir="${junit.reports.dir}"> |
|
376 <fileset dir="${junit.reports.dir}"> |
|
377 <include name="TEST-*.xml" /> |
|
378 </fileset> |
|
379 <report format="frames" todir="${junit.reports.dir}" /> |
|
380 </junitreport> |
|
381 </target> |
|
382 |
|
383 <target name="create.jar"> |
|
384 <jar destfile="${jar.location}" basedir="${app.build.dir}"> |
|
385 <manifest> |
|
386 <attribute name="Main-Class" value="com.symbian.sdb.Application" /> |
|
387 <attribute name="Class-Path" value="${jar.classpath.list}" /> |
|
388 </manifest> |
|
389 </jar> |
|
390 </target> |
|
391 |
|
392 <!-- Generates the jar of all built classes (exc test code) into |
|
393 ${dist.win.dir}/SDB.jar --> |
|
394 <target name="create.distros.seperate"> |
|
395 <antcall target="create.distros.win" /> |
|
396 <antcall target="create.distros.lin" /> |
|
397 </target> |
|
398 |
|
399 <target name="create.distros.combinedinzip"> |
|
400 <antcall target="create.distros.lin" /> |
|
401 <antcall target="create.distros.win" /> |
|
402 </target> |
|
403 |
|
404 <target name="create.distros.win"> |
|
405 <!-- Create the windows jar --> |
|
406 <mkdir dir="${dist.win.dir}${deploy.location_lib}" /> |
|
407 <antcall target="create.jar"> |
|
408 <param name="jar.location" value="${dist.win.dir}${deploy.location_lib}\sdb.jar" /> |
|
409 <param name="jar.classpath.list" value="${mainifest.common.path} sqlitejdbc-v033.jar" /> |
|
410 </antcall> |
|
411 |
|
412 <filelist id="windows" dir="${lib.dir}"> |
|
413 <!--common--> |
|
414 <file name="serializer.jar" /> |
|
415 <file name="log4j-1.2.14.jar" /> |
|
416 <file name="dbmsjdbc.jar" /> |
|
417 <file name="commons-cli-2.0-SNAPSHOT.jar" /> |
|
418 <file name="antlr-3.1.jar" /> |
|
419 <file name="parser.jar" /> |
|
420 <file name="asm-3.1.jar " /> |
|
421 <file name="commons-io-1.4.jar" /> |
|
422 <file name="commons-logging.jar" /> |
|
423 <file name="commons-codec-1.3.jar" /> |
|
424 <file name="spring.jar" /> |
|
425 <file name="xalan.jar" /> |
|
426 <file name="xercesImpl.jar" /> |
|
427 <file name="xml-apis.jar" /> |
|
428 <file name="tools_vcard4j.jar" /> |
|
429 <file name="google-collect-snapshot-20080820.jar" /> |
|
430 <!--specific--> |
|
431 <file name="sqlitejdbc-v033.jar"/> |
|
432 <file name="sqlitejdbc.dll"/> |
|
433 <file name="libdbmsjdbc.dll"/> |
|
434 <file name="libsymport.dll"/> |
|
435 </filelist> |
|
436 |
|
437 <filelist id="commonlibs" dir="${shared.lib.dir}"> |
|
438 <!--common--> |
|
439 <file name="log4j-1.2.14.jar"/> |
|
440 <file name="commons-cli-2.0-SNAPSHOT.jar"/> |
|
441 <file name="xalan.jar"/> |
|
442 <file name="xercesImpl.jar"/> |
|
443 |
|
444 <!--specific--> |
|
445 <file name="sqlitejdbc-v033.jar"/> |
|
446 </filelist> |
|
447 |
|
448 <antcall target="setup.dist"> |
|
449 <param name="dist.dir" value="${dist.win.dir}"/> |
|
450 <param name="properties.file" value="${basedir}/config/sdb.rel.properties"/> |
|
451 <reference refid="windows" torefid="libs"/> |
|
452 <reference refid="commonlibs" torefid="commonlibs"/> |
|
453 </antcall> |
|
454 <copy todir="${dist.win.dir}" file="${basedir}/sdb.bat"/> |
|
455 |
|
456 <!-- if the linux build has happened bundle the tar --> |
|
457 <available file="${sdb.tar.gz}" type="file" property="gz.present"/> |
|
458 <antcall target="copy.tar.gz"/> |
|
459 |
|
460 <antcall target="zip.release"/> |
|
461 |
|
462 </target> |
|
463 |
|
464 <target name="copy.tar.gz" if="gz.present"> |
|
465 <copy failonerror="false" todir="${dist.win.dir}/sdb-creator/linux" file="${sdb.tar.gz}" /> |
|
466 </target> |
|
467 |
|
468 <target name="create.distros.lin"> |
|
469 |
|
470 <!-- Create the linux jar --> |
|
471 <mkdir dir="${dist.lin.dir}${deploy.location_lib}" /> |
|
472 <antcall target="create.jar"> |
|
473 <param name="jar.location" value="${dist.lin.dir}${deploy.location_lib}\sdb.jar" /> |
|
474 <param name="jar.classpath.list" value="${mainifest.common.path} sqlitejdbc-v053-native.jar" /> |
|
475 </antcall> |
|
476 |
|
477 <filelist id="linux" dir="${lib.dir}"> |
|
478 <!--common--> |
|
479 <file name="serializer.jar" /> |
|
480 <file name="dbmsjdbc.jar" /> |
|
481 <file name="antlr-3.1.jar" /> |
|
482 <file name="parser.jar" /> |
|
483 <file name="asm-3.1.jar " /> |
|
484 <file name="commons-io-1.4.jar" /> |
|
485 <file name="commons-logging.jar" /> |
|
486 <file name="commons-codec-1.3.jar" /> |
|
487 <file name="spring.jar" /> |
|
488 <file name="xalan.jar" /> |
|
489 <file name="xercesImpl.jar" /> |
|
490 <file name="xml-apis.jar" /> |
|
491 <file name="tools_vcard4j.jar" /> |
|
492 <file name="google-collect-snapshot-20080820.jar" /> |
|
493 <file name="commons-cli-2.0-SNAPSHOT.jar" /> |
|
494 <file name="log4j-1.2.14.jar" /> |
|
495 <!--specific--> |
|
496 <file name="libsqlite3.so" /> |
|
497 <file name="libsqlitejdbc.so" /> |
|
498 <file name="libdbmsjdbc.so" /> |
|
499 <file name="libsymport.so" /> |
|
500 </filelist> |
|
501 |
|
502 <filelist id="commonlibs" dir="${shared.lib.dir}"> |
|
503 <!--common--> |
|
504 <file name="log4j-1.2.14.jar"/> |
|
505 <file name="commons-cli-2.0-SNAPSHOT.jar"/> |
|
506 <file name="xalan.jar"/> |
|
507 <file name="xercesImpl.jar"/> |
|
508 |
|
509 <!--specific--> |
|
510 <file name="sqlitejdbc-v053-native.jar"/> |
|
511 </filelist> |
|
512 |
|
513 |
|
514 <antcall target="setup.dist"> |
|
515 <param name="dist.dir" value="${dist.lin.dir}" /> |
|
516 <param name="properties.file" value="${basedir}/config/sdb.linux.properties" /> |
|
517 <reference refid="linux" torefid="libs" /> |
|
518 <reference refid="commonlibs" torefid="commonlibs"/> |
|
519 </antcall> |
|
520 <copy todir="${dist.lin.dir}" file="${basedir}/sdb" /> |
|
521 |
|
522 <antcall target="gzip.release" /> |
|
523 </target> |
|
524 |
|
525 <target name="setup.dist"> |
|
526 <mkdir dir="${dist.dir}${deploy.location_lib}"/> |
|
527 |
|
528 <mkdir dir="${dist.dir}${deploy.location_lib}"/> |
|
529 <mkdir dir="${dist.dir}${deploy.location_config}"/> |
|
530 |
|
531 <copy todir="${dist.dir}${deploy.location_lib}" > |
|
532 <filelist refid="libs"/> |
|
533 <filelist refid="commonlibs"/> |
|
534 </copy> |
|
535 |
|
536 <copy tofile="${dist.dir}/sdb-creator/config/sdb.properties" file="${properties.file}" /> |
|
537 |
|
538 <copy todir="${dist.dir}${deploy.location_config}"> |
|
539 <fileset dir="${basedir}/config/"> |
|
540 <exclude name="*.properties" /> |
|
541 </fileset> |
|
542 </copy> |
|
543 </target> |
|
544 |
|
545 <!-- remove dependency on deploying CED in win depends="deploy.ced.win" --> |
|
546 <target name="zip.release"> |
|
547 <mkdir dir="${tools.rel}" /> |
|
548 <zip destfile="${sdb.zip}" update="true"> |
|
549 <zipfileset dir="${dist.win.dir}" /> |
|
550 </zip> |
|
551 </target> |
|
552 |
|
553 <!-- remove dependency on deploying CED in linux depends="deploy.ced.lin" --> |
|
554 <target name="gzip.release"> |
|
555 <mkdir dir="${tools.rel}" /> |
|
556 <tar destfile="${sdb.tar}"> |
|
557 <tarfileset dir="${dist.lin.dir}"> |
|
558 <exclude name="sdb" /> |
|
559 <exclude name="**/*.jar" /> |
|
560 <exclude name="**/*.exe" /> |
|
561 </tarfileset> |
|
562 <tarfileset dir="${dist.lin.dir}" filemode="750"> |
|
563 <include name="**/*.jar" /> |
|
564 <include name="sdb" /> |
|
565 <include name="**/*.exe" /> |
|
566 </tarfileset> |
|
567 </tar> |
|
568 <gzip destfile="${sdb.tar.gz}" src="${sdb.tar}" /> |
|
569 <delete file="${sdb.tar}" /> |
|
570 </target> |
|
571 |
|
572 <!-- ================================= |
|
573 target: what |
|
574 |
|
575 - This target is mandatory for the Symbian buid process. |
|
576 - Please echo all created files, sperated by whitespace. |
|
577 - Used by "abld build -what". |
|
578 ================================= --> |
|
579 <target name="what" description="Prints out all releasables"> |
|
580 <available file="${sdb.zip}" type="file" property="zip.present" /> |
|
581 <antcall target="print.zip" /> |
|
582 <available file="${sdb.tar.gz}" type="file" property="gz.present" /> |
|
583 <antcall target="print.tar.gz" /> |
|
584 </target> |
|
585 |
|
586 <target name="print.tar.gz" if="gz.present"> |
|
587 <echo>${sdb.tar.gz}</echo> |
|
588 </target> |
|
589 |
|
590 <target name="print.zip" if="zip.present"> |
|
591 <echo>${sdb.zip}</echo> |
|
592 </target> |
|
593 |
|
594 <target name="deploy.ced.dev"> |
|
595 <delete dir="${ced.dev.dir}" /> |
|
596 |
|
597 <mkdir dir="${ced.dev.dir}\win\93\" /> |
|
598 <mkdir dir="${ced.dev.dir}\win\94\" /> |
|
599 <mkdir dir="${ced.dev.dir}\win\95\" /> |
|
600 <unzip src="${cedbin.dir}\win\93.zip" dest="${ced.dev.dir}\win\" /> |
|
601 <unzip src="${cedbin.dir}\win\94.zip" dest="${ced.dev.dir}\win\" /> |
|
602 <unzip src="${cedbin.dir}\win\95.zip" dest="${ced.dev.dir}\win\" /> |
|
603 |
|
604 <mkdir dir="${ced.dev.dir}\lin\93\" /> |
|
605 <mkdir dir="${ced.dev.dir}\lin\94\" /> |
|
606 <mkdir dir="${ced.dev.dir}\lin\95\" /> |
|
607 <unzip src="${cedbin.dir}\lin\93.zip" dest="${ced.dev.dir}\lin\" /> |
|
608 <unzip src="${cedbin.dir}\lin\94.zip" dest="${ced.dev.dir}\lin\" /> |
|
609 <unzip src="${cedbin.dir}\lin\95.zip" dest="${ced.dev.dir}\lin\" /> |
|
610 </target> |
|
611 |
|
612 <!-- =================================================================== --> |
|
613 <!-- The "copy-properties-files" target copies template properties and --> |
|
614 <!-- sets some envinroment specyfic values in it eg. emulator settings --> |
|
615 <!-- =================================================================== --> |
|
616 <target name="copy-properties-files" description="Copy property files"> |
|
617 <echo message="Generating properties" /> |
|
618 <copy tofile="tests/project.properties" file="templates/project_template.properties" overwrite="true"> |
|
619 <filterset refid="project.variables" /> |
|
620 </copy> |
|
621 </target> |
|
622 |
|
623 <target name="monty" depends="build.release.win"> |
|
624 <mkdir dir="${monty.working.dir}" /> |
|
625 <unzip src="${sdb.zip}" dest="${monty.working.dir}" /> |
|
626 <mkdir dir="${monty.output}" /> |
|
627 <exec executable="python.exe" resultproperty="monty.error.code" searchpath="true" dir="${monty.working.dir}"> |
|
628 <arg value="${basedir}/monty/monty.py"/> |
|
629 <arg value="-e"/> |
|
630 <arg value="${basedir}/monty/test_suite/sdb_smoke_test.csv"/> |
|
631 <arg value="-l"/> |
|
632 <arg value="${basedir}/monty/output"/> |
|
633 <arg value="-t"/> |
|
634 <arg value="${basedir}/monty"/> |
|
635 </exec> |
|
636 |
|
637 <fail message="Monty test failure. Exit code ${monty.error.code}"> |
|
638 <condition> |
|
639 <isfailure code="${monty.error.code}" /> |
|
640 </condition> |
|
641 </fail> |
|
642 </target> |
|
643 |
|
644 <target name="if_windows" if="isWindows"> |
|
645 <echo message="OS detected: Windows"/> |
|
646 </target> |
|
647 |
|
648 <target name="if_unix" if="isLinux"> |
|
649 <property name="sw.root" value="/opt/flag" /> |
|
650 <echo message="OS detected: Unix"/> |
|
651 <echo message="Make sure you have LD_LIBRARY_PATH envinroment variable set to ${basedir}/lib"/> |
|
652 </target> |
|
653 |
|
654 </project> |