build.xml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  3. <!-- for some information on what you could do (e.g. targets to override). -->
  4. <!-- If you delete this file and reopen the project it will be recreated. -->
  5. <project name="com.jme3.gde.docs" default="netbeans" basedir=".">
  6. <description>Builds, tests, and runs the project com.jme3.gde.docs.</description>
  7. <import file="nbproject/build-impl.xml"/>
  8. <path id="ant-import.classpath">
  9. <fileset dir="../ant-lib/" includes="*.jar"/>
  10. </path>
  11. <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="ant-import.classpath"/>
  12. <taskdef resource="com/jme/ant/ant-jme.properties" classpath="../ant-lib/ant-jme.jar"/>
  13. <!--target name="init" depends="basic-init,files-init,build-init,-javac-init,update-help-sets">
  14. </target-->
  15. <target name="update-help-sets" description="Updates the help pages from the wiki">
  16. <property file="src/com/jme3/gde/docs/wiki-download-index.properties"/>
  17. <echo file="src/${javahelp_path}/wiki-map.xml"
  18. message='&lt;!DOCTYPE map PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 2.0//EN" "http://java.sun.com/products/javahelp/map_2_0.dtd">&#13;&lt;map version="2.0">&#13;'/>
  19. <echo file="src/${javahelp_path}/wiki-map.xml" append="true"
  20. message='&lt;!-- DO NOT EDIT THIS FILE, EDIT wiki-download-index.properties INSTEAD! -->&#13;'/>
  21. <foreach target="-update-single-helpset" list="${wiki_pages}" delimiter="," param="page_name" inheritall="true"/>
  22. <echo file="src/${javahelp_path}/wiki-map.xml" append="true"
  23. message='&lt;/map>&#13;'/>
  24. </target>
  25. <target name="-update-single-helpset">
  26. <!-- prepare variables -->
  27. <propertyregex property="page_path"
  28. input="${page_name}"
  29. regexp=":"
  30. replace="/"
  31. global="true"/>
  32. <propertyregex property="page_classpath"
  33. input="${page_name}"
  34. regexp=":"
  35. replace="."
  36. global="true"/>
  37. <!-- download html file -->
  38. <touch file="src/${javahelp_path}/${page_path}.html" mkdirs="true"/>
  39. <get src="${wiki_url}${page_name}?do=export_xhtmlbody"
  40. dest="src/${javahelp_path}/${page_path}.html"/>
  41. <!-- download images from page (custom task) -->
  42. <loadwikiimages file="src/${javahelp_path}/${page_path}.html"
  43. target="src/${javahelp_path}/"
  44. host="http://wiki.jmonkeyengine.org"/>
  45. <!-- fix links in wiki (custom task) -->
  46. <fixwikilinks file="src/${javahelp_path}/${page_path}.html"
  47. helppath="${javahelp_path}/"/>
  48. <!-- append link to online wiki page -->
  49. <echo file="src/${javahelp_path}/${page_path}.html" append="true"
  50. message='&lt;p>&lt;em>&lt;a href="${wiki_url}${page_name}?do=export_xhtmlbody">view online version&lt;/a>&lt;/em>&lt;/p>'/>
  51. <!-- add entry to map -->
  52. <echo file="src/${javahelp_path}/wiki-map.xml" append="true"
  53. message='&lt;mapID target="${page_classpath}" url="${page_path}.html"/>&#13;'/>
  54. </target>
  55. </project>