6 default="install"> |
6 default="install"> |
7 <property file="common.properties" /> |
7 <property file="common.properties" /> |
8 <property file="linux.properties" /> |
8 <property file="linux.properties" /> |
9 <property file="windows.properties" /> |
9 <property file="windows.properties" /> |
10 <property environment="env" /> |
10 <property environment="env" /> |
11 <property name="cone.src.dir" |
11 <property name="cone.src.dir" value="source/cone"/> |
12 value="source/cone" /> |
12 <property name="cone.src.dir_abs" location="${cone.src.dir}"/> |
13 <property name="cone.src.dir_abs" |
13 |
14 location="${cone.src.dir}" /> |
|
15 <!-- |
14 <!-- |
16 Build properties, intended to be overridden from the command line |
15 Build properties, intended to be overridden from the command line |
17 where necessary. |
16 where necessary. |
18 |
17 |
19 E.g. ant install -Dbuild.build_path=C:/my/install/path -Dbuild.plugin_package=symbian |
18 E.g. ant install -Dbuild.build_path=C:/my/install/path -Dbuild.plugin_package=symbian |
63 location="${build.bat_export_path}" /> |
62 location="${build.bat_export_path}" /> |
64 <property name="build.cone_pack_path_abs" |
63 <property name="build.cone_pack_path_abs" |
65 location="${build.cone_pack_path}" /> |
64 location="${build.cone_pack_path}" /> |
66 <property name="build.bat_pack_path_abs" |
65 <property name="build.bat_pack_path_abs" |
67 location="${build.bat_pack_path}" /> |
66 location="${build.bat_pack_path}" /> |
|
67 |
68 <!-- |
68 <!-- |
69 <property name="os.linux.name" value="Linux" /> |
69 <property name="os.linux.name" value="Linux" /> |
70 <property name="os.windows" value="Windows 2003, Windows XP, Windows vista" /> |
70 <property name="os.windows" value="Windows 2003, Windows XP, Windows vista" /> |
71 --> |
71 --> |
72 <property name="pythonversion" |
72 <property name="pythonversion" |
149 <target name="clean"> |
149 <target name="clean"> |
150 <delete dir="${build.cone_install_path_abs}" /> |
150 <delete dir="${build.cone_install_path_abs}" /> |
151 <delete dir="${build.bat_export_path_abs}" /> |
151 <delete dir="${build.bat_export_path_abs}" /> |
152 <delete dir="${build.cone_pack_path_abs}" /> |
152 <delete dir="${build.cone_pack_path_abs}" /> |
153 <delete dir="${build.bat_pack_path_abs}" /> |
153 <delete dir="${build.bat_pack_path_abs}" /> |
|
154 |
154 </target> |
155 </target> |
155 <target name="svnversion"> |
156 <target name="svnversion"> |
156 <!-- |
157 <!-- |
157 Call the revision update script without the revision argument |
158 Call the revision update script without the revision argument |
158 so that the revision is reverted back to "" (this should make |
159 so that the revision is reverted back to "" (this should make |
306 executables to run the installation (e.g. python2.5 and python2.6) |
307 executables to run the installation (e.g. python2.5 and python2.6) |
307 --> |
308 --> |
308 <target name="_install-cone-dualversion-linux" |
309 <target name="_install-cone-dualversion-linux" |
309 depends="svninitupdate" |
310 depends="svninitupdate" |
310 if="os_is_linux"> |
311 if="os_is_linux"> |
|
312 <echo>Adding execution rights to source/cone</echo> |
|
313 <chmod dir="source" file="cone" perm="ugo+rx"/> |
311 <echo>Installing with first Python version (executable=${build.dualversioninstall.executable1})</echo> |
314 <echo>Installing with first Python version (executable=${build.dualversioninstall.executable1})</echo> |
312 <exec executable="python" |
315 <exec executable="python" |
313 dir="${build_scripts_dir}" |
316 dir="${build_scripts_dir}" |
314 failonerror="true"> |
317 failonerror="true"> |
315 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}" --python-executable="${build.dualversioninstall.executable1}"' /> |
318 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}" --python-executable="${build.dualversioninstall.executable1}"' /> |
324 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
327 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
325 <exec executable="python"> |
328 <exec executable="python"> |
326 <arg value="update_svn_revision.py" /> |
329 <arg value="update_svn_revision.py" /> |
327 <arg value="source/cone/__init__.py" /> |
330 <arg value="source/cone/__init__.py" /> |
328 </exec> |
331 </exec> |
|
332 |
329 </target> |
333 </target> |
330 <target name="install-cone-dualversion" |
334 <target name="install-cone-dualversion" |
331 depends="_install-cone-dualversion-win,_install-cone-dualversion-linux" /> |
335 depends="_install-cone-dualversion-win,_install-cone-dualversion-linux" /> |
332 <target name="develop-cone"> |
336 <target name="develop-cone"> |
333 <!-- Run the install script in build-scripts/ --> |
337 <!-- Run the install script in build-scripts/ --> |
340 <!-- |
344 <!-- |
341 Internal pack target for packing the ConE installation. |
345 Internal pack target for packing the ConE installation. |
342 The actual dependencies to cone-install and cone-install-dualversion are |
346 The actual dependencies to cone-install and cone-install-dualversion are |
343 specified in the actual targets below. |
347 specified in the actual targets below. |
344 --> |
348 --> |
345 <target name="_pack"> |
349 <target name="_pack" depends="_pack_linux,_pack_windows"/> |
|
350 |
|
351 <target name="_pack_linux" if="os_is_linux"> |
346 <!-- |
352 <!-- |
347 <echo>$${build.cone_pack_path}: ${build.cone_pack_path}</echo> |
353 <echo>$${build.cone_pack_path}: ${build.cone_pack_path}</echo> |
348 <echo>$${build.cone_pack_path_abs}: ${build.cone_pack_path_abs}</echo> |
354 <echo>$${build.cone_pack_path_abs}: ${build.cone_pack_path_abs}</echo> |
349 --> |
355 --> |
350 <echo message="Creating zip file" /> |
356 <echo message="Creating zip file" /> |
354 pattern="yyyyMMddHHmmss" /> |
360 pattern="yyyyMMddHHmmss" /> |
355 </tstamp> |
361 </tstamp> |
356 <zip destfile="${build.cone_pack_path_abs}/ConE-${common.version}-${build.plugin_package}-${lastbuild}-${svn.version}.zip"> |
362 <zip destfile="${build.cone_pack_path_abs}/ConE-${common.version}-${build.plugin_package}-${lastbuild}-${svn.version}.zip"> |
357 <fileset dir="${build.cone_install_path_abs}" /> |
363 <fileset dir="${build.cone_install_path_abs}" /> |
358 </zip> |
364 </zip> |
359 </target> |
365 <exec executable="zip" |
360 <!-- Actual pack targets --> |
366 dir="${build.cone_pack_path_abs}"> |
|
367 <arg value="-j" /> |
|
368 <arg value="ConE-${common.version}-${build.plugin_package}-${lastbuild}-${svn.version}.zip" /> |
|
369 <arg value="${build.cone_install_path_abs}/cone" /> |
|
370 </exec> |
|
371 </target> |
|
372 |
|
373 <target name="_pack_windows" unless="os_is_linux"> |
|
374 <!-- |
|
375 <echo>$${build.cone_pack_path}: ${build.cone_pack_path}</echo> |
|
376 <echo>$${build.cone_pack_path_abs}: ${build.cone_pack_path_abs}</echo> |
|
377 --> |
|
378 <echo message="Creating zip file" /> |
|
379 <mkdir dir="${build.cone_pack_path_abs}" /> |
|
380 <tstamp> |
|
381 <format property="lastbuild" |
|
382 pattern="yyyyMMddHHmmss" /> |
|
383 </tstamp> |
|
384 <zip destfile="${build.cone_pack_path_abs}/ConE-${common.version}-${build.plugin_package}-${lastbuild}-${svn.version}.zip"> |
|
385 <fileset dir="${build.cone_install_path_abs}" /> |
|
386 </zip> |
|
387 </target> |
|
388 |
|
389 <!-- Actual pack targets --> |
361 <target name="pack" |
390 <target name="pack" |
362 depends="install-cone"> |
391 depends="install-cone"> |
363 <antcall target="_pack" /> |
392 <antcall target="_pack" /> |
364 </target> |
393 </target> |
365 <target name="pack-dualversion" |
394 <target name="pack-dualversion" |
439 path="${cone_python_path}" /> |
468 path="${cone_python_path}" /> |
440 <arg value="${cmd_switch}" /> |
469 <arg value="${cmd_switch}" /> |
441 <arg value="python runtests.py" /> |
470 <arg value="python runtests.py" /> |
442 </exec> |
471 </exec> |
443 </target> |
472 </target> |
444 <target name="zip-src" |
473 <target name="zip-src" depends="svnversion, clean"> |
445 depends="svnversion, clean"> |
474 |
446 <mkdir dir="${build.cone_pack_path_abs}" /> |
475 <mkdir dir="${build.cone_pack_path_abs}"/> |
447 <tstamp> |
476 |
448 <format property="lastbuild" |
477 <tstamp> |
449 pattern="yyyyMMdd-HHmmss" /> |
478 <format property="lastbuild" pattern="yyyyMMdd-HHmmss" /> |
450 </tstamp> |
479 </tstamp> |
451 <property name="zip_abs" |
480 <property name="zip_abs" location="${build.cone_pack_path_abs}/cone-src-${common.version}-${lastbuild}-r${svn.version}.zip" /> |
452 location="${build.cone_pack_path_abs}/cone-src-${common.version}-${lastbuild}-r${svn.version}.zip" /> |
481 |
453 <zip destfile="${zip_abs}"> |
482 <zip destfile="${zip_abs}"> |
454 <zipfileset dir="${cone.src.dir_abs}"> |
483 <zipfileset dir="${cone.src.dir_abs}"> |
455 <exclude name="**/tests/**" /> |
484 <exclude name="**/tests/**"/> |
456 <exclude name="**/*.pyc" /> |
485 <exclude name="**/*.pyc"/> |
457 <exclude name="**/runtests.py" /> |
486 <exclude name="**/runtests.py"/> |
458 <exclude name="test.xml" /> |
487 <exclude name="test.xml"/> |
459 <exclude name="nose_unittests.cfg" /> |
488 <exclude name="nose_unittests.cfg"/> |
460 <exclude name="all.doxygen" /> |
489 <exclude name="all.doxygen"/> |
461 </zipfileset> |
490 |
462 <zipfileset file="RELEASE.TXT" /> |
491 </zipfileset> |
463 </zip> |
492 <zipfileset file="RELEASE.TXT"/> |
464 <echo>Zip package located at ${zip_abs}.</echo> |
493 |
465 </target> |
494 </zip> |
|
495 |
|
496 <echo>Zip package located at ${zip_abs}.</echo> |
|
497 </target> |
466 <import file="generatedoc-build.xml" /> |
498 <import file="generatedoc-build.xml" /> |
467 </project> |
499 </project> |