build.xml 3.8 KB

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