build.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="jME3-SDK" default="default" basedir=".">
  3. <description>Builds, tests, and runs the jMonkeyEngine3 SDK.</description>
  4. <fail message="Please build using Ant 1.7.1 or higher.">
  5. <condition>
  6. <not>
  7. <antversion atleast="1.7.1"/>
  8. </not>
  9. </condition>
  10. </fail>
  11. <target name="build" description="Builds the complete SDK" depends="-check-platform, -update-sdk-platform-config">
  12. <ant dir="engine" target="update-sdk"/>
  13. <ant dir="sdk" target="build"/>
  14. </target>
  15. <target name="build-engine" description="Builds the engine only">
  16. <ant dir="engine" target="clean"/>
  17. <ant dir="engine" target="jar"/>
  18. </target>
  19. <target name="clean" description="Clean all build products">
  20. <ant dir="engine" target="clean"/>
  21. <ant dir="sdk" target="clean"/>
  22. </target>
  23. <target name="run" description="Runs the SDK" depends="build">
  24. <ant dir="sdk" target="run"/>
  25. </target>
  26. <target name="zip" description="Builds the complete SDK and packs it as a ZIP file" depends="build">
  27. <ant dir="sdk" target="build-zip"/>
  28. <move file="sdk/dist/jmonkeyplatform.zip" tofile="./jME3-SDK.zip"/>
  29. </target>
  30. <target name="update-platform" description="Updates the base platform to the latest available build" depends="-remove-platform,-check-platform"/>
  31. <target name="hudson-nightly" depends="update-platform">
  32. <ant dir="engine" target="deploy-hudson"/>
  33. <ant dir="engine" target="hudson-update-sdk"/>
  34. <ant dir="sdk" target="hudson-nightly"/>
  35. </target>
  36. <target name="hudson-stable" depends="update-platform">
  37. <ant dir="engine" target="dist"/>
  38. <ant dir="engine" target="hudson-update-sdk"/>
  39. <ant dir="sdk" target="hudson-nightly"/>
  40. </target>
  41. <target name="-check-platform" depends="-check-platform-present" unless="platform.present">
  42. <echo message="Downloading base platform, this only has to be done once."/>
  43. <get src="http://jmonkeyengine.com/platform/base/alpha/platform-base.zip" dest="./" skipexisting="true"/>
  44. <unzip src="platform-base.zip" dest="./"/>
  45. <antcall target="-update-sdk-platform-config"/>
  46. <delete file="platform-base.zip"/>
  47. </target>
  48. <target name="-check-platform-present">
  49. <available file="netbeans" property="platform.present"/>
  50. </target>
  51. <target name="-remove-platform">
  52. <delete dir="netbeans" failonerror="false"/>
  53. </target>
  54. <target name="-update-sdk-platform-config">
  55. <property name="nbplatform.dir" location="netbeans"/>
  56. <mkdir dir="sdk/nbproject/private"/>
  57. <echo file="sdk/nbproject/private/platform-private.properties"
  58. message="nbplatform.default.netbeans.dest.dir=${nbplatform.dir}&#xD;&#xA;"/>
  59. <echo file="sdk/nbproject/private/platform-private.properties"
  60. message="nbplatform.default.harness.dir=${nbplatform.dir}${file.separator}harness&#xD;&#xA;" append="true"/>
  61. <replace file="sdk/nbproject/private/platform-private.properties" token="\" value="\\"/>
  62. </target>
  63. <target name="update-sdk-platform-config" depends="-update-sdk-platform-config"/>
  64. </project>