forked from cyberfox/jbidwatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
541 lines (484 loc) · 26.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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
<?xml version="1.0" encoding="UTF-8"?>
<project name="JBidwatcher" default="apps" basedir='.'>
<!-- Since properties are inmutable, the first definition of a properties is used! -->
<!-- Read computers environment -->
<property environment="env" />
<!-- Set GITVERSION for local build and remove comment signs -->
<!-- <property name="GITVERSION" value="local" /> -->
<!-- To build the test tool, go: -->
<!-- ant -Dmain.class=com.jbidwatcher.app.JBTool jar -->
<property name="main.class" value="com.jbidwatcher.app.JBidWatch" />
<property name="build.dir" value="classes" />
<property name="src.dir" value="src" />
<property name="dest.dir" value="." />
<property name="main.dir" value="." />
<property name="resource.dir" value="${main.dir}/resources"/>
<property name="log.dir" value="logs" />
<property name="lib.dir" value="lib" />
<property name="sparkle.dir" value="platform/sparkle" />
<property name="platform.dir" value="platform" />
<property name="JAVADIR" value="src" />
<property name="app.name" value="JBidwatcher" />
<property name="VER" value="2.99pre5" />
<property name="TARSRC" value="jbidwatcher-${VER}" />
<property name="INTERMEDIATE" value="${app.name}.jar" />
<property name="BINARY" value="${app.name}-${VER}.jar" />
<property name="OPT_BIN" value="${app.name}-${VER}_o.jar" />
<property name="UNOPT_BIN" value="${app.name}-${VER}_u.jar" />
<property name="ZIPFILE" value="${app.name}-${VER}.zip" />
<property name="TARFILE" value="${TARSRC}.tar.bz2" />
<property name="APPFILE" value="${app.name}-${VER}.app.tar.gz" />
<property name="osx.app.name" value="${app.name}.app" />
<property name="build.path" value="/tmp/building" />
<property name="osx.app.path" value="/tmp/building/${osx.app.name}" />
<property name="DMGFILE" value="${app.name}-${VER}.dmg" />
<property name="EXEFILE" value="${app.name}-${VER}.exe" />
<property name="MANIFEST" value="META-INF/MANIFEST.MF" />
<property name="ONEJAR_MANIFEST" value="onejar/META-INF/MANIFEST.MF" />
<property name="jopt.jar" value="${JAVADIR}/jopt/jopt.jar" />
<!-- available file="${jopt.jar}" property="jopt.jar.present"/ -->
<!-- Read any properties that are local to the used installation -->
<!-- This file must not reside in the repository!!! -->
<property file="build-local.properties" />
<!-- Read properties that are special for this computer -->
<!-- It could be placed in the repository -->
<property file="build-${env.COMPUTERNAME}.properties" />
<!-- Read properties that are special for this user -->
<!-- It could be placed in the repository -->
<property file="build-${env.USERNAME}.properties" />
<path id="project.class.path">
<pathelement path="${build.dir}" />
<pathelement path="${src.dir}" />
<pathelement path="${lib.dir}/annotations.jar" />
<pathelement path="${lib.dir}/aopalliance.jar" />
<pathelement path="${lib.dir}/apple.jar" />
<pathelement path="${platform.dir}/nonap.jar" />
<pathelement path="${lib.dir}/derby.jar" />
<pathelement path="${lib.dir}/guice-3.0.jar" />
<pathelement path="${lib.dir}/guice-assistedinject-3.0.jar" />
<pathelement path="${lib.dir}/mahalo.jar" />
<pathelement path="${lib.dir}/javax.inject.jar" />
<pathelement path="${lib.dir}/jsr305-1.3.9.jar" />
<pathelement path="${lib.dir}/jDeskMetrics.jar" />
<pathelement path="${lib.dir}/txtmark.jar" />
<pathelement path="${lib.dir}/jdesktop.jar" />
<pathelement path="${lib.dir}/jl1.0.1.jar" />
<pathelement path="${lib.dir}/jsoup-1.7.1.jar" />
<pathelement path="${lib.dir}/jruby-complete.jar" />
<pathelement path="${lib.dir}/jline-2.11.jar" />
<pathelement path="${lib.dir}/readline.jar" />
<pathelement path="${lib.dir}/json_simple-1.1.jar" />
<pathelement path="${lib.dir}/l2fprod-common-fontchooser.jar" />
<pathelement path="${lib.dir}/mysql-connector-java-5.1.7-bin.jar" />
</path>
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="lib/appbundler-1.0ea.jar"/>
<target name="init" description="Prepare for build">
<tstamp/>
<mkdir dir="${build.dir}" />
<mkdir dir="${log.dir}" />
</target>
<target name="compile" depends="init">
<echo level="info" message="Compiling all classes." />
<mkdir dir="${build.dir}" />
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false" debug="on" source="1.8" target="1.8">
<classpath refid="project.class.path" />
<include name="**/*.java" />
</javac>
</target>
<target name="whatsnew">
<cvschangelog destfile="changelog.xml" start="31 March 2006">
<user displayname="Morgan Schweers" userid="cyberfox"/>
</cvschangelog>
<style in="changelog.xml" out="changelog.html" style="/usr/share/ant/etc/changelog.xsl">
<param name="title" expression="JBidwatcher Recent Changes" />
<param name="module" expression="JBidwatcher" />
</style>
</target>
<target name="tar" description="Building source .tar file.">
<tar destfile="${TARFILE}" compression="bzip2" longfile="gnu">
<tarfileset prefix="${TARSRC}/src" dir="${src.dir}" includes="**/*.java" />
<tarfileset prefix="${TARSRC}" dir="${main.dir}" includes="*.sql" />
<tarfileset prefix="${TARSRC}" dir="${main.dir}" includes="*.xsl" />
<tarfileset prefix="${TARSRC}" dir="${main.dir}" includes="auctions.dtd" />
<tarfileset prefix="${TARSRC}" dir="${main.dir}" includes="TODO" />
<tarfileset prefix="${TARSRC}" dir="${main.dir}" includes="COPYING.html" />
<tarfileset prefix="${TARSRC}" dir="${main.dir}" includes="build.xml" />
<tarfileset prefix="${TARSRC}" dir="${main.dir}" includes="platform/jbidwatcher.jnlp" />
<tarfileset prefix="${TARSRC}" dir="${main.dir}" includes="${MANIFEST}" />
<tarfileset prefix="${TARSRC}/platform" dir="${main.dir}/platform"/>
<tarfileset prefix="${TARSRC}/lib" dir="${main.dir}/lib"/>
<tarfileset prefix="${TARSRC}/onejar" dir="${main.dir}/onejar"/>
<tarfileset prefix="${TARSRC}/resources" dir="resources" includes="*.jpg"/>
<tarfileset prefix="${TARSRC}/resources" dir="resources" includes="display.cfg"/>
<tarfileset prefix="${TARSRC}/resources" dir="resources" includes="jbidwatcher.properties" />
<tarfileset prefix="${TARSRC}/resources" dir="resources" includes="ebay_*.properties" />
<tarfileset prefix="${TARSRC}/resources/icons" dir="resources/icons" includes="**/*.gif" />
<tarfileset prefix="${TARSRC}/resources/icons" dir="resources/icons" includes="**/*.png" />
<tarfileset prefix="${TARSRC}/resources/audio" dir="resources/audio" includes="*.mp3" />
<tarfileset prefix="${TARSRC}/resources/db" dir="resources/db" includes="*.sql" />
<tarfileset prefix="${TARSRC}/resources/help" dir="resources/help" includes="*.jpg" />
<tarfileset prefix="${TARSRC}/resources/help" dir="resources/help" includes="*.jbh" />
<tarfileset prefix="${TARSRC}/resources/help" dir="resources/help" includes="*.md" />
</tar>
</target>
<target name="jar-real" depends="compile">
<echo level="info" message="Building primary .jar file." />
<copy todir="resources/help/" file="COPYING.html" />
<exec executable="git" outputproperty="GITVERSION" errorproperty="" failifexecutionfails="no">
<arg line="describe --tags --long"/>
</exec>
<mkdir dir="META-INF"/>
<manifest file="${MANIFEST}">
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Created-By" value="Morgan Schweers @ Cyberfox Software, Inc"/>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Version" value="${GITVERSION}"/>
</manifest>
<jar jarfile="${INTERMEDIATE}" manifest="${MANIFEST}" index="true">
<fileset dir="${build.dir}" includes="**/*.class" />
<!-- <fileset dir="${lib.dir}" includes="**/*.class" /> -->
<fileset dir="${resource.dir}" includes="*.jpg"/>
<fileset dir="${resource.dir}" includes="*.sql"/>
<fileset dir="${resource.dir}" includes="display.cfg"/>
<fileset dir="${resource.dir}" includes="icons/**/*.gif" />
<fileset dir="${resource.dir}" includes="icons/**/*.png" />
<fileset dir="${resource.dir}" includes="audio/*.mp3" />
<fileset dir="${resource.dir}" includes="db/*.sql" />
<fileset dir="${resource.dir}" includes="help/*.jpg" />
<fileset dir="${resource.dir}" includes="help/*.jbh" />
<fileset dir="${resource.dir}" includes="help/*.md" />
<fileset dir="${resource.dir}" includes="help/*.html" />
<fileset dir="${resource.dir}" includes="jbidwatcher.properties" />
<fileset dir="${resource.dir}" includes="ebay_*.properties" />
</jar>
<delete file="resources/help/COPYING.html" />
</target>
<target name="linux" depends="jar-real">
<echo level="info" message="Building Linux deployment .tar file." />
<mkdir dir="${build.path}/app" />
<copy file="${INTERMEDIATE}" tofile="${build.path}/app/JBidwatcher.jar"/>
<tar destfile="${app.name}-${VER}.tar.bz2" compression="bzip2" longfile="gnu">
<tarfileset prefix="${app.name}" dir="${build.path}" includes="app/JBidwatcher.jar"/>
<tarfileset prefix="${app.name}" dir="${main.dir}" includes="lib/*.jar"/>
<tarfileset prefix="${app.name}" dir="${main.dir}" includes="lib/jbidwatcher/**"/>
<tarfileset prefix="${app.name}" dir="${main.dir}/platform" includes="jbidwatcher.sh" filemode="755"/>
</tar>
<delete dir="${build.path}/main" />
</target>
<target name="jar" depends="jar-real">
<echo level="info" message="Building envelope .jar file." />
<mkdir dir="${build.path}/main" />
<copy file="${INTERMEDIATE}" tofile="${build.path}/main/main.jar" />
<manifest file="${ONEJAR_MANIFEST}">
<attribute name="Manifest-Version" value="1.0" />
<attribute name="Ant-Version" value="Apache Ant 1.7.0" />
<attribute name="Created-By" value="1.4.2_04-b05 (Sun Microsystems Inc.)" />
<attribute name="Main-Class" value="com.simontuffs.onejar.Boot" />
<attribute name="One-Jar-Expand" value="expand,doc,file.txt" />
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Version" value="${GITVERSION}"/>
</manifest>
<jar jarfile="${BINARY}" manifest="${ONEJAR_MANIFEST}">
<fileset dir="${main.dir}/onejar" includes="com/**/*.class" />
<fileset dir="${main.dir}/onejar" includes="boot-manifest.mf" />
<fileset dir="${build.path}" includes="main/main.jar" />
<fileset dir="${main.dir}" includes="lib/*.jar" />
<fileset dir="${main.dir}" includes="lib/jbidwatcher/**" />
</jar>
<delete dir="${build.path}/main" />
</target>
<property name="packaging" value="platform" />
<target name="exe" depends="jar">
<antcall target="exe-real" />
</target>
<target name="exe-real">
<exec executable="git" outputproperty="GITVERSION" errorproperty="" failifexecutionfails="no">
<arg line="describe --tags --long"/>
</exec>
<copy file="${INTERMEDIATE}" todir="/tmp"/>
<copy file="${packaging}/jbidwatcher.ico" todir="/tmp"/>
<copy file="${packaging}/jbidwatcher-launch.xml" todir="/tmp">
<filterchain>
<replacetokens begintoken="`" endtoken="`">
<token key="binary" value="${INTERMEDIATE}"/>
<token key="executable" value="${EXEFILE}"/>
<token key="appname" value="${app.name}" />
<token key="version" value="${GITVERSION}" />
</replacetokens>
</filterchain>
</copy>
<exec executable="launch4j" failonerror="true">
<arg line="/tmp/jbidwatcher-launch.xml"/>
</exec>
<delete file="/tmp/jbidwatcher-launch.xml"/>
<delete file="/tmp/${BINARY}"/>
<delete file="/tmp/jbidwatcher.ico"/>
<copy file="/tmp/${EXEFILE}" todir="."/>
<zip destfile="${ZIPFILE}">
<fileset dir="." includes="lib/annotations.jar"/>
<fileset dir="." includes="lib/aopalliance.jar"/>
<fileset dir="." includes="lib/apple.jar"/>
<fileset dir="." includes="lib/derby.jar"/>
<fileset dir="." includes="lib/guice-3.0.jar"/>
<fileset dir="." includes="lib/guice-assistedinject-3.0.jar"/>
<fileset dir="." includes="lib/javax.inject.jar"/>
<fileset dir="." includes="lib/jbidwatcher/**"/>
<fileset dir="." includes="lib/jDeskMetrics.jar"/>
<fileset dir="." includes="lib/jdesktop.jar"/>
<fileset dir="." includes="lib/jl1.0.1.jar"/>
<fileset dir="." includes="lib/jline-2.11.jar"/>
<fileset dir="." includes="lib/jruby-complete.jar"/>
<fileset dir="." includes="lib/json_simple-1.1.jar"/>
<fileset dir="." includes="lib/jsoup-1.7.1.jar"/>
<fileset dir="." includes="lib/jsr305-1.3.9.jar"/>
<fileset dir="." includes="lib/l2fprod-common-fontchooser.jar"/>
<fileset dir="." includes="lib/mahalo.jar"/>
<fileset dir="." includes="lib/mysql-connector-java-5.1.7-bin.jar"/>
<fileset dir="." includes="lib/readline.jar"/>
<fileset dir="." includes="lib/txtmark.jar"/>
<fileset dir="." includes="${EXEFILE}"/>
<fileset dir="platform" includes="jbidwatcher.ico"/>
</zip>
</target>
<target name="osx" depends="jar">
<antcall target="clean-osx-build" />
<antcall target="osx-distribution" />
<antcall target="osx-app" />
</target>
<target name="dmg" depends="osx-distribution">
<copy todir="${osx.app.path}/Contents/Resources/Java">
<fileset dir="${lib.dir}" includes="jruby-complete.jar" />
<fileset dir="${lib.dir}" includes="jline-2.11.jar" />
<fileset dir="${lib.dir}" includes="readline.jar" />
<fileset dir="${main.dir}" includes="lib/jbidwatcher/**" />
</copy>
<antcall target="dmg-real" />
</target>
<target name="dmg-real">
<exec executable="ln">
<arg value="-s" />
<arg value="/Applications" />
<arg value="${osx.app.path}/../Applications" />
</exec>
<copy todir="${osx.app.path}/../" file="COPYING.html" />
<exec executable="mkisofs">
<arg line='-V JBidwatcher -r -hide-rr-moved -apple -o ${DMGFILE} "${osx.app.path}/.."'/>
</exec>
<delete file="${osx.app.path}/../COPYING.html"/>
<!-- This has to be calling 'rm' because the 'delete' task doesn't handle symlinks right. -->
<exec executable="rm">
<arg value="${osx.app.path}/../Applications" />
</exec>
</target>
<target name="osx-development" depends="osx-distribution">
<copy todir="${dest.dir}/${osx.app.name}">
<fileset dir="${osx.app.path}" includes="**" />
</copy>
</target>
<target name="osx-distribution">
<delete dir="${osx.app.path}" />
<mkdir dir="${osx.app.path}" />
<mkdir dir="${osx.app.path}/Contents" />
<mkdir dir="${osx.app.path}/Contents/MacOS" />
<mkdir dir="${osx.app.path}/Contents/Resources" />
<mkdir dir="${osx.app.path}/Contents/Resources/Java" />
<mkdir dir="${osx.app.path}/Contents/Frameworks"/>
<!-- The Sparkle Framework must also be copied into the application package -->
<unzip src="${sparkle.dir}/Sparkle.framework.zip" dest="${osx.app.path}/Contents/Frameworks"/>
<!-- The Ant unzip task does not preserve symlinks, so we recreate them -->
<symlink link="${osx.app.path}/Contents/Frameworks/Sparkle.framework/Versions/Current" resource="./A"/>
<symlink link="${osx.app.path}/Contents/Frameworks/Sparkle.framework/Headers" resource="./Versions/Current/Headers"/>
<symlink link="${osx.app.path}/Contents/Frameworks/Sparkle.framework/Resources" resource="./Versions/Current/Resources"/>
<symlink link="${osx.app.path}/Contents/Frameworks/Sparkle.framework/Sparkle" resource="./Versions/Current/Sparkle"/>
<symlink link="${osx.app.path}/Contents/Frameworks/Sparkle.framework/Resources/fr_CA.lproj" resource="./fr.lproj"/>
<!-- Restore the file permissions to the Sparkle relaunch tool -->
<chmod file="${osx.app.path}/Contents/Frameworks/Sparkle.framework/Resources/relaunch" perm="ugo+rx"></chmod>
<copy file="${packaging}/Info.plist" todir="${osx.app.path}/Contents">
<filterchain>
<replacetokens begintoken="`" endtoken="`">
<token key="binary" value="${INTERMEDIATE}" />
<token key="version" value="${GITVERSION}" />
<token key="friendly_version" value="${VER}" />
<token key="appname" value="${app.name}" />
</replacetokens>
</filterchain>
</copy>
<copy file="${packaging}/JavaApplicationStub" todir="${osx.app.path}/Contents/MacOS" />
<chmod file="${osx.app.path}/Contents/MacOS/JavaApplicationStub" perm="755" />
<copy file="${packaging}/Info.plist" todir="${osx.app.path}/Contents" />
<copy file="${packaging}/PkgInfo" todir="${osx.app.path}/Contents" />
<copy file="${sparkle.dir}/dsa_pub.pem" todir="${osx.app.path}/Contents/Resources/"/>
<copy file="${packaging}/jbidicon.icns" todir="${osx.app.path}/Contents/Resources" />
<copy file="${packaging}/quaqua.jar" todir="${osx.app.path}/Contents/Resources/Java" />
<copy file="${packaging}/nonap.jar" todir="${osx.app.path}/Contents/Resources/Java" />
<copy file="${packaging}/libquaqua.jnilib" todir="${osx.app.path}/Contents/Resources/Java" />
<copy file="${packaging}/libquaqua64.jnilib" todir="${osx.app.path}/Contents/Resources/Java" />
<copy file="${packaging}/libNoNap.jnilib" todir="${osx.app.path}/Contents/Resources/Java" />
<copy file="${packaging}/libsparkle_init.dylib" todir="${osx.app.path}/Contents/Resources/Java/"/>
<chmod file="${osx.app.path}/Contents/Resources/Java/libquaqua.jnilib" perm="755" />
<chmod file="${osx.app.path}/Contents/Resources/Java/libquaqua64.jnilib" perm="755" />
<chmod file="${osx.app.path}/Contents/Resources/Java/libNoNap.jnilib" perm="755" />
<chmod file="${osx.app.path}/Contents/Resources/Java/libsparkle_init.dylib" perm="755" />
<symlink link="${osx.app.path}/Contents/Resources/Java/libsparkle_init.jnilib" resource="libsparkle_init.dylib" />
<copy file="${dest.dir}/${INTERMEDIATE}" todir="${osx.app.path}/Contents/Resources/Java" />
<!--- Put all the libraries in the resources directory -->
<copy todir="${osx.app.path}/Contents/Resources/Java">
<fileset dir="${lib.dir}" includes="apple.jar" />
<fileset dir="${lib.dir}" includes="aopalliance.jar" />
<fileset dir="${lib.dir}" includes="derby.jar" />
<fileset dir="${lib.dir}" includes="guice-3.0.jar" />
<fileset dir="${lib.dir}" includes="guice-assistedinject-3.0.jar" />
<fileset dir="${lib.dir}" includes="jdesktop.jar" />
<fileset dir="${lib.dir}" includes="javax.inject.jar" />
<fileset dir="${lib.dir}" includes="jl1.0.1.jar" />
<fileset dir="${lib.dir}" includes="jsoup-1.7.1.jar" />
<fileset dir="${lib.dir}" includes="mahalo.jar" />
<fileset dir="${lib.dir}" includes="jsr305-1.3.9.jar" />
<fileset dir="${lib.dir}" includes="jDeskMetrics.jar" />
<fileset dir="${lib.dir}" includes="txtmark.jar" />
<fileset dir="${lib.dir}" includes="json_simple-1.1.jar" />
<fileset dir="${lib.dir}" includes="l2fprod-common-fontchooser.jar" />
<fileset dir="${lib.dir}" includes="mysql-connector-java-5.1.7-bin.jar" />
</copy>
</target>
<target name="osx-bundle">
<exec executable="/usr/libexec/java_home" outputproperty="JAVA_HOME"/>
<exec executable="git" outputproperty="GITVERSION" errorproperty="" failifexecutionfails="no">
<arg line="describe --tags --long"/>
</exec>
<bundleapp outputdirectory="dist" name="JBidwatcher" displayname="JBidwatcher" identifier="com.jbidwatcher.JBidwatcher"
mainclassname="com.jbidwatcher.app.JBidWatch" icon="platform/jbidicon.icns" signature="JBid" shortversion="${VER}"
allowhttp="true" includejavaroot="true" version="${GITVERSION}">
<classpath file="JBidwatcher.jar"/>
<classpath file="lib/*.jar"/>
<classpath file="platform/*.jar"/>
<classpath file="platform/*.jnilib"/>
<classpath file="platform/libsparkle_init.dylib"/>
<classpath file="lib"/>
<runtime dir="${JAVA_HOME}"/>
<option value="-Xms128m"/>
<option value="-Xmx768m"/>
<option value="-Dapple.laf.useScreenMenuBar=true"/>
<option value="-Dapple.awt.graphics.useQuartz=true"/>
<option value="-Dapple.awt.showGrowBox=true"/>
<option value="-Dapple.awt.brushMetalLook=false"/>
<option value="-Dapple.awt.window.position.forceSafeCreation=true"/>
<option value="-Dapple.awt.window.position.forceSafeProgrammaticPositioning=true"/>
<option value="-Dapple.awt.window.position.forceSafeUserPositioning=true"/>
<plistentry key="SUCheckAtStartup" value="YES"/>
<plistentry key="SUScheduledCheckInterval" value="86400"/>
<plistentry key="SUPublicDSAKeyFile" value="dsa_pub.pem"/>
<plistentry key="SUFeedURL" value="https://www.jbidwatcher.com/sparkle/updates.xml"/>
<plistentry key="SUShowReleaseNotes" value="YES"/>
<arch name="x86_64"/>
<arch name="i386"/>
</bundleapp>
<delete verbose="true">
<fileset dir="dist" includes="**/*fx*"/>
</delete>
<!-- The Sparkle Framework must also be copied into the application package -->
<unzip src="${sparkle.dir}/Sparkle.framework.zip" dest="dist/JBidwatcher.app/Contents/Frameworks"/>
<!-- The Ant unzip task does not preserve symlinks, so we recreate them -->
<symlink link="dist/JBidwatcher.app/Contents/Frameworks/Sparkle.framework/Versions/Current" resource="./A"/>
<symlink link="dist/JBidwatcher.app/Contents/Frameworks/Sparkle.framework/Headers" resource="./Versions/Current/Headers"/>
<symlink link="dist/JBidwatcher.app/Contents/Frameworks/Sparkle.framework/Resources" resource="./Versions/Current/Resources"/>
<symlink link="dist/JBidwatcher.app/Contents/Frameworks/Sparkle.framework/Sparkle" resource="./Versions/Current/Sparkle"/>
<symlink link="dist/JBidwatcher.app/Contents/Frameworks/Sparkle.framework/Resources/fr_CA.lproj" resource="./fr.lproj"/>
<!-- Restore the file permissions to the Sparkle relaunch tool -->
<chmod file="dist/JBidwatcher.app/Contents/Frameworks/Sparkle.framework/Resources/relaunch" perm="ugo+rx"/>
<copy file="${sparkle.dir}/dsa_pub.pem" todir="dist/JBidwatcher.app/Contents/Resources/"/>
<copy todir="dist/JBidwatcher.app/Contents/Java">
<fileset dir="${main.dir}" includes="lib/jbidwatcher/**"/>
</copy>
<chmod file="dist/JBidwatcher.app/Contents/Java/libquaqua.jnilib" perm="755"/>
<chmod file="dist/JBidwatcher.app/Contents/Java/libquaqua64.jnilib" perm="755"/>
<chmod file="dist/JBidwatcher.app/Contents/Java/libNoNap.jnilib" perm="755"/>
<copy file="${packaging}/libsparkle_init.dylib" tofile="dist/JBidwatcher.app/Contents/MacOS/libsparkle_init.jnilib"/>
<copy file="dist/JBidwatcher.app/Contents/MacOS/JavaAppLauncher" tofile="dist/JBidwatcher.app/Contents/MacOS/JavaApplicationStub"/>
<chmod file="dist/JBidwatcher.app/Contents/MacOS/libsparkle_init.jnilib" perm="755"/>
</target>
<target name="osx-app">
<copy todir="${osx.app.path}/Contents/Resources/Java">
<fileset dir="${lib.dir}" includes="readline.jar" />
<fileset dir="${lib.dir}" includes="jline-2.11.jar" />
<fileset dir="${lib.dir}" includes="jruby-complete.jar" />
<fileset dir="${main.dir}" includes="lib/jbidwatcher/**" />
</copy>
<tar destfile="${APPFILE}" compression="gzip" longfile="gnu">
<tarfileset dir="${osx.app.path}" prefix="${app.name}.app" mode="755">
<include name="Contents/MacOS/JavaApplicationStub"/>
<include name="Contents/Resources/Java/libquaqua.jnilib"/>
<include name="Contents/Resources/Java/libNoNap.jnilib"/>
</tarfileset>
<tarfileset dir="${osx.app.path}" prefix="${app.name}.app">
<include name="**"/>
<exclude name="Contents"/>
<exclude name="Contents/MacOS"/>
<exclude name="Contents/Resources"/>
<exclude name="Contents/Resources/Java"/>
<exclude name="Contents/MacOS/JavaApplicationStub"/>
<exclude name="Contents/Resources/Java/libquaqua.jnilib"/>
<exclude name="Contents/Resources/Java/libNoNap.jnilib"/>
</tarfileset>
</tar>
</target>
<target name="clean-osx-build">
<delete dir="${osx.app.path}" />
<delete dir="${dest.dir}/${osx.app.name}" />
</target>
<target name="clean" description="Clean all build products.">
<echo level="info" message="Clean all build products." />
<delete file="${BINARY}" />
<delete file="${INTERMEDIATE}" />
<delete file="${UNOPT_BIN}" />
<delete file="${TARFILE}" />
<delete file="${APPFILE}" />
<delete file="${EXEFILE}" />
<delete file="${DMGFILE}" />
<delete includeEmptyDirs="true" dir="osx"/>
<delete dir="${log.dir}" />
<delete dir="${build.dir}" />
<delete dir="META-INF" />
<antcall target="clean-osx-build" />
<!-- Delete intermediate files in case they still are around -->
<delete file="${build.path}/main/main.jar" />
<delete file="/tmp/jbidwatcher-launch.xml"/>
<delete file="/tmp/${BINARY}"/>
<delete file="/tmp/jbidwatcher.ico"/>
</target>
<target name="apps" depends="tar,osx,exe,dmg" />
<target name="release" depends="apps" description="Build for a full release.">
<property name="server.path" value="jbidwatcher@jbidwatcher.com:www/enhanced/downloads" />
<antcall target="upload" />
</target>
<target name="beta" depends="apps" description="Build for a pre-release version.">
<property name="server.path" value="jbidwatcher@jbidwatcher.com:www/htdocs/beta" />
<antcall target="upload" />
</target>
<target name="alpha" depends="apps" description="Build for an alpha or beta version.">
<property name="server.path" value="jbidwatcher@jbidwatcher.com:www/htdocs/alpha" />
<antcall target="upload" />
</target>
<target name="enhanced" depends="apps" description="Build a pre-release for the enhanced site.">
<property name="server.path" value="jbidwatcher@jbidwatcher.com:www/enhanced/downloads" />
<antcall target="upload" />
</target>
<target name="upload" description="Upload the code to a given destination">
<scp verbose="true" todir="${server.path}" keyfile="${env.HOME}/.ssh/id_rsa" passphrase="">
<fileset dir="${main.dir}">
<include name="${BINARY}" />
<include name="${APPFILE}" />
<include name="${EXEFILE}" />
<include name="${ZIPFILE}" />
<include name="${TARFILE}" />
<include name="${DMGFILE}" />
</fileset>
</scp>
</target>
<target name="run" description="Start Application">
<java fork="true" jar="${BINARY}" args="-Xmx512m -Xms256m"/>
</target>
</project>