OSDN Git Service

move MMDLoaderJME/src/* to engine/src/mmd
[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="default" depends="zip"/>
14
15 <!--    <target name="build" description="Builds the complete SDK" depends="-check-platform, -update-sdk-platform-config">-->
16     <target name="build" description="Builds the complete SDK">
17         <ant dir="engine" target="update-sdk"/>
18         <ant dir="sdk" target="build"/>
19     </target>
20
21     <target name="build-engine" description="Builds the engine libraries only">
22         <ant dir="engine" target="clean"/>
23         <ant dir="engine" target="dist"/>
24     </target>
25
26     <target name="clean" description="Clean all build products">
27         <ant dir="engine" target="clean"/>
28         <ant dir="sdk" target="clean"/>
29     </target>
30
31     <target name="run" description="Runs the SDK">
32         <ant dir="engine" target="update-sdk"/>
33         <ant dir="sdk" target="run"/>
34     </target>
35
36     <target name="zip" description="Builds the complete SDK and packs it as a ZIP file" depends="build">
37         <propertyfile file="sdk/nbproject/project.properties"/>
38         <move file="sdk/dist/${app.name}.zip" tofile="./jMonkeyEngine-GDE-${app.version}.zip"/>
39     </target>
40     
41     <target name="update-platform" description="Updates the base platform to the latest available build" depends="-remove-platform,-check-platform"/>
42
43     <target name="-check-platform" depends="-check-platform-present" unless="platform.present">
44         <property file="sdk/nbproject/project.properties"/>
45         <echo message="Downloading base platform, this only has to be done once."/>
46         <!--get src="http://jmonkeyengine.googlecode.com/files/platform-base.zip" dest="./" skipexisting="true"/-->
47         <get src="http://jmonkeyengine.com/platform/base/alpha/platform-base.zip" dest="./" skipexisting="false"/>
48         <!--get src="http://jmonkeyengine.com/updates/${app.version}/platform-base.zip" dest="./" skipexisting="false"/-->
49         <unzip src="platform-base.zip" dest="./"/>
50         <antcall target="-update-sdk-platform-config"/>
51         <delete file="platform-base.zip"/>
52     </target>
53
54     <target name="-check-platform-present">
55         <available file="netbeans" property="platform.present"/>
56     </target>
57
58     <target name="-remove-platform">
59         <delete dir="netbeans" failonerror="false"/>
60     </target>
61
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     
72     <!--
73        ****************************************************************
74        Only Relevant for building nightly on Hudson server from here on
75        ****************************************************************
76       -->
77       
78     <target name="hudson-nightly" depends="update-platform">
79         <exec executable="svn" dir="engine">
80             <arg value="update" />
81         </exec>
82         <ant dir="engine" target="dist"/>
83         <ant dir="engine" target="build-bullet-natives"/>
84         <ant dir="engine" target="update-sdk"/>
85         <ant dir="sdk" target="hudson-nightly"/>
86     </target>
87
88     <target name="hudson-stable" depends="update-platform">
89         <exec executable="svn" dir="engine">
90             <arg value="update" />
91         </exec>
92         <ant dir="engine" target="dist"/>
93         <ant dir="engine" target="build-bullet-natives"/>
94         <ant dir="engine" target="update-sdk"/>
95         <ant dir="sdk" target="hudson-stable"/>
96     </target>
97
98 </project>