[go: up one dir, main page]

Menu

[r18]: / trunk / colorer / build.xml  Maximize  Restore  History

Download this file

347 lines (268 with data), 13.1 kB

  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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<?xml version="1.0"?>
<project name='Colorer-take5' default="all" basedir=".">
<description>
This is the top-level buildfile, used by ANT tool (http://jakarta.apache.org/ant/)
It contains tasks, used to build and distribute different versions of
Colorer-take5 library packages.
</description>
<property file='build.properties'/>
<property name='build-dir' value='distr'/>
<property name='distr-version' value='.beta2'/>
<property name='hrcupdate-dir' value='${build-dir}/hrc-update'/>
<property name='library-name' value='Colorer-take5${distr-version}'/>
<property name='library-dir' value='${build-dir}/${library-name}'/>
<property name='library-zip' value='${build-dir}/${library-name}.zip'/>
<property name='farplugin-name' value='FarColorer-take5${distr-version}'/>
<property name='farplugin-dir' value='${build-dir}/${farplugin-name}'/>
<property name='farplugin-zip' value='${build-dir}/${farplugin-name}.zip'/>
<property name='eclipseplugin-version' value='_0.5.0'/>
<property name='eclipseplugin-name' value='EclipseColorer-take5${eclipseplugin-version}'/>
<property name='eclipsedir-name' value='net.sf.colorer${eclipseplugin-version}'/>
<property name='eclipseplugin-dir' value='${build-dir}/${eclipseplugin-name}/${eclipsedir-name}'/>
<property name='eclipseplugin-zip' value='${build-dir}/${eclipseplugin-name}.zip'/>
<xmlcatalog id="DTDs">
<dtd publicid="-//Cail Lomecb//DTD Colorer HRC take5//EN"
location="doc/2003/hrc.dtd"/>
<dtd publicid="-//Cail Lomecb//DTD Colorer HRD take5//EN"
location="doc/2003/hrd.dtd"/>
<dtd publicid="-//Cail Lomecb//DTD Colorer CATALOG take5//EN"
location="doc/2003/catalog.dtd"/>
</xmlcatalog>
<target name="init">
<condition property='make' value='${vc.make}'><equals arg1='${platform}' arg2='vc'/></condition>
<condition property='makefile' value='${vc.makefile}'><equals arg1='${platform}' arg2='vc'/></condition>
<condition property='make' value='${bcc.make}'><equals arg1='${platform}' arg2='bcc'/></condition>
<condition property='makefile' value='${bcc.makefile}'><equals arg1='${platform}' arg2='bcc'/></condition>
<condition property='make' value='${cygwin.make}'><equals arg1='${platform}' arg2='cygwin'/></condition>
<condition property='makefile' value='${cygwin.makefile}'><equals arg1='${platform}' arg2='cygwin'/></condition>
<condition property='make' value='${gcc.make}'><equals arg1='${platform}' arg2='gcc'/></condition>
<condition property='makefile' value='${gcc.makefile}'><equals arg1='${platform}' arg2='gcc'/></condition>
<condition property='make' value='${macos.make}'><equals arg1='${platform}' arg2='macos'/></condition>
<condition property='makefile' value='${macos.makefile}'><equals arg1='${platform}' arg2='macos'/></condition>
<fail unless='make'>
No 'platform' property was specified. Use
ant -Dplatform=[vc|bcc|cygwin|gcc|macos]
</fail>
<property name='add.excludes' value='**/*.ilc, **/*.ild,
**/*.ilf, **/*.ils, **/*.tds,, **/*.map
**/colorer/colorer.exe, **/colorer/colorer
'/>
<uptodate property="doc.javadoc.required" targetfile="doc/java/package-list">
<srcfiles dir= "src/net.sf.colorer/src" includes="**/*.java, **/*.html"/>
</uptodate>
<uptodate property="doc.doxygen.required" targetfile="doc/api/index.html">
<srcfiles dir= "src" includes="**/*.h, **/*.cpp, **/colorer.doxygen.cfg, **/*.html"/>
</uptodate>
</target>
<target name="all" depends='init' description='Builds all available packages: library, farplugin and eclipseplugin'>
<splash/>
<antcall target='library'/>
<antcall target='farplugin'/>
<antcall target='eclipseplugin'/>
</target>
<target name="clean" depends='library.clean, farplugin.clean, eclipseplugin.clean, hrcupdate.clean, doc.clean'
description='Cleans all the temporary files'>
<delete dir='${build-dir}'/>
</target>
<target name="make.clean">
<exec dir='${make.dir}' executable='${make}'>
<arg line='${makefile}'/>
<arg line='clear'/>
<env key='Path' path='${native-path}:${java.library.path}'/>
</exec>
</target>
<target name='install' depends='init' description='Installs Colorer-take5 Library'>
</target>
<target name="doc.clean">
<delete file='src\shared\colorer_doc\warn_out'/>
<ant dir='doc/hrc-ref' antfile='build.xml' target='clean'/>
<delete dir='doc/api'/>
<delete dir='doc/java'/>
</target>
<target name="doc.hrc-ref" depends='init'>
<ant dir='doc/hrc-ref' antfile='build.xml' target='all'/>
</target>
<target name="doc" depends='init, doc.javadoc, doc.doxygen, doc.hrc-ref' description='Builds all the documentation files'>
</target>
<target name="doc.javadoc" depends='init' description='Generates Java classes documentation' unless='doc.javadoc.required'>
<ant dir='src/net.sf.colorer' antfile='javadoc.xml' target='javadoc'>
<property name='doc-dir' value='../../doc/java'/>
</ant>
</target>
<target name="doc.doxygen" depends='init' description='Generates C++ classes documentation' unless='doc.doxygen.required'>
<exec dir='src/shared/colorer_doc' executable='${doxygen}'>
<arg value='colorer.doxygen.cfg'/>
</exec>
</target>
<target name="xsd2hrc.distr" depends='init' description='Generates all required HRC files from their XML Schemas'>
<ant dir='bin/xsd2hrc' antfile='build.xml' target='distr'/>
</target>
<target name="hrc.jar" depends='xsd2hrc.distr'>
<mkdir dir='${target-dir}/hrc/auto/types'/>
<zip destfile='${target-dir}/hrc/common.jar'>
<fileset dir='hrc' includes='**/*' excludes='changes.txt, colorer.hrc, auto, auto/**/*'/>
</zip>
<copy file='hrc/colorer.hrc' tofile='${target-dir}/hrc/colorer.hrc'>
<filterset begintoken='l' endtoken='"'>
<filter token='ink=' value='link="jar:common.jar!'/>
</filterset>
</copy>
<zip destfile='${target-dir}/hrc/auto/types/auto.jar'>
<fileset dir='hrc/auto' includes='gen/**/*, qrm/**/*, types/**/*'/>
</zip>
<copy todir='${target-dir}/hrc/auto'>
<fileset dir='hrc/auto' includes='*.hrc'/>
<filterset begintoken='l' endtoken='"'>
<filter token='ink=' value='link="jar:types/auto.jar!'/>
</filterset>
</copy>
</target>
<target name="hrcupdate.clean">
<delete><fileset dir='${build-dir}/..' includes='hrc-update*'/></delete>
<delete dir='${hrcupdate-dir}'/>
</target>
<target name="hrcupdate" depends='init' description='Builds a package of the current HRC base'>
<tstamp><format property="TODAY" pattern="yyyy-MM-dd"/></tstamp>
<property name='hrcupdate-zip' value='${build-dir}/hrc-update.${TODAY}.zip'/>
<mkdir dir='${hrcupdate-dir}/hrc'/>
<antcall target='hrc.jar'>
<param name='target-dir' value='${hrcupdate-dir}'/>
</antcall>
<copy file='hrc/changes.txt' todir='${hrcupdate-dir}'/>
<zip destfile='${hrcupdate-zip}'>
<fileset dir='${hrcupdate-dir}'/>
</zip>
</target>
<target name="library.clean">
<delete dir='${library-dir}'/>
<delete file='${library-zip}'/>
<antcall target='make.clean'>
<param name='make.dir' value='src/colorer'/>
</antcall>
</target>
<target name="library" depends='init, doc, xsd2hrc.distr' description='Builds Colorer-take5 Library source distribution package'>
<mkdir dir='${library-dir}'/>
<exec dir='src/colorer' executable='${make}' failonerror='true'>
<arg line='${makefile}'/>
<env key='Path' path='${native-path}:${java.library.path}'/>
<env key='LIB' path='${native-libs}'/>
</exec>
<condition property="lib">
<or>
<available filepath="src/colorer" file="colorer.exe"/>
<available filepath="src/colorer" file="colorer"/>
</or>
</condition>
<fail unless='lib' message='Native executable library was not compiled'/>
<copy todir="${library-dir}/bin">
<fileset dir="src/colorer" includes="colorer.exe,colorer"/>
<fileset dir="bin" includes="**"/>
</copy>
<copy todir="${library-dir}">
<fileset dir="." includes="hrc/**, hrd/**, src/**" excludes='**/*.obj, **/*.lib, **/*.map, **/*.log, ${add.excludes}'/>
<fileset dir="." includes="doc/**" excludes='**/*.log'/>
</copy>
<copy todir='${library-dir}' includeemptydirs='false'>
<fileset dir='.' includes='*' excludes='*.log'/>
</copy>
<zip destfile='${library-zip}'>
<fileset dir='${build-dir}' includes='${library-name}/**'/>
</zip>
</target>
<target name="eclipseplugin.clean">
<delete dir='${eclipseplugin-dir}'/>
<delete file='${eclipseplugin-zip}'/>
<ant dir='src/net.sf.colorer' antfile='build.xml' target='clean'>
<property name='temp.folder' value='../../${build-dir}/${eclipseplugin-name}'/>
</ant>
<antcall target='make.clean'>
<param name='make.dir' value='src/net.sf.colorer/libnative'/>
</antcall>
</target>
<target name="eclipseplugin" depends='init' description='Eclipse plugin package'>
<mkdir dir='${eclipseplugin-dir}'/>
<exec dir='src/net.sf.colorer/libnative' executable='${make}' failonerror='true'>
<arg line='${makefile}'/>
<env key='Path' path='${native-path}:${java.library.path}'/>
</exec>
<ant dir='src/net.sf.colorer' antfile='build.xml' target='gather'>
<property name='temp.folder' value='../../${build-dir}/${eclipseplugin-name}'/>
</ant>
<condition property="lib">
<or>
<available filepath="src/net.sf.colorer/libnative" file="net_sf_colorer.dll"/>
<available filepath="src/net.sf.colorer/libnative" file="libnet_sf_colorer.so"/>
<available filepath="src/net.sf.colorer/libnative" file="libnet_sf_colorer.jnilib"/>
</or>
</condition>
<fail unless='lib' message='Native library was not compiled'/>
<mkdir dir="${eclipseplugin-dir}/os/win32/x86"/>
<mkdir dir="${eclipseplugin-dir}/os/linux/x86"/>
<mkdir dir="${eclipseplugin-dir}/os/macosx/ppc"/>
<copy todir="${eclipseplugin-dir}/os/win32/x86">
<fileset dir="src/net.sf.colorer/libnative" includes="net_sf_colorer.dll"/>
</copy>
<copy todir="${eclipseplugin-dir}/os/linux/x86">
<fileset dir="src/net.sf.colorer/libnative" includes="libnet_sf_colorer.so"/>
</copy>
<copy todir="${eclipseplugin-dir}/os/macosx/ppc">
<fileset dir="src/net.sf.colorer/libnative" includes="libnet_sf_colorer.jnilib"/>
</copy>
<mkdir dir='${eclipseplugin-dir}/colorer'/>
<antcall target='hrc.jar'>
<param name='target-dir' value='${eclipseplugin-dir}/colorer'/>
</antcall>
<mkdir dir='${eclipseplugin-dir}/colorer/hrd/rgb'/>
<copy todir='${eclipseplugin-dir}/colorer/hrd/rgb'>
<fileset dir='hrd/rgb' includes='**'/>
</copy>
<copy todir='${eclipseplugin-dir}/colorer'>
<fileset dir='.' includes='README,catalog-eclipse.xml'/>
</copy>
<move file='${eclipseplugin-dir}/colorer/catalog-eclipse.xml' tofile='${eclipseplugin-dir}/colorer/catalog.xml'/>
<copy todir='${eclipseplugin-dir}'>
<fileset dir='.' includes='LICENSE'/>
</copy>
<zip destfile='${eclipseplugin-zip}'>
<fileset dir='${build-dir}/${eclipseplugin-name}'/>
</zip>
</target>
<target name="farplugin.clean">
<delete dir='${farplugin-dir}'/>
<delete file='${farplugin-zip}'/>
<antcall target='make.clean'>
<param name='make.dir' value='src/pcolorer'/>
</antcall>
</target>
<target name="farplugin" depends='init' description='Builds FarColorer distribution package'>
<condition property="system">
<os family='windows'/>
</condition>
<fail unless='system' message='FarColorer plugin is available only on Windows system'/>
<mkdir dir='${farplugin-dir}/bin'/>
<exec dir='src/pcolorer' executable='${make}' failonerror='true'>
<arg line='${makefile}'/>
<env key='Path' path='${native-path}:${java.library.path}'/>
</exec>
<available property='lib' file='src/pcolorer/colorer.dll'/>
<fail unless='lib' message='FarColorer plugin was not compiled'/>
<copy todir='${farplugin-dir}/bin'>
<fileset dir='bin/farplugin' includes='coloree.hlf,coloree.lng,colorer.hlf,colorer.lng,shortcuts.reg'/>
<fileset dir='src/pcolorer' includes='colorer.dll'/><!-- colorer.map -->
</copy>
<mkdir dir='${farplugin-dir}/hrd/console'/>
<copy todir='${farplugin-dir}/hrd/console'>
<fileset dir='hrd/console' includes='**'/>
</copy>
<copy todir='${farplugin-dir}'>
<fileset dir='.' includes='LICENSE,README,catalog-far.xml'/>
</copy>
<move file='${farplugin-dir}/catalog-far.xml' tofile='${farplugin-dir}/catalog.xml'/>
<antcall target='hrc.jar'>
<param name='target-dir' value='${farplugin-dir}'/>
</antcall>
<zip destfile='${farplugin-zip}'>
<fileset dir='${farplugin-dir}'/>
</zip>
</target>
</project>