Codebase list libflexdock-java / debian/0.5.1-dfsg1-2 build.xml
debian/0.5.1-dfsg1-2

Tree @debian/0.5.1-dfsg1-2 (Download .tar.gz)

build.xml @debian/0.5.1-dfsg1-2raw · history · blame

  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
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
<?xml version="1.0"?>
<project name="flexdock" basedir="." default="build.default">

   <!-- Pull properties that are specific to the working copy environment.
        For instance if your sdk is in a different location that C:\jdk1.5.0_03,
        then specify where it is in this properties file.
   -->
   <property file="workingcopy.properties" />

   <!-- This is the default location of the JDK to compile native DLL/so against.
        If your JDK is in a different location then create a
        workingcopy.properties and set sdk.home to your preferred value there -->
   <property name="sdk.home" value="c:/jdk1.5.0._03"/>
   <property name="sdk.include" value="${sdk.home}/include"/>

   <!-- build-source properties -->
   <property name="java.src" value="${basedir}/src/java" />
   <property name="webstart.src" value="${basedir}/src/webstart" />
   <property name="lib.dir" value="${basedir}/lib" />
   <property name="java.src.core" value="${java.src}/core" />
   <property name="java.src.demo" value="${java.src}/demo" />
   <property name="java.src.dockbar" value="${java.src}/dockbar" />
   <property name="java.src.drag" value="${java.src}/drag" />
   <property name="java.src.perspective" value="${java.src}/perspective" />
   <property name="java.src.plaf" value="${java.src}/plaf" />
   <property name="java.src.test" value="${java.src}/test" />
   <property name="java.src.view" value="${java.src}/view" />

   <property name="resource.dir" value="${basedir}/resources" />

   <!-- build-output properties -->
   <property name="build.dir" value="${basedir}/build" />
   <property name="doc.dir" value="${build.dir}/docs" />
   <property name="doc.api.dir" value="${doc.dir}/api" />
   <property name="bin.dir" value="${build.dir}/bin" />
   <property name="bin.dir.demo" value="${build.dir}/bin-demo" />
   <property name="bin.dir.test" value="${build.dir}/bin-test" />
   <property name="bin.dir.webstart" value="${build.dir}/webstart" />
   <property name="dist.dir" value="${build.dir}/dist" />
   <property name="version" value="0.5.1" />
   <property name="dist.jar.basename" value="${ant.project.name}-${version}" />
   <property name="dist.demo.jar.basename" value="${ant.project.name}-demo-${version}" />

   <!-- sourcepaths -->
   <path id="sourcepath">
      <pathelement location="${java.src.core}" />
      <pathelement location="${java.src.dockbar}" />
      <pathelement location="${java.src.drag}" />
      <pathelement location="${java.src.perspective}" />
      <pathelement location="${java.src.plaf}" />
      <pathelement location="${java.src.view}" />
   </path>

   <!-- classpaths -->
   <path id="javac.classpath">
      <pathelement location="${bin.dir}" />
      <fileset dir="${lib.dir}" includes="skinlf*.jar" />
	  <fileset dir="${lib.dir}" includes="commons-logging*.jar" />
   </path>
   <path id="javac.classpath.demo">
      <path refid="javac.classpath" />
      <pathelement location="${lib.dir}/jmf/lib/jmf.jar" />
      <pathelement location="${lib.dir}/looks-2.1.1.jar" />
   </path>
   <path id="javac.classpath.test">
      <path refid="javac.classpath" />
      <pathelement location="${bin.dir.demo}" />
   </path>

   <path id="rt.classpath">
      <pathelement location="${bin.dir}"/>
   </path>
   <path id="rt.classpath.demo">
      <pathelement location="${bin.dir.demo}"/>
      <pathelement location="${lib.dir}/jmf.jar"/><!-- needed only for JMF demo -->
      <pathelement location="${bin.dir}"/>
	  <pathelement location="${lib.dir}/commons-logging-1.1.jar"/>
   </path>
   <path id="rt.classpath.test">
      <pathelement location="${bin.dir.test}"/>
      <pathelement location="${bin.dir}"/>
      <pathelement location="${bin.dir.demo}"/> <!-- needed for a couple of the tests -->
	  <pathelement location="${lib.dir}/commons-logging-1.1.jar"/>
	  <pathelement location="${lib.dir}/skinlf.jar"/>
   </path>

   <!-- build targets -->
   <target name="build.default" depends="clean, resources, compile"
           description="Build the project without compiling the DLL/so"/>
   <target name="build.with.native" depends="clean, resources, compile, compile.native"
           description="Build the project including compiling the DLL/so"/>

   <target name="build.with.dll">
      <fail>
         Use the target build.with.native instead.
      </fail>
   </target>

   <target name="clean" description="Remove all derived files">
      <!-- This way of deleting will not fail if run repeatedly, will delete the dirs,
           and will also fail if we are unable to delete a file or dir too. -->
      <delete includeemptydirs="true" failonerror="true">
         <fileset dir="${basedir}" defaultexcludes="no">
            <include name="build/**"/>
         </fileset>
      </delete>
   </target>

   <target name="init">
      <mkdir dir="${bin.dir}" />
      <mkdir dir="${bin.dir.demo}" />
      <mkdir dir="${bin.dir.test}" />
      <mkdir dir="${dist.dir}" />

      <condition property="os.windows">
         <os family="windows"/>
      </condition>
      <condition property="os.unixWithXlib">
         <and>
            <os family="unix"/>
            <available file="/usr/X11R6/include/X11/Xlib.h"/>
         </and>
      </condition>
   </target>

   <target name="resources" depends="init"
           description="Copy non-compiled files from resource dirs to binXXX dirs">
      <copy todir="${bin.dir}">
         <fileset dir="${resource.dir}/core" excludes="org/flexdock/util/dev-props.properties" />
         <fileset dir="${resource.dir}/plaf" />
      </copy>
      <copy todir="${bin.dir.demo}">
         <fileset dir="${resource.dir}/demo" />
      </copy>
   </target>

   <target name="compile" depends="init, resources"
           description="Compile java sources for the framework, demos, and tests">
      <javac classpathref="javac.classpath" destdir="${bin.dir}" debug="true" source="1.4">
         <src path="${java.src.core}" />
         <!-- the next 3 are interdependent -->
         <src path="${java.src.view}"/>
         <src path="${java.src.plaf}"/>
         <src path="${java.src.dockbar}"/>
         <src path="${java.src.drag}"/>
         <src path="${java.src.perspective}"/>
      </javac>
      <javac classpathref="javac.classpath.demo" srcdir="${java.src.demo}" destdir="${bin.dir.demo}" debug="true" source="1.4"/>
      <javac classpathref="javac.classpath.test" srcdir="${java.src.test}" destdir="${bin.dir.test}" debug="true" source="1.4"/>
   </target>


   <target name="compile.native" depends="compile.dll,compile.unix.lib"
           description="Compile the native code for the current platform"/>

   <target name="native.init" depends="init">
      <available file="${sdk.include}" type="dir" property="sdk.include.available"/>
      <fail unless="sdk.include.available">

         ERROR:
         The sdk.include property is set to: ${sdk.include}

         This directory does not exist but is required in order to compile
         native libraries.  To set this property for your environment create
         a workingcopy.properties (copying from workingcopy.properties-sample)
         and edit the sdk.home property to reference your JDK's root directory,
         or if your JDK's include directory isn't located under the sdk.home dir
         in the dir named include, then set sdk.include to reference the include
         directory containing the jni.h file.
      </fail>

      <!-- The following crazy logic builds a gcc -I arg for each dir in and under
           the sdk.include path.  This is avoid having to hard code OS/os-family specific
           include subdir names.  For example, the only difference betwee linux and freebsd
           compiles is the name of the include subdir. -->
      <path id="sdk.include.dirset">
         <dirset dir="${sdk.include}"/>
      </path>
      <pathconvert property="sdk.include.gcc.args.temp"
                   refid="sdk.include.dirset"
                   pathsep='" "-I'/>
      <property name="sdk.include.gcc.args" value='"-I${sdk.include.gcc.args.temp}"'/>
   </target>


   <target name="compile.dll.init" depends="native.init" if="os.windows">
      <available file="${mingw.home}" type="dir" property="mingw.home.available"/>
      <fail unless="mingw.home.available">

         ERROR:
         The mingw.home property is set to: ${mingw.home}

         This directory does not exist but is required in order to compile
         native libraries.  To set this property for your environment create
         a workingcopy.properties (copying from workingcopy.properties-sample)
         and edit the mingw.home property to reference the location where you
         installed MinGW 3.1.0 (see http://www.mingw.org for download).
      </fail>
      <property environment="env"/>
      <presetdef name="gcc.mingw">
         <exec executable="${mingw.home}/bin/gcc" failonerror="true">
            <env key="Path" value="${mingw.home}/bin${path.separator}${env.Path}"/>
         </exec>
      </presetdef>
   </target>

   <!--
       This target compiles the RubberBand.dll.  It will only run if on Windows.
       It requires the version of gcc available from http://www.mingw.org/ to build.  It will
       not build with the version of gcc installed by cygwin with mingw support.
   -->
   <target name="compile.dll" depends="compile.dll.init" if="os.windows"
           description="Compile the DLL if you're on Windows">

      <property name="c.dir" value="${basedir}\src\c\core\org\flexdock\docking\drag\outline\win32" />
      <property name="dll.dir" value="${basedir}\bin\org\flexdock\docking\drag\outline\win32" />

      <!-- Cleanup existing DLL or ensure the dir exists -->
      <delete file="${dll.dir}/RubberBand.dll" failonerror="false" />
      <mkdir dir="${dll.dir}"/>

      <!-- Create the object file -->
      <gcc.mingw>
         <arg value='-c'/>
         <arg value='-o'/>
         <arg value='${java.io.tmpdir}\RubberBand.o' />
         <arg value='${c.dir}\RubberBand.c' />
         <arg line='${sdk.include.gcc.args}'/> <!-- potentially multiple include dirs -->
      </gcc.mingw>
      <!-- Link the shared resource -->
      <gcc.mingw>
         <arg value="-mwindows" />
         <arg value="-shared" />
         <arg value="-o" />
         <arg value="${dll.dir}\RubberBand.dll" />
         <arg value="${java.io.tmpdir}\RubberBand.o" />
         <arg value="${c.dir}\RubberBand.def" />
      </gcc.mingw>
   </target>

   <target name="showOsLibraryKeychain"
           description="Demonstrates the lookup order for .so libraries by listing the suffix appended to the base file name when attempting to locate the most appropriate library." >
      <java fork="yes" dir="${bin.dir}" classpathref="rt.classpath" classname="org.flexdock.util.OsInfo"/>
   </target>
   
   <macrodef name="getprefixlibrarykey" description="Invokes org.flexdock.util.OsInfo then parses the default library key from the output into the property named in the property attribute of this macro.">
      <!--
          This macro could be done via an ant task, but I opted to
          do it this way to cut down on the complexity by not creating an
          ant source dir, having to compile it, and run the task in process,
          not to mention deal with the issues of getting it to build cleanly
          in a variety of different eclipse versions. -->
      <attribute name="property"/>
      <sequential>
         <tempfile property="@{property}~temp.file" destdir="${build.dir}" prefix=".osinfo-"/>
         <java fork="yes"
               dir="${bin.dir}" classpathref="rt.classpath"
               classname="org.flexdock.util.OsInfo"
               output="${@{property}~temp.file}" failonerror="true"/>
         <loadfile property="@{property}" srcFile="${@{property}~temp.file}">
            <filterchain>
               <linecontains>
                  <contains value="Default Library Key"/>
               </linecontains>
               <tokenfilter>
                  <filetokenizer/>
                  <replaceregex pattern=".*Key:\s+(.+)[\n\r]+" replace="-\1" flags="s"/>
               </tokenfilter>
            </filterchain>
         </loadfile>
         <delete file="${@{property}~temp.file}"/>
      </sequential>
   </macrodef>

   <!--
       This target compiles the libRubberBand.so.  It will only run if on a UNIX os.
       It requires that gcc and X11 includes and libraries  installed.
   -->
   <target name="compile.unix.lib" depends="native.init,compile,resources" if="os.unixWithXlib" 
           description="Compile the shared library if you're on a UNIX of some sort">

      <getprefixlibrarykey property="library.key"/>

      <property name="c.dir" value="${basedir}/src/c/core/org/flexdock/docking/drag/outline/xlib"/>
      <property name="so.dir" value="${build.dir}/bin/org/flexdock/docking/drag/outline/xlib"/>


      <!-- Cleanup existing .so or ensure the dir exists -->
      <delete file="${so.dir}/libRubberBand${library.key}.so" failonerror="false"/>
      <mkdir dir="${so.dir}"/>

      <exec executable="gcc" failonerror="true">
         <arg value="-lX11"/>
         <arg value="-L/usr/X11R6/lib"/>
         <arg value="-I/usr/X11R6/include"/>
         <arg value="-o"/>
         <arg value="${so.dir}/libRubberBand${library.key}.so"/>
         <arg value="-shared"/>
         <arg value="${c.dir}/RubberBand.c"/>
         <arg line='${sdk.include.gcc.args}'/> <!-- potentially multiple include dirs -->
      </exec>
   </target>

   <target name="jar" depends="init, resources, compile"
           description="Produce a jar usable in the classpath of an app using the flexdock framework">

      <condition property="jar.suffix" value="-generic">
         <isset property="generic.jar"/>
      </condition>
      <condition property="jar.excludes" value="**/*.so,**/*.dll">
         <!-- Will only exclude native code, the corresponding Java classes aren't being excluded for simplicity's sake
              but EffectsFactory/Utilities can handle this properly -->
         <isset property="generic.jar"/>
      </condition>
      <property name="jar.suffix" value=""/>
      <property name="jar.excludes" value=""/>


      <!-- after this method is called, other targets can use these props -->
      <property name="dist.jar.name"
                value="${dist.jar.basename}${jar.suffix}.jar"/>
      <property name="dist.demo.jar.name"
                value="${dist.demo.jar.basename}.jar"/>



      <jar jarfile="${build.dir}/${dist.jar.name}" basedir="${bin.dir}" excludes="${jar.excludes}"/>

      <!-- Don't try to make a generic demo jar, 
           here shouldn't be native code in the demos. -->
      <jar jarfile="${build.dir}/${dist.demo.jar.name}" basedir="${bin.dir.demo}" excludes="${jar.excludes}">
         <!-- NOTE: don't use index="true", the classpath lookup of the other jar will not work.
              See: http://forum.java.sun.com/thread.jspa?forumID=22&threadID=568620,
              I believe this BUG is the cause: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4490798 -->
         <manifest>
            <!-- matches core jar name -->
            <attribute name="Class-Path" value="${dist.jar.name} lib/commons-logging-1.1.jar lib/jmf/lib/jmf.jar lib/looks-2.1.1.jar"/> 
            <attribute name="Main-Class" value="org.flexdock.demos.AllDemos"/>
         </manifest>
      </jar>

      <mkdir dir="${build.dir}/lib"/>
      <copy todir="${build.dir}/lib">
         <fileset dir="${lib.dir}"/>
      </copy>
   </target>

   <target name="doc" depends="init, javadoc"
           description="Copy distributable docs to output docs dir and generate javadocs">
      <copy todir="${doc.dir}">
         <fileset dir="docs" includes="**/*.pdf"/>
      </copy>
      <copy todir="${build.dir}" file="${basedir}/LICENSE.txt"/>
   </target>

   <target name="javadoc" depends="init" unless="javadoc.skip"
           description="Generate javadoc for the framework">
      <javadoc destdir="${doc.api.dir}" sourcepathref="sourcepath" classpathref="javac.classpath">
         <packageset dir="${java.src.core}" />
         <packageset dir="${java.src.dockbar}" />
         <packageset dir="${java.src.drag}" />
         <packageset dir="${java.src.perspective}" />
         <packageset dir="${java.src.view}" />
         <link href="http://java.sun.com/j2se/1.4.2/docs/api/" />
         <!-- add links to the j2se 1.4 docs -->
      </javadoc>
   </target>

   <target name="dist" depends="dist.src,dist.bin"
           description="Builds the binary and source distributions"/>

   <!-- creates a source distribution -->
   <target name="dist.src" depends="init"
           description="Produce a zip containing all sources necessary to build the project">
      <zip destfile="${dist.dir}/${dist.jar.basename}-src.zip">
         <fileset dir="${basedir}">
            <exclude name="build/**"/>
            <exclude name="bin/**"/>
            <exclude name="bin-demo/**"/>
            <exclude name="bin-test/**"/>
            <exclude name="dist/**"/>
            <exclude name="docs/api/**"/>
            <exclude name="workingcopy.properties"/>
            <exclude name="signing.properties"/>
            <exclude name="www/**"/>
         </fileset>
      </zip>
      <!-- TODO: ensure that ZIP has DOS EOLs if not built on Windows -->
      <!-- TODO: build *NIX tar.gz -->
   </target>

   <target name="dist.bin" depends="init,jar,doc"
           description="Produce a zip containing the built library, docs, javadocs, and license">
      <zip destfile="${dist.dir}/${dist.jar.basename}.zip">
         <fileset dir="${basedir}">
            <include name="LICENSE.txt"/>
            <include name="README"/>
         	<include name="release-notes.txt"/>
      		<include name="lib/**"/> 
         </fileset>
         <fileset dir="${build.dir}">
            <include name="${dist.jar.basename}.jar"/>
            <include name="${dist.demo.jar.basename}.jar"/>
            <include name="docs/**" />
         </fileset>
      </zip>
      <!-- TODO: ensure that ZIP has DOS EOLs if not built on Windows -->
      <!-- TODO: build *NIX tar.gz -->
   </target>


   <!-- define a java task preset to run demos forked from the demo bin dir with the right stuff in the classpath -->
   <presetdef name="java.demo">
      <java fork="yes" dir="${bin.dir.demo}" classpathref="rt.classpath.demo" />
   </presetdef>

   <!-- Targets to run demos -->

   <target name="demo" depends="resources,compile" description="Run org.flexdock.demos.AllDemos">
      <java.demo classname="org.flexdock.demos.AllDemos" />
   </target>

   <target name="demo.maximizing" depends="resources,compile" description="Run org.flexdock.demos.maximizing.MaximizationDemo">
      <java.demo classname="org.flexdock.demos.perspective.MaximizationDemo" />
   </target>

   <target name="demo.perspectives" depends="resources,compile" description="Run org.flexdock.demos.perspective.PerspectivesDemo">
      <java.demo classname="org.flexdock.demos.perspective.PerspectivesDemo" />
   </target>

   <target name="demo.xmlperspectives" depends="resources,compile" description="Run org.flexdock.demos.perspective.XMLPerspectivesDemo">
      <java.demo classname="org.flexdock.demos.perspective.XMLPerspectivesDemo" />
   </target>

   <target name="demo.adapter" depends="resources,compile" description="Run org.flexdock.demos.raw.adapter.AdapterDemo">
      <java.demo classname="org.flexdock.demos.raw.adapter.AdapterDemo" />
   </target>

   <target name="demo.border" depends="resources,compile" description="Run org.flexdock.demos.raw.border.BorderDemo">
      <java.demo classname="org.flexdock.demos.raw.border.BorderDemo" />
   </target>

   <target name="demo.compound" depends="resources,compile" description="Run org.flexdock.demos.raw.CompoundDemo">
      <java.demo classname="org.flexdock.demos.raw.CompoundDemo" />
   </target>

   <target name="demo.elegant" depends="resources,compile" description="Run org.flexdock.demos.raw.elegant.ElegantDemo">
      <java.demo classname="org.flexdock.demos.raw.elegant.ElegantDemo" />
   </target>

   <target name="demo.jmf" depends="resources,compile" description="Run org.flexdock.demos.raw.jmf.JMFDemo">
      <java.demo classname="org.flexdock.demos.raw.jmf.JMFDemo" />
   </target>

   <target name="demo.simple" depends="resources,compile" description="Run org.flexdock.demos.raw.SimpleDemo">
      <java.demo classname="org.flexdock.demos.raw.SimpleDemo" />
   </target>

   <target name="demo.splitpane" depends="resources,compile" description="Run org.flexdock.demos.raw.SplitPaneDemo">
      <java.demo classname="org.flexdock.demos.raw.SplitPaneDemo" />
   </target>

   <target name="demo.tabbedpane" depends="resources,compile" description="Run org.flexdock.demos.raw.TabbedPaneDemo">
      <java.demo classname="org.flexdock.demos.raw.TabbedPaneDemo" />
   </target>

   <target name="demo.view" depends="resources,compile" description="Run org.flexdock.demos.view.ViewDemo">
      <java.demo classname="org.flexdock.demos.view.ViewDemo" />
   </target>


   <!-- define a java task preset to run tests forked from the test bin dir with the right stuff in the classpath -->
   <presetdef name="java.test">
      <java fork="yes" dir="${bin.dir.test}" classpathref="rt.classpath.test" />
   </presetdef>

   <!-- Targets to run tests -->

   <target name="test.rubberband" depends="resources,compile" description="Run org.flexdock.test.drag.RubberBandTest">
      <java.test classname="org.flexdock.test.drag.RubberBandTest" />
   </target>

   <target name="test.basicdockbar" depends="resources,compile" description="Run org.flexdock.test.dockbar.BasicDockbarTest">
      <java.test classname="org.flexdock.test.dockbar.BasicDockbarTest" />
   </target>

   <target name="test.complexdockbar" depends="resources,compile" description="Run org.flexdock.test.dockbar.ComplexDockbarTest">
      <java.test classname="org.flexdock.test.dockbar.ComplexDockbarTest" />
   </target>

   <target name="test.viewrestoration" depends="resources,compile" description="Run org.flexdock.test.perspective.ViewRestorationTest">
      <java.test classname="org.flexdock.test.perspective.ViewRestorationTest" />
   </target>

   <target name="test.sibling" depends="resources,compile" description="Run org.flexdock.test.SiblingTest">
      <java.test classname="org.flexdock.test.SiblingTest" />
   </target>

   <target name="test.viewframe" depends="resources,compile" description="Run org.flexdock.test.view.ViewFrameTest">
      <java.test classname="org.flexdock.test.view.ViewFrameTest" />
   </target>

   <target name="test.view" depends="resources,compile" description="Run org.flexdock.test.view.ViewTest">
      <java.test classname="org.flexdock.test.view.ViewTest" />
   </target>


   <target name="cvs.up">
      <cvs command="up -d -P"/>
   </target>




   
   <macrodef name="mysignjar">
      <attribute name="jarname"/>
      <attribute name="sjarname"/>
      <sequential>
         <available file="signing.properties"
                    property="signing.properties.available"/>
         <fail unless="signing.properties.available">The file signing.properties must exist in order to sign jar files.</fail>

         <property file="signing.properties" prefix="signing"/>
         <condition property="signing.properties.allPropsDefined">
            <and>
               <isset property="signing.alias"/>
               <isset property="signing.keystore.file"/>
               <isset property="signing.keystore.passwd"/>
               <isset property="signing.key.passwd"/>
            </and>
         </condition>
         <fail unless="signing.properties.allPropsDefined">
The signing.properties file must specify all of the following properties:

  alias=[the alias to sign the jar with]
  keystore.file=[the location of the keystore]
  keystore.passwd=[the password for accessing the keystore]
  key.passwd=[the password of the private key in the keystore]
         </fail>

         <signjar
            alias="${signing.alias}"
            jar="@{jarname}"
            signedjar="@{sjarname}"
            keystore="${signing.keystore.file}"
            storepass="${signing.keystore.passwd}"
            keypass="${signing.key.passwd}"
            lazy="true"/>
      </sequential>
   </macrodef>

   <target name="webstartapp" depends="init,jar" description="Create Web Start Version">
      <copy todir="${bin.dir.webstart}">
         <fileset dir="${webstart.src}"/>
         <filterset begintoken="@" endtoken="@">
            <filter token="VERSION" value="${version}"/>
            <filter token="DEMO_JAR_NAME" value="${dist.demo.jar.name}"/>
            <filter token="FRAMEWORK_JAR_NAME" value="${dist.jar.name}"/>
            <filter token="JMF_JAR_NAME" value="jmf.jar"/>
            <filter token="APACHE_LOGGING" value="commons-logging-1.1.jar"/>
            <filter token="LOOKS" value="looks-2.1.1.jar"/>
            <filter token="SKIN_LF" value="skinlf.jar"/>
         </filterset>
      </copy>
      <mysignjar
          jarname="${build.dir}/${dist.jar.name}"
          sjarname="${bin.dir.webstart}/${dist.jar.name}"/>
      <mysignjar
          jarname="${build.dir}/${dist.demo.jar.name}"
          sjarname="${bin.dir.webstart}/${dist.demo.jar.name}"/>
      <mysignjar
          jarname="${build.dir}/lib/jmf/lib/jmf.jar"
          sjarname="${bin.dir.webstart}/jmf.jar"/>
      <mysignjar
          jarname="${build.dir}/lib/commons-logging-1.1.jar"
          sjarname="${bin.dir.webstart}/commons-logging-1.1.jar"/>
    <mysignjar
        jarname="${build.dir}/lib/looks-2.1.1.jar"
        sjarname="${bin.dir.webstart}/looks-2.1.1.jar"/>
    <mysignjar
        jarname="${build.dir}/lib/skinlf.jar"
        sjarname="${bin.dir.webstart}/skinlf.jar"/>
   </target>
</project>