forked from mateuszmackowiak/NativeDialogs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
272 lines (237 loc) · 7.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
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<project name="ANE" basedir="." default="compile">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath path=".ant-contrib.jar"/>
</taskdef>
<!-- Load variables -->
<property file="build.properties"/>
<!-- Clean binaries folder -->
<target name="cleanBinaries">
<delete dir="${BINARIES_FOLDER}"/>
<mkdir dir="${BINARIES_FOLDER}"/>
<mkdir dir="${BINARIES_FOLDER}/Default"/>
</target>
<!-- Clean iOS project -->
<target name="iOSClean" if="${IOS_ARM_ENABLE}" depends="cleanBinaries">
<mkdir dir="${BINARIES_FOLDER}/iOS"/>
<exec executable="xcodebuild" dir="." failonerror="true">
<arg line="-project ${IOS_PROJECT_PATH}"/>
<arg line="-alltargets clean"/>
</exec>
</target>
<!-- Compile iOS project -->
<target name="iOSCompile" if="${IOS_ARM_ENABLE}" depends="iOSClean">
<exec executable="xcodebuild" dir="." failonerror="true">
<arg line="-project ${IOS_PROJECT_PATH}"/>
<arg line="-sdk iphoneos"/>
<arg line="-target NativeDialogs"/>
<!--<arg line="-alltargets"/>-->
<arg line="-configuration Release"/>
</exec>
</target>
<!-- Copy iOS lib in binaries folder -->
<target name="iOSCopy" if="${IOS_ARM_ENABLE}" depends="iOSCompile">
<copy todir="${BINARIES_FOLDER}/iOS">
<fileset dir="${IOS_GENERATED_PATH}"/>
</copy>
<!--<copy file="${IOS_LIB_PATH}" todir="${BINARIES_FOLDER}/iOS"/>-->
</target>
<!-- Clean Android project -->
<target name="androidClean" if="${ANDROID_ENABLE}" depends="iOSCopy">
<mkdir dir="${BINARIES_FOLDER}/Android"/>
<mkdir dir="${BINARIES_FOLDER}/Android/res"/>
<delete dir="${ANDROID_BUILD_FOLDER}"/>
<mkdir dir="${ANDROID_BUILD_FOLDER}"/>
</target>
<!-- Export Android lib -->
<target name="androidExport" if="${ANDROID_ENABLE}" depends="androidClean">
<jar basedir="${ANDROID_BIN_FOLDER}/classes" destfile="${ANDROID_LIB_PATH}"/>
</target>
<!-- Copy Android lib in binaries folder -->
<target name="androidCopy" if="${ANDROID_ENABLE}" depends="androidExport">
<copy file="${ANDROID_LIB_PATH}" todir="${BINARIES_FOLDER}/Android"/>
</target>
<!-- Unzip SWF file and copy it to binaries folders -->
<target name="unzipSwf" depends="androidCopy">
<mkdir dir="temp"/>
<unzip src="${SWC_PATH}" dest="temp"/>
<copy file="temp/library.swf" todir="${BINARIES_FOLDER}/Default"/>
</target>
<target name="copySwfToAndroid" if="${ANDROID_ENABLE}" depends="unzipSwf">
<copy file="temp/library.swf" todir="${BINARIES_FOLDER}/Android"/>
</target>
<target name="copySwfToIOS" if="${IOS_ARM_ENABLE}" depends="copySwfToAndroid">
<copy file="temp/library.swf" todir="${BINARIES_FOLDER}/iOS"/>
</target>
<target name="deleteTemp" depends="copySwfToIOS">
<delete dir="temp"/>
</target>
<!--
<if>
<equals arg1="${IOS_X86_ENABLE}" arg2="true"/>
<then>
</then>
<else>
</else>
</if>-->
<!-- Compile ANE -->
<target name="compile" depends="deleteTemp">
<if>
<equals arg1="${ANDROID_ENABLE}" arg2="true"/>
<then>
<if>
<equals arg1="${IOS_ARM_ENABLE}" arg2="true"/>
<then>
<if>
<equals arg1="${IOS_X86_ENABLE}" arg2="true"/>
<then>
<java jar="${ADT.JAR}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="ane"/>
<arg value="${ANE_PATH}"/>
<arg value="${EXTENSION.XML}"/>
<arg value="-swc"/>
<arg value="${SWC_PATH}"/>
<arg value="-platform"/>
<arg value="iPhone-ARM"/>
<arg value="-platformoptions"/>
<arg value="${IOS_PLATFORM_OPTIONS}"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/iOS"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="iPhone-x86"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/iOS"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="Android-ARM"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/Android"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="default"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/Default"/>
<arg value="library.swf"/>
</java>
</then>
<else>
<java jar="${ADT.JAR}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="ane"/>
<arg value="${ANE_PATH}"/>
<arg value="${EXTENSION.XML}"/>
<arg value="-swc"/>
<arg value="${SWC_PATH}"/>
<arg value="-platform"/>
<arg value="iPhone-ARM"/>
<arg value="-platformoptions"/>
<arg value="${IOS_PLATFORM_OPTIONS}"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/iOS"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="Android-ARM"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/Android"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="default"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/Default"/>
<arg value="library.swf"/>
</java>
</else>
</if>
</then>
<else>
<java jar="${ADT.JAR}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="ane"/>
<arg value="${ANE_PATH}"/>
<arg value="${EXTENSION.XML}"/>
<arg value="-swc"/>
<arg value="${SWC_PATH}"/>
<arg value="-platform"/>
<arg value="Android-ARM"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/Android"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="default"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/Default"/>
<arg value="library.swf"/>
</java>
</else>
</if>
</then>
<else>
<if>
<equals arg1="${IOS_ARM_ENABLE}" arg2="true"/>
<then>
<if>
<equals arg1="${IOS_X86_ENABLE}" arg2="true"/>
<then>
<java jar="${ADT.JAR}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="ane"/>
<arg value="${ANE_PATH}"/>
<arg value="${EXTENSION.XML}"/>
<arg value="-swc"/>
<arg value="${SWC_PATH}"/>
<arg value="-platform"/>
<arg value="iPhone-ARM"/>
<arg value="-platformoptions"/>
<arg value="${IOS_PLATFORM_OPTIONS}"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/iOS"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="iPhone-x86"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/iOS"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="default"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/Default"/>
<arg value="library.swf"/>
</java>
</then>
<else>
<java jar="${ADT.JAR}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="ane"/>
<arg value="${ANE_PATH}"/>
<arg value="${EXTENSION.XML}"/>
<arg value="-swc"/>
<arg value="${SWC_PATH}"/>
<arg value="-platform"/>
<arg value="iPhone-ARM"/>
<arg value="-platformoptions"/>
<arg value="${IOS_PLATFORM_OPTIONS}"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/iOS"/>
<arg value="."/>
<arg value="-platform"/>
<arg value="default"/>
<arg value="-C"/>
<arg value="${BINARIES_FOLDER}/Default"/>
<arg value="library.swf"/>
</java>
</else>
</if>
</then>
<else>
</else>
</if>
</else>
</if>
</target>
</project>