-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
178 lines (171 loc) · 10 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="com.jme3.gde.ios" default="netbeans" basedir=".">
<description>Builds, tests, and runs the project com.jme3.gde.ios.</description>
<import file="nbproject/build-impl.xml"/>
<target name="init" depends="-zip-data,basic-init,files-init,build-init,-javac-init"/>
<target name="-zip-data" description="Zips mac stubs">
<delete file="src/com/jme3/gde/ios/ios-data.zip"/>
<zip destfile="src/com/jme3/gde/ios/ios-data.zip" update="false">
<zipfileset dir="ios-data" prefix=""/>
</zip>
</target>
<target name="sources.error" unless="sources.available">
<echo>Check needed folders:
JDK binaries: ${avian.jdk.path.exists}
JDK sources: ${avian.jdk.src.path.exists}
Avian sources: ${avian.src.path.exists}
Avian Hello iOS sources: ${hello-ios.src.path.exists}</echo>
<fail>Avian or JDK sources not found! Please configure the avian and JDK source locations in the properties file!</fail>
</target>
<target name="sources.check">
<condition property="avian.jdk.path.exists" else="false">
<available file="${avian.jdk.path}" type="dir"/>
</condition>
<condition property="avian.jdk.src.path.exists" else="false">
<available file="${avian.jdk.src.path}" type="dir"/>
</condition>
<condition property="avian.src.path.exists" else="false">
<available file="${avian.src.path}" type="dir"/>
</condition>
<condition property="hello-ios.src.path.exists" else="false">
<available file="${hello-ios.src.path}" type="dir"/>
</condition>
<condition property="sources.available">
<and>
<isTrue value="${avian.jdk.path.exists}"/>
<isTrue value="${avian.jdk.src.path.exists}"/>
<isTrue value="${avian.src.path.exists}"/>
<isTrue value="${hello-ios.src.path.exists}"/>
</and>
</condition>
</target>
<target name="package-avian" depends="init, sources.check, sources.error" description="Builds and packages the avian library" if="sources.available">
<!--echo>Note to build avian you currently need to copy ar, libtool and ranlib
from XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
to XCode.app/Contents/Developer/usr/bin
</echo-->
<exec executable="make" dir="${avian.src.path}" failonerror="true">
<env key="JAVA_HOME" value="${avian.jdk.path}"/>
<arg line="clean"/>
</exec>
<exec executable="make" dir="${avian.src.path}" failonerror="true">
<env key="JAVA_HOME" value="${avian.jdk.path}"/>
<arg line="arch=arm"/>
<arg line="platform=ios"/>
<arg line="process=compile"/>
<arg line="openjdk='${avian.jdk.path}'"/>
<arg line="openjdk-src='${avian.jdk.src.path}'"/>
<arg line="bootimage=true"/>
<arg line="build/ios-arm-bootimage-openjdk-src/bootimage-generator"/>
<arg line="build/ios-arm-bootimage-openjdk-src/binaryToObject/binaryToObject"/>
<arg line="build/ios-arm-bootimage-openjdk-src/classpath.jar"/>
<arg line="build/ios-arm-bootimage-openjdk-src/libavian.a"/>
</exec>
<delete file="src/com/jme3/gde/ios/avian-openjdk-mac.zip" failonerror="false"/>
<zip destfile="src/com/jme3/gde/ios/avian-openjdk-mac.zip">
<zipfileset file="${avian.src.path}/build/ios-arm-bootimage-openjdk-src/bootimage-generator" filemode="755" fullpath="avian-arm/bootimage-generator"/>
<zipfileset file="${avian.src.path}/build/ios-arm-bootimage-openjdk-src/binaryToObject/binaryToObject" filemode="755" fullpath="avian-arm/binaryToObject"/>
<zipfileset file="${avian.src.path}/build/ios-arm-bootimage-openjdk-src/libavian.a" fullpath="avian-arm/libavian.a"/>
</zip>
<exec executable="make" dir="${avian.src.path}">
<env key="JAVA_HOME" value="${avian.jdk.path}"/>
<arg line="clean"/>
</exec>
<exec executable="make" dir="${avian.src.path}" failonerror="true">
<env key="JAVA_HOME" value="${avian.jdk.path}"/>
<arg line="arch=arm64"/>
<arg line="platform=ios"/>
<arg line="process=compile"/>
<arg line="openjdk='${avian.jdk.path}'"/>
<arg line="openjdk-src='${avian.jdk.src.path}'"/>
<arg line="bootimage=true"/>
<!--arg line="mode=debug"/-->
<arg line="build/ios-arm64-bootimage-openjdk-src/bootimage-generator"/>
<arg line="build/ios-arm64-bootimage-openjdk-src/binaryToObject/binaryToObject"/>
<arg line="build/ios-arm64-bootimage-openjdk-src/classpath.jar"/>
<arg line="build/ios-arm64-bootimage-openjdk-src/libavian.a"/>
</exec>
<zip destfile="src/com/jme3/gde/ios/avian-openjdk-mac.zip" update="true">
<zipfileset file="${avian.src.path}/build/ios-arm64-bootimage-openjdk-src/bootimage-generator" filemode="755" fullpath="avian-arm64/bootimage-generator"/>
<zipfileset file="${avian.src.path}/build/ios-arm64-bootimage-openjdk-src/binaryToObject/binaryToObject" filemode="755" fullpath="avian-arm64/binaryToObject"/>
<zipfileset file="${avian.src.path}/build/ios-arm64-bootimage-openjdk-src/libavian.a" fullpath="avian-arm64/libavian.a"/>
<zipfileset file="${avian.src.path}/vm.pro" fullpath="vm.pro"/>
<zipfileset file="${avian.src.path}/openjdk.pro" fullpath="openjdk.pro"/>
</zip>
<exec executable="make" dir="${avian.src.path}">
<env key="JAVA_HOME" value="${avian.jdk.path}"/>
<arg line="clean"/>
</exec>
<exec executable="make" dir="${avian.src.path}" failonerror="true">
<env key="JAVA_HOME" value="${avian.jdk.path}"/>
<arg line="arch=i386"/>
<arg line="platform=ios"/>
<arg line="process=compile"/>
<arg line="openjdk='${avian.jdk.path}'"/>
<arg line="openjdk-src='${avian.jdk.src.path}'"/>
<arg line="bootimage=true"/>
<arg line="build/ios-i386-bootimage-openjdk-src/bootimage-generator"/>
<arg line="build/ios-i386-bootimage-openjdk-src/binaryToObject/binaryToObject"/>
<arg line="build/ios-i386-bootimage-openjdk-src/classpath.jar"/>
<arg line="build/ios-i386-bootimage-openjdk-src/libavian.a"/>
</exec>
<zip destfile="src/com/jme3/gde/ios/avian-openjdk-mac.zip" update="true">
<zipfileset file="${avian.src.path}/build/ios-i386-bootimage-openjdk-src/bootimage-generator" filemode="755" fullpath="avian-i386/bootimage-generator"/>
<zipfileset file="${avian.src.path}/build/ios-i386-bootimage-openjdk-src/binaryToObject/binaryToObject" filemode="755" fullpath="avian-i386/binaryToObject"/>
<zipfileset file="${avian.src.path}/build/ios-i386-bootimage-openjdk-src/libavian.a" fullpath="avian-i386/libavian.a"/>
<zipfileset file="${avian.src.path}/vm.pro" fullpath="vm.pro"/>
<zipfileset file="${avian.src.path}/openjdk.pro" fullpath="openjdk.pro"/>
</zip>
<zip destfile="src/com/jme3/gde/ios/avian-openjdk-mac.zip" update="true">
<zipfileset dir="${avian.src.path}/build/ios-i386-bootimage-openjdk-src/classpath" prefix="classpath/">
<exclude name="**/java/awt/**"/>
<exclude name="**/apple/**"/>
<exclude name="**/javax/swing/**"/>
<exclude name="**/javax/sound/**"/>
<exclude name="**/javax/smartcardio/**"/>
<exclude name="**/sun/applet/**"/>
<exclude name="**/sun/audio/**"/>
<exclude name="**/sun/awt/**"/>
<exclude name="**/sun/corba/**"/>
<exclude name="**/sun/font/**"/>
<!--exclude name="**/sun/java2d/**"/-->
<exclude name="**/sun/lwawt/**"/>
<exclude name="**/sun/print/**"/>
<exclude name="**/sun/swing/**"/>
<exclude name="**/com/oracle/**"/>
<!--crypto,demo,rmi,servicetag,tracing-->
<!--exclude name="**/com/sun/**"/>
<exclude name="**/com/sun/accessibility/**"/>
<exclude name="**/com/sun/activation/**"/-->
<exclude name="**/com/sun/awt/**"/>
<!--exclude name="**/com/sun/beans/**"/>
<exclude name="**/com/sun/codemodel/**"/>
<exclude name="**/com/sun/corba/**"/>
<exclude name="**/com/sun/imageio/**"/>
<exclude name="**/com/sun/istack/**"/>
<exclude name="**/com/sun/jarsigner/**"/>
<exclude name="**/com/sun/java/**"/>
<exclude name="**/com/sun/java_cup/**"/>
<exclude name="**/com/sun/javadoc/**"/>
<exclude name="**/com/sun/jmx/**"/>
<exclude name="**/com/sun/jndi/**"/>
<exclude name="**/com/sun/management/**"/>
<exclude name="**/com/sun/media/**"/>
<exclude name="**/com/sun/mirror/**"/>
<exclude name="**/com/sun/naming/**"/>
<exclude name="**/com/sun/net/**"/>
<exclude name="**/com/sun/nio/**"/>
<exclude name="**/com/sun/org/**"/>
<exclude name="**/com/sun/rowset/**"/>
<exclude name="**/com/sun/security/**"/>
<exclude name="**/com/sun/source/**"/>
<exclude name="**/com/sun/swing/**"/>
<exclude name="**/com/sun/tools/**"/>
<exclude name="**/com/sun/xml/**"/-->
</zipfileset>
</zip>
</target>
</project>