forked from tolmasky/cappuccino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
332 lines (249 loc) · 12.4 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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<?xml version = "1.0"?>
<project name = "Cappuccino" default = "build">
<import file = "common.xml" />
<filelist id = "Projects" dir = ".">
<file name = "Objective-J/build.xml" />
<file name = "Foundation/build.xml" />
<file name = "AppKit/build.xml" />
<file name = "Tools/build.xml" />
</filelist>
<!-- Deployment Paths -->
<property name = "Build.Cappuccino" location = "${Build}/Cappuccino" />
<property name = "Build.Cappuccino.Starter" location = "${Build.Cappuccino}/Starter" />
<property name = "Build.Cappuccino.Starter.Frameworks" location = "${Build.Cappuccino.Starter}/Frameworks" />
<property name = "Build.Cappuccino.Tools" location = "${Build.Cappuccino}/Tools" />
<property name = "Build.Cappuccino.Tools.Frameworks" location = "${Build.Cappuccino.Tools}/Frameworks" />
<property name = "Build.Cappuccino.Tools.Objj" location = "${Build.Cappuccino.Tools}/objj" />
<property name = "Build.Cappuccino.Tools.Bin" location = "${Build.Cappuccino.Tools.Objj}/bin" />
<property name = "Build.Cappuccino.Tools.Lib" location = "${Build.Cappuccino.Tools.Objj}/lib" />
<property name = "Build.Cappuccino.Tools.Lib.Frameworks" location = "${Build.Cappuccino.Tools.Lib}/Frameworks" />
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Debug" location = "${Build.Cappuccino.Tools.Lib}/Frameworks-Debug" />
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Rhino" location = "${Build.Cappuccino.Tools.Lib}/Frameworks-Rhino" />
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Rhino-Debug" location = "${Build.Cappuccino.Tools.Lib}/Frameworks-Rhino-Debug" />
<property name = "Build.Cappuccino.Tools.Editors" location = "${Build.Cappuccino.Tools}/Editors" />
<target name = "clean">
<iterate-build target = "clean"/>
<delete dir = "${Build.Cappuccino}" verbose = "true" />
</target>
<target name = "build">
<iterate target = "build">
<files>
<filelist refid = "Projects" />
</files>
</iterate>
</target>
<target name = "tools">
<iterate target = "release">
<files>
<filelist dir = ".">
<file name = "Objective-J/build.xml" />
<file name = "Tools/objjc/build.xml" />
<file name = "Tools/steam/build.xml" />
</filelist>
</files>
</iterate>
</target>
<target name = "install-tools">
<!-- TODO: replace this with a cross-platform (i.e. Windows compatible) version -->
<exec executable = "sudo" dir = "${Build.Cappuccino.Tools}">
<arg value = "sh" />
<arg value = "install-tools" />
</exec>
</target>
<target name = "bootstrap">
<antcall target = "deploy-bare-minimum" />
<antcall target = "install-tools" />
<antcall target = "deploy" />
<antcall target = "install-tools" />
</target>
<target name = "update-install" depends = "deploy">
<antcall target = "install-tools" />
</target>
<target name = "test" depends = "build">
<ojtest>
<tests>
<fileset dir = "Tests/Objective-J" includes = "*.j"/>
<fileset dir = "Tests/Foundation" includes = "*.j"/>
<!--<fileset dir = "Tests/AppKit" includes = "*.j"/>-->
</tests>
</ojtest>
</target>
<target name = "safe-documentation" >
<exec executable = "which" outputproperty = "doxygen.location">
<arg line = "doxygen" />
</exec>
<condition property = "doxygen.target" value = "" else = "-warning">
<not>
<length string = "${doxygen.location}" length = "0" />
</not>
</condition>
<antcall target = "documentation${doxygen.target}" />
</target>
<target name = "documentation-warning">
<echo>*** WARNING: Doxygen not installed. Could not create documentation.</echo>
</target>
<target name = "documentation">
<exec executable = "doxygen" dir = ".">
<arg value = "Tools/Documentation/Cappuccino.doxygen" />
</exec>
<mkdir dir = "${Build.Cappuccino}" />
<move file = "Documentation" todir = "${Build.Cappuccino}" />
<mkdir dir = "${Build.Cappuccino.Starter}" />
<copy todir = "${Build.Cappuccino.Starter}/Documentation" >
<fileset dir = "${Build.Cappuccino}/Documentation/html" />
</copy>
<mkdir dir = "${Build.Cappuccino.Tools}" />
<copy todir = "${Build.Cappuccino.Tools}/Documentation" >
<fileset dir = "${Build.Cappuccino}/Documentation/html" />
</copy>
</target>
<!-- Deploying -->
<target name = "deploy-bare-minimum" >
<!-- Build Bare Minimum -->
<ant antfile = "build.xml" dir = "Objective-J">
<property name = "Configuration" value = "Release" />
</ant>
<ant antfile = "build.xml" dir = "Tools/objjc" >
<property name = "Configuration" value = "Release" />
</ant>
<ant antfile = "build.xml" dir = "Tools/steam" >
<property name = "Configuration" value = "Release" />
</ant>
<!-- Deploy Bare Minimum -->
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino}">
<fileset dir = "${Build}/Release/">
<include name = "Objective-J/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Bin}">
<fileset dir = "${Build}/Release/objjc/bin" />
<fileset dir = "${Build}/Release/steam/bin" />
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib}">
<fileset dir = "${Build}/Release/objjc/lib" />
<fileset dir = "${Build}/Release/steam/lib" />
</copy>
<copy file = "Tools/Utilities/js.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<!-- Copy install script -->
<copy file = "Tools/Install/install-tools" tofile = "${Build.Cappuccino.Tools}/install-tools" />
</target>
<target name = "deploy" >
<!-- Build Everything Debug AND Release -->
<ant antfile = "build.xml" >
<property name = "Configuration" value = "Debug" />
</ant>
<ant antfile = "build.xml" >
<property name = "Configuration" value = "Release" />
</ant>
<!-- Actually Deploy -->
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks}">
<fileset dir = "${Build}/Release/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
<include name = "AppKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Debug}">
<fileset dir = "${Build}/Debug/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
<include name = "AppKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino}">
<fileset dir = "${Build}/Release/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
</fileset>
<fileset dir = "${Build}/Release-Rhino/">
<include name = "AppKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino-Debug}">
<fileset dir = "${Build}/Debug/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
</fileset>
<fileset dir = "${Build}/Debug-Rhino/">
<include name = "AppKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib}/NewApplication">
<fileset dir = "Tools/NewApplication" />
</copy>
<!-- FIXME: This is awful, we need to handle this like we handle Demos -->
<git-clone-pull repository = "git://github.com/280north/ojunit.git" dest = "${Build}/Release/ojunit" />
<copy todir = "${Build.Cappuccino.Tools.Lib}/ojunit">
<fileset dir = "${Build}/Release/ojunit" includes = "**/*.j" />
</copy>
<copy file = "Tools/ojunit/ojtest" tofile = "${Build.Cappuccino.Tools.Bin}/ojtest" />
<!-- Tools -->
<copy todir = "${Build.Cappuccino.Tools.Bin}">
<fileset dir = "${Build}/Release/bake/bin" />
<fileset dir = "${Build}/Release/cplutil/bin" />
<fileset dir = "${Build}/Release/objj/bin" />
<fileset dir = "${Build}/Release/objjc/bin" />
<fileset dir = "${Build}/Release/press/bin" />
<fileset dir = "${Build}/Release/steam/bin" />
</copy>
<copy file = "Tools/nib2cib/nib2cib" todir = "${Build.Cappuccino.Tools.Bin}" />
<copy todir = "${Build.Cappuccino.Tools.Lib}/nib2cib">
<fileset dir = "${Build}/Release/nib2cib" />
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib}">
<fileset dir = "${Build}/Release/bake/lib" />
<fileset dir = "${Build}/Release/cplutil/lib" />
<fileset dir = "${Build}/Release/objj/lib" />
<fileset dir = "${Build}/Release/objjc/lib" />
<fileset dir = "${Build}/Release/press/lib" />
<fileset dir = "${Build}/Release/steam/lib" />
</copy>
<!-- Copy READMEs -->
<copy file = "Tools/READMEs/STARTER-README" tofile = "${Build.Cappuccino.Starter}/README" />
<copy file = "Tools/READMEs/TOOLS-README" tofile = "${Build.Cappuccino.Tools}/README" />
<!-- Copy Editors -->
<copy file = "Tools/SubEthaEdit/Objective-J.mode.zip" tofile = "${Build.Cappuccino.Tools.Editors}/Objective-J.mode.zip" />
<copy file = "Tools/TextMate/JavaScript Objective-J.tmbundle.zip" tofile = "${Build.Cappuccino.Tools.Editors}/JavaScript Objective-J.tmbundle.zip" />
<copy file = "Tools/Vim/objj.vim" tofile = "${Build.Cappuccino.Tools.Editors}/objj.vim" />
<!-- Copy Utilities -->
<copy file = "Tools/Utilities/ant-apache-bsf-1.7.0.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<copy file = "Tools/Utilities/bsf.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<copy file = "Tools/Utilities/commons-logging-1.1.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<copy file = "Tools/Utilities/js.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<!-- Copy install script -->
<copy file = "Tools/Install/install-tools" tofile = "${Build.Cappuccino.Tools}/install-tools" />
<!-- Starter Package -->
<copy todir = "${Build.Cappuccino.Starter}/NewApplication">
<fileset dir = "Tools/NewApplication/" />
</copy>
<copy todir = "${Build.Cappuccino.Starter}/NewApplication/Frameworks">
<fileset dir = "${Build}/Release/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
<include name = "AppKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Starter}/NewApplication/Frameworks/Debug">
<fileset dir = "${Build}/Debug/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
<include name = "AppKit/" />
</fileset>
</copy>
<!-- Documentation -->
<antcall target = "safe-documentation" />
<!-- Zip -->
<zip destfile = "${Build.Cappuccino}/Starter.zip">
<fileset dir = "${Build.Cappuccino.Starter}" />
</zip>
<tar destfile = "${Build.Cappuccino}/Starter.tar.gz" compression = "gzip">
<fileset dir = "${Build.Cappuccino.Starter}" />
</tar>
<zip destfile = "${Build.Cappuccino}/Tools.zip">
<fileset dir = "${Build.Cappuccino.Tools}" />
</zip>
<tar destfile = "${Build.Cappuccino}/Tools.tar.gz" compression = "gzip">
<fileset dir = "${Build.Cappuccino.Tools}" />
</tar>
</target>
</project>