build.xml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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="zip-templates"/>
  14. <ant dir="sdk" target="build"/>
  15. </target>
  16. <target name="build-engine" description="Builds the engine only">
  17. <ant dir="engine" target="clean"/>
  18. <ant dir="engine" target="jar"/>
  19. </target>
  20. <target name="clean" description="Clean all build products">
  21. <ant dir="engine" target="clean"/>
  22. <ant dir="sdk" target="clean"/>
  23. </target>
  24. <target name="run" description="Runs the SDK" depends="build">
  25. <ant dir="sdk" target="run"/>
  26. </target>
  27. <target name="zip" description="Builds the complete SDK and packs it as a ZIP file" depends="build">
  28. <ant dir="sdk" target="build-zip"/>
  29. <move file="sdk/dist/jmonkeyplatform.zip" tofile="./jME3-SDK.zip"/>
  30. </target>
  31. <target name="update-platform" description="Updates the base platform to the latest available build" depends="-remove-platform,-check-platform"/>
  32. <target name="hudson-nightly" depends="update-platform-hudson">
  33. <ant dir="engine" target="deploy-hudson"/>
  34. <ant dir="engine" target="hudson-update-sdk"/>
  35. <ant dir="sdk" target="hudson-nightly"/>
  36. </target>
  37. <target name="hudson-stable" depends="update-platform-hudson">
  38. <ant dir="engine" target="dist"/>
  39. <ant dir="engine" target="hudson-update-sdk"/>
  40. <ant dir="sdk" target="hudson-nightly"/>
  41. </target>
  42. <target name="update-platform-hudson" description="Updates the base platform to the latest available build" depends="-remove-platform">
  43. <copy file="/var/www/com/platform/base/alpha/platform-base.zip" todir="./"/>
  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" depends="-check-platform-present" unless="platform.present">
  49. <echo message="Downloading base platform, this only has to be done once."/>
  50. <get src="http://jmonkeyengine.googlecode.com/files/platform-base.zip" dest="./" skipexisting="true"/>
  51. <!--get src="http://jmonkeyengine.com/platform/base/alpha/platform-base.zip" dest="./" skipexisting="true"/-->
  52. <unzip src="platform-base.zip" dest="./"/>
  53. <antcall target="-update-sdk-platform-config"/>
  54. <delete file="platform-base.zip"/>
  55. </target>
  56. <target name="-check-platform-present">
  57. <available file="netbeans" property="platform.present"/>
  58. </target>
  59. <target name="-remove-platform">
  60. <delete dir="netbeans" failonerror="false"/>
  61. </target>
  62. <target name="-update-sdk-platform-config">
  63. <property name="nbplatform.dir" location="netbeans"/>
  64. <mkdir dir="sdk/nbproject/private"/>
  65. <echo file="sdk/nbproject/private/platform-private.properties"
  66. message="nbplatform.default.netbeans.dest.dir=${nbplatform.dir}&#xD;&#xA;"/>
  67. <echo file="sdk/nbproject/private/platform-private.properties"
  68. message="nbplatform.default.harness.dir=${nbplatform.dir}${file.separator}harness&#xD;&#xA;" append="true"/>
  69. <replace file="sdk/nbproject/private/platform-private.properties" token="\" value="\\"/>
  70. </target>
  71. <target name="update-sdk-platform-config" depends="-update-sdk-platform-config"/>
  72. </project>