|
1 <!-- |
|
2 Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. |
|
3 |
|
4 Redistribution and use in source and binary forms, with or without |
|
5 modification, are permitted provided that the following conditions |
|
6 are met: |
|
7 |
|
8 - Redistributions of source code must retain the above copyright |
|
9 notice, this list of conditions and the following disclaimer. |
|
10 |
|
11 - Redistributions in binary form must reproduce the above copyright |
|
12 notice, this list of conditions and the following disclaimer in the |
|
13 documentation and/or other materials provided with the distribution. |
|
14 |
|
15 - Neither the name of Sun Microsystems nor the names of its |
|
16 contributors may be used to endorse or promote products derived |
|
17 from this software without specific prior written permission. |
|
18 |
|
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS |
|
20 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
|
21 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
22 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
|
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
|
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
|
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
|
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
|
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
30 --> |
|
31 |
|
32 <project name="swing" default="build" basedir="."> |
|
33 |
|
34 <import file="../common/shared.xml"/> |
|
35 |
|
36 <target name="-pre-init" depends="-check-swing.windows" if="swing.windows"> |
|
37 <property name="excludes" value="com/sun/java/swing/plaf/gtk/"/> |
|
38 </target> |
|
39 |
|
40 <target name="-check-swing.windows"> |
|
41 <condition property="swing.windows"> |
|
42 <os family="windows"/> |
|
43 </condition> |
|
44 </target> |
|
45 |
|
46 <target name="-post-compile"> |
|
47 <mkdir dir="${dist.dir}/lib"/> |
|
48 <jar destfile="${dist.dir}/lib/swing.jar"> |
|
49 <fileset dir="${classes.dir}"> |
|
50 <include name="javax/swing/**/*.class"/> |
|
51 <include name="com/sun/swing/**/*.class"/> |
|
52 <include name="com/sun/java/swing/**/*.class"/> |
|
53 <include name="sun/swing/**/*.class"/> |
|
54 </fileset> |
|
55 <fileset dir="${share.src.dir}"> |
|
56 <include name="javax/swing/**/*.bdtd"/> |
|
57 <include name="javax/swing/**/*.css"/> |
|
58 <include name="javax/swing/**/*.dtd"/> |
|
59 <include name="javax/swing/**/*.gif"/> |
|
60 <include name="javax/swing/**/*.html"/> |
|
61 <include name="javax/swing/**/*.jpg"/> |
|
62 <include name="javax/swing/**/*.png"/> |
|
63 <include name="javax/swing/**/*.txt"/> |
|
64 <include name="javax/swing/**/*.wav"/> |
|
65 |
|
66 <include name="com/sun/swing/**/*.properties"/> |
|
67 |
|
68 <include name="com/sun/java/swing/**/*.gif"/> |
|
69 <include name="com/sun/java/swing/**/*.png"/> |
|
70 <include name="com/sun/java/swing/**/*.properties"/> |
|
71 <include name="com/sun/java/swing/**/*.xml"/> |
|
72 </fileset> |
|
73 </jar> |
|
74 </target> |
|
75 |
|
76 <target name="-demo-init" depends="-demo-init.unix,-demo-init.windows"> |
|
77 <property name="swing.demo.src" value="${root}/src/share/demo/jfc/SampleTree"/> |
|
78 <property name="swing.demo.classes" value="${build.dir}/demo/jfc/SampleTree"/> |
|
79 </target> |
|
80 |
|
81 <target name="-demo-init.unix" if="osfamily.unix"> |
|
82 <property name="demo.bootclasspath" |
|
83 value="-Xbootclasspath/p:${dist.dir}/lib/swing.jar:${classes.dir}"/> |
|
84 </target> |
|
85 |
|
86 <target name="-demo-init.windows" if="os.windows"> |
|
87 <property name="demo.bootclasspath" |
|
88 value="-Xbootclasspath/p:${dist.dir}/lib/swing.jar;${classes.dir}"/> |
|
89 </target> |
|
90 |
|
91 <target name="run" depends="-init,-demo-init"> |
|
92 <mkdir dir="${swing.demo.classes}"/> |
|
93 <property name="jvm.args" value=""/> |
|
94 <javac srcdir="${swing.demo.src}" destdir="${swing.demo.classes}" |
|
95 fork="true" failonerror="true" |
|
96 classpath="${dist.dir}/lib/swing.jar:${classes.dir}" |
|
97 debug="${javac.debug}" debuglevel="${javac.debuglevel}"> |
|
98 <compilerarg line="${javac.options}"/> |
|
99 </javac> |
|
100 <copy todir="${swing.demo.classes}"> |
|
101 <fileset dir="${swing.demo.src}" includes="resources/**/*.gif"/> |
|
102 </copy> |
|
103 <java classname="SampleTree" classpath="${swing.demo.classes}" |
|
104 fork="true" failonerror="true" |
|
105 jvm="${bootstrap.jdk}/bin/java"> |
|
106 <jvmarg line="${demo.bootclasspath}"/> |
|
107 <arg line="${jvm.args}"/> |
|
108 </java> |
|
109 </target> |
|
110 |
|
111 <target name="clean" depends="-init,-demo-init,shared.clean"> |
|
112 <delete file="${dist.dir}/lib/swing.jar"/> |
|
113 <delete dir="${swing.demo.classes}"/> |
|
114 </target> |
|
115 |
|
116 </project> |