OSDN Git Service

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