build.xml 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 GDE, copies over engine libraries." depends="-check-platform, -update-sdk-platform-config">
  13. <ant dir="engine" target="update-sdk"/>
  14. <ant dir="sdk" target="build"/>
  15. </target>
  16. <target name="build-engine" description="Builds the engine libraries only">
  17. <ant dir="engine" target="clean"/>
  18. <ant dir="engine" target="dist"/>
  19. </target>
  20. <target name="clean" description="Clean all build products" depends="-check-platform, -update-sdk-platform-config">
  21. <ant dir="engine" target="clean"/>
  22. <ant dir="sdk" target="clean"/>
  23. </target>
  24. <target name="run" description="Runs the SDK" depends="-check-platform, -update-sdk-platform-config">
  25. <ant dir="engine" target="update-sdk"/>
  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. <propertyfile file="sdk/nbproject/project.properties"/>
  30. <move file="sdk/dist/${app.name}.zip" tofile="./jMonkeyEngine-GDE-${app.version}.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="-check-platform" depends="-check-platform-present" unless="platform.present">
  34. <property file="sdk/nbproject/project.properties"/>
  35. <echo message="Downloading base platform, this only has to be done once."/>
  36. <!--get src="http://jmonkeyengine.googlecode.com/files/platform-base.zip" dest="./" skipexisting="true"/-->
  37. <get src="http://jmonkeyengine.com/platform/base/alpha/platform-base.zip" dest="./" skipexisting="false"/>
  38. <!--get src="http://jmonkeyengine.com/updates/${app.version}/platform-base.zip" dest="./" skipexisting="false"/-->
  39. <unzip src="platform-base.zip" dest="./"/>
  40. <antcall target="-update-sdk-platform-config"/>
  41. <delete file="platform-base.zip"/>
  42. </target>
  43. <target name="-check-platform-present">
  44. <available file="netbeans" property="platform.present"/>
  45. </target>
  46. <target name="-remove-platform">
  47. <delete dir="netbeans" failonerror="false"/>
  48. </target>
  49. <target name="-update-sdk-platform-config">
  50. <property name="nbplatform.dir" location="netbeans"/>
  51. <mkdir dir="sdk/nbproject/private"/>
  52. <echo file="sdk/nbproject/private/platform-private.properties"
  53. message="nbplatform.default.netbeans.dest.dir=${nbplatform.dir}&#xD;&#xA;"/>
  54. <echo file="sdk/nbproject/private/platform-private.properties"
  55. message="nbplatform.default.harness.dir=${nbplatform.dir}${file.separator}harness&#xD;&#xA;" append="true"/>
  56. <replace file="sdk/nbproject/private/platform-private.properties" token="\" value="\\"/>
  57. </target>
  58. <!--
  59. ****************************************************************
  60. Only Relevant for building nightly on Hudson server from here on
  61. ****************************************************************
  62. -->
  63. <target name="hudson-nightly" depends="update-platform">
  64. <exec executable="svn" dir="engine">
  65. <arg value="update" />
  66. </exec>
  67. <ant dir="engine" target="dist"/>
  68. <ant dir="engine" target="build-bullet-natives"/>
  69. <ant dir="engine" target="update-sdk"/>
  70. <ant dir="sdk" target="hudson-nightly"/>
  71. </target>
  72. <target name="hudson-stable" depends="update-platform">
  73. <exec executable="svn" dir="engine">
  74. <arg value="update" />
  75. </exec>
  76. <ant dir="engine" target="dist"/>
  77. <ant dir="engine" target="build-bullet-natives"/>
  78. <ant dir="engine" target="update-sdk"/>
  79. <ant dir="sdk" target="hudson-stable"/>
  80. </target>
  81. </project>