about summary refs log tree commit diff
path: root/third_party/lisp/s-xml/test/ant-build-file.xml
blob: 91d78707b8a104742388220ba98f816804ca013f (plain) (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
<!-- $Id: ant-build-file.xml,v 1.1 2003/03/18 08:22:09 sven Exp $ -->
<!-- Ant 1.2 build file -->

<project name="Libretto" default="compile" basedir=".">

  <!-- set global properties for this build -->
  <property name="src" value="${basedir}/src" />
  <property name="rsrc" value="${basedir}/rsrc" />
  <property name="build" value="${basedir}/bin" />
  <property name="api" value="${basedir}/api" />
  <property name="lib" value="${basedir}/lib" />
  <property name="junit" value="${basedir}/junit" />
  <property name="rsrc" value="${basedir}/rsrc" />
  
  <target name="prepare">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}" />
    <mkdir dir="${api}" />
    <mkdir dir="${junit}" />
    <copy file="${rsrc}/build/build.version" tofile="${build}/build.properties"/>
    <replace file="${build}/build.properties" token="@@@BUILD_ID@@@" value="${DSTAMP}-${TSTAMP}"/>
  </target>

  <target name="compile" depends="copy-rsrc">
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}" debug="on">
      <classpath>
        <fileset dir="${lib}">
          <include name="log4j-core.jar" />
          <include name="jaxp.jar" />
          <include name="crimson.jar" />
          <include name="jdom.jar" />
          <include name="beanshell.jar" />
        </fileset>
      </classpath>
    </javac>
  </target>

  <target name="compile-junit" depends="copy-rsrc">
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${junit}" destdir="${build}" debug="on">
      <classpath>
        <fileset dir="${lib}">
          <include name="*.jar" />
        </fileset>
      </classpath>
    </javac>
  </target>

  <target name="copy-rsrc" depends="prepare">
    <!-- Copy various resource files into ${build} -->
    <copy todir="${build}">
      <fileset
        dir="${basedir}"
        includes="images/*.gif, images/*.jpg" />
    </copy>
    <copy todir="${build}">
      <fileset
        dir="${src}"
        includes="be/beta9/libretto/data/*.txt" />
    </copy>
    <copy todir="${build}">
      <fileset
        dir="${rsrc}/log4j"
        includes="log4j.properties" />
    </copy>
  </target>
  
  <target name="c-header" depends="compile">
      <javah destdir="${rsrc}/VC_source" class="be.beta9.libretto.io.ParallelPort">
         <classpath>
            <pathelement location="${build}" />
         </classpath>
      </javah>
  </target>
  
  <target name="test-parport" depends="compile">
      <java
      classname="be.beta9.libretto.io.ParallelPortWriter"
      fork="yes">
      <classpath>
        <pathelement location="${build}" />
        <fileset dir="${lib}">
          <include name="*.jar" />
        </fileset>
      </classpath>
    </java>
  </target>
  
  <target name="jar-simple" depends="compile">
    <!-- Put everything in ${build} into the a jar file -->
    <jar
      jarfile="${basedir}/libretto.jar"
      basedir="${build}"
      manifest="${rsrc}/manifest/libretto.mf"/>
  </target>

  <target name="jar" depends="compile">
    <!-- Put everything in ${build} into the a jar file including all dependecies -->
    <unjar src="${lib}/jaxp.jar" dest="${build}" />
    <unjar src="${lib}/crimson.jar" dest="${build}" />
    <unjar src="${lib}/jdom.jar" dest="${build}" />
    <unjar src="${lib}/log4j-core.jar" dest="${build}" />
    <jar
      jarfile="${basedir}/libretto.jar"
      basedir="${build}"
      manifest="${rsrc}/manifest/libretto.mf"/>
  </target>
  
  <target name="client-jar" depends="background-jar">
    <!-- Put everything in ${build} into the a jar file including all dependecies -->
    <unjar src="${lib}/log4j-core.jar" dest="${build}" />
    <jar jarfile="${basedir}/libretto-client.jar" manifest="${rsrc}/manifest/libretto-client.mf">
      <fileset dir="${build}">
        <include name="build.properties"/>
        <include name="log4j.properties"/>
        <include name="be/beta9/libretto/io/*.class"/>
        <include name="be/beta9/libretto/application/Build.class"/>
        <include name="be/beta9/libretto/net/LibrettoTextClient*.class"/>
        <include name="be/beta9/libretto/net/TestClientMessage.class"/>
        <include name="be/beta9/libretto/net/ClientStatusMessageResult.class"/>
        <include name="be/beta9/libretto/net/Client*.class"/>
        <include name="be/beta9/libretto/net/Constants.class"/>
        <include name="be/beta9/libretto/net/TextMessage.class"/>
        <include name="be/beta9/libretto/net/MessageResult.class"/>
        <include name="be/beta9/libretto/net/MessageException.class"/>
        <include name="be/beta9/libretto/net/SingleTextMessage.class"/>
        <include name="be/beta9/libretto/net/Message.class"/>
        <include name="be/beta9/libretto/net/Util.class"/>
        <include name="be/beta9/libretto/gui/ShowSingleTextFrame*.class"/>
        <include name="be/beta9/libretto/gui/AWTTextView*.class"/>
        <include name="be/beta9/libretto/model/AttributedString*.class"/>
        <include name="be/beta9/libretto/model/AWTTextStyle.class"/>
        <include name="be/beta9/libretto/model/LTextStyle.class"/>
        <include name="be/beta9/libretto/model/AWTCharacterAttributes.class"/>
        <include name="be/beta9/libretto/model/Java2DTextStyle.class"/>
        <include name="be/beta9/libretto/model/LCharacterAttributes.class"/>
        <include name="be/beta9/libretto/model/Java2DCharacterAttributes.class"/>
        <include name="be/beta9/libretto/util/TextStyleManager.class"/>
        <include name="be/beta9/libretto/util/Bean.class"/>
        <include name="be/beta9/libretto/util/LibrettoSaxReader.class"/>
        <include name="be/beta9/libretto/util/Preferences.class"/>
        <include name="be/beta9/libretto/util/Utilities.class"/>
        <include name="org/apache/log4j/**"/>
      </fileset>
    </jar>
  </target>
  
  <target name="background-jar" depends="compile">
    <!-- Put everything in ${build} into the a jar file including all dependecies -->
    <jar jarfile="${basedir}/background.jar" manifest="${rsrc}/manifest/background-black-window.mf">
      <fileset dir="${build}">
        <include name="be/beta9/libretto/gui/BackgroundBlackWindow.class"/>
      </fileset>
    </jar>
  </target>

  <target name="run" depends="compile">
    <!-- Execute the main application -->
    <java
      classname="be.beta9.libretto.application.Libretto"
      fork="yes">
      <classpath>
        <pathelement location="${build}" />
        <fileset dir="${lib}">
          <include name="log4j-core.jar" />
          <include name="jaxp.jar" />
          <include name="crimson.jar" />
          <include name="jdom.jar" />
        </fileset>
      </classpath>
    </java>
  </target>

  <target name="debug" depends="compile">
    <!-- Execute the main application in debug mode -->
    <java
      classname="be.beta9.libretto.application.LibrettoDebug"
      fork="yes">
      <classpath>
        <pathelement location="${build}" />
        <fileset dir="${lib}">
          <include name="*.jar" />
        </fileset>
      </classpath>
    </java>
  </target>

  <target name="junit" depends="compile-junit">
    <!-- Execute all junit tests -->
    <java
      classname="be.beta9.libretto.AllTests"
      fork="yes">
      <classpath>
        <pathelement location="${build}" />
        <fileset dir="${lib}">
          <include name="*.jar" />
        </fileset>
      </classpath>
    </java>
  </target>

  <target name="clean">
    <!-- Delete the ${build} directory trees -->
    <delete dir="${build}" />
    <delete dir="${api}" />
  </target>
  
  <target name="api" depends="prepare">
    <!-- Generate javadoc -->
    <javadoc
      packagenames="be.beta9.libretto.*"
      sourcepath="${src}"
      destdir="${api}"
      windowtitle="Libretto"
      author="true"
      version="true"
      use="true"/>
  </target>
  
  <target name="zip-all" depends="jar, client-jar">
    <zip zipfile="libretto.zip">
    <fileset dir="${basedir}">
      <include name="libretto.jar"/>
      <include name="libretto-client.jar"/>
        </fileset>
    </zip>
  </target>

  <target name="upload" depends="clean, zip-all">
    <ftp
      server="users.pandora.be"
      userid="a002458"
      password="bast0s"
      remotedir="libretto"
      verbose="true"
      passive="true">
        <fileset dir="${basedir}">
        <include name="libretto.jar" />
        <include name="libretto-client.jar" />
        <include name="libretto.zip" />
    </fileset>
    </ftp>
  </target>

</project>