-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
147 lines (125 loc) · 5.91 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?xml version="1.0" encoding="UTF-8"?>
<project name="jME3-SDK" default="default" basedir=".">
<description>Builds, tests, and runs the jMonkeyEngine3 SDK.</description>
<fail message="Please build using Ant 1.7.1 or higher.">
<condition>
<not>
<antversion atleast="1.7.1"/>
</not>
</condition>
</fail>
<target name="default" depends="zip"/>
<target name="build" description="Builds the complete SDK, copies over engine libraries." depends="-check-platform, -update-sdk-platform-config">
<ant dir="engine" target="update-sdk"/>
<ant dir="sdk" target="build"/>
</target>
<target name="build-engine" description="Builds the engine libraries only">
<ant dir="engine" target="clean"/>
<ant dir="engine" target="jar"/>
<ant dir="engine" target="javadoc"/>
<ant dir="engine" target="create-zip-distribution"/>
</target>
<target name="clean" description="Clean all build products" depends="-check-platform, -update-sdk-platform-config">
<ant dir="engine" target="clean"/>
<ant dir="sdk" target="clean"/>
</target>
<target name="run" description="Runs the SDK" depends="-check-platform, -update-sdk-platform-config">
<ant dir="engine" target="update-sdk"/>
<ant dir="sdk" target="run"/>
</target>
<target name="zip" description="Builds the complete SDK and packs it as a ZIP file">
<ant dir="engine" target="update-sdk"/>
<ant dir="sdk" target="build-zip"/>
<property file="sdk/nbproject/project.properties"/>
<move file="sdk/dist/${app.name}.zip" tofile="./jMonkeyEngine-SDK-${app.version}-NoBundles.zip"/>
</target>
<target name="update-platform" description="Updates the base platform to the latest available build" depends="-remove-platform,-check-platform"/>
<target name="-check-platform" depends="-check-platform-present" unless="platform.present">
<property file="sdk/nbproject/project.properties"/>
<echo message="Downloading base platform, this only has to be done once."/>
<get src="${netbeans.platform.url}" dest="./platform-base.zip" skipexisting="false"/>
<unzip src="platform-base.zip" dest="./"/>
<antcall target="-update-sdk-platform-config"/>
<delete file="platform-base.zip"/>
</target>
<target name="-check-platform-present">
<available file="sdk/nbproject/private/platform-private.properties" property="platform.present"/>
</target>
<target name="-remove-platform">
<delete dir="netbeans" failonerror="false"/>
<delete file="sdk/nbproject/private/platform-private.properties" failonerror="false"/>
</target>
<target name="create-platform-config" depends="-update-sdk-platform-config">
</target>
<target name="-update-sdk-platform-config">
<property name="nbplatform.dir" location="netbeans"/>
<mkdir dir="sdk/nbproject/private"/>
<echo file="sdk/nbproject/private/platform-private.properties"
message="nbplatform.default.netbeans.dest.dir=${nbplatform.dir}
"/>
<echo file="sdk/nbproject/private/platform-private.properties"
message="nbplatform.default.harness.dir=${nbplatform.dir}${file.separator}harness
" append="true"/>
<replace file="sdk/nbproject/private/platform-private.properties" token="\" value="\\"/>
</target>
<!--
****************************************************************
Only Relevant for building nightly on Hudson server from here on
****************************************************************
-->
<target name="hudson-nightly" depends="-hudson-revert-changes, -check-platform, -update-sdk-platform-config, -hudson-build-engine">
<!--ant dir="engine" target="copy-javadoc"/-->
<ant dir="engine" target="create-zip-distribution"/>
<ant dir="sdk" target="hudson-nightly"/>
</target>
<target name="hudson-stable" depends="-hudson-revert-changes, -check-platform, -update-sdk-platform-config, -hudson-build-engine">
<!--ant dir="engine" target="dist"/-->
<ant dir="engine" target="create-zip-distribution"/>
<ant dir="sdk" target="hudson-stable"/>
</target>
<target name="hudson-release" depends="-hudson-revert-changes, -check-platform, -update-sdk-platform-config, -hudson-build-engine">
<ant dir="sdk" target="hudson-release"/>
</target>
<target name="-hudson-revert-changes">
<exec executable="svn" dir="engine" failonerror="true">
<arg value="cleanup" />
</exec>
<exec executable="svn" dir="engine">
<arg value="revert" />
<arg value="-R" />
<arg value="." />
</exec>
<exec executable="svn" dir="engine">
<arg value="cleanup" />
</exec>
<exec executable="svn" dir="engine">
<arg value="update" />
</exec>
<exec executable="svn" dir="sdk">
<arg value="cleanup" />
</exec>
<exec executable="svn" dir="sdk">
<arg value="revert" />
<arg value="." />
<arg value="-R" />
</exec>
<exec executable="svn" dir="sdk">
<arg value="cleanup" />
</exec>
<exec executable="svn" dir="sdk">
<arg value="update" />
</exec>
<exec executable="svn" dir=".">
<arg value="unlock" />
<arg value="engine" />
</exec>
<exec executable="svn" dir=".">
<arg value="unlock" />
<arg value="sdk" />
</exec>
</target>
<target name="-hudson-build-engine">
<!--ant dir="engine" target="build-bullet-natives"/-->
<ant dir="engine" target="jar"/>
<ant dir="engine" target="javadoc"/>
<ant dir="engine" target="update-sdk-nobuild"/>
</target>
</project>