-
Notifications
You must be signed in to change notification settings - Fork 5
/
build-common.xml
101 lines (86 loc) · 3.3 KB
/
build-common.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="properJavaRDP" default="init-common" basedir=".">
<property file="${basedir}/project.properties"/>
<!-- CLASSPATH required for build. -->
<path id="build.classpath">
<fileset dir="${java.log4j11.package}" includes="${jar.log4j.java11}"/>
<fileset dir="${java.getopt.package}" includes="${jar.gnugetopt}"/>
</path>
<target name="init-common">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}1.1"/>
<mkdir dir="${build.dir}1.2"/>
<mkdir dir="${build.dir}1.3"/>
<mkdir dir="${build.dir}1.4"/>
<mkdir dir="${dist.dir}" />
<mkdir dir="${build.dir}/keymaps"/>
<copy todir="${build.dir}/keymaps">
<fileset dir="${basedir}/keymaps" />
</copy>
</target>
<target name="generate-product-version" depends="init-common">
<javac srcdir="${src.dir}"
includes="**/Version.java"
destdir="${build.dir}"
source="1.4"
target="1.4"
nowarn="on"/>
<java classpath="${build.dir}"
classname="net.propero.rdp.Version">
<arg value="${build.dir}/product.version"/>
</java>
</target>
<target name="build-common-version">
<javac srcdir="${src.dir}:${src.dir}${java.version}"
destdir="${build.dir}"
classpathref="build.classpath"
fork="true"
target="${java.version}"
source="1.4"
nowarn="on">
</javac>
<mkdir dir="${build.dir}${java.version}/net/propero/rdp"/>
<move todir="${build.dir}${java.version}/net/propero/rdp">
<fileset dir="${build.dir}/net/propero/rdp" includes="*_Localised.class"/>
</move>
</target>
<target name="build-common">
<!-- Build each version of the code in turn.
Note this will be replaced by an antCall element when we can
be assured everyone will have Ant 1.5.2
<ant antfile="${commonxml}" target="build-common-version">
<property name="java.version" value="1.1"/>
</ant>
<ant antfile="${commonxml}" target="build-common-version">
<property name="java.version" value="1.2"/>
</ant>
<ant antfile="${commonxml}" target="build-common-version">
<property name="java.version" value="1.3"/>
</ant>
-->
<ant antfile="${commonxml}" target="build-common-version">
<property name="java.version" value="1.4"/>
</ant>
<ant antfile="${commonxml}" target="generate-product-version"/>
<property file="${build.dir}/product.version"/>
</target>
<target name="jar-common">
<copy toDir="${build.dir}/keymaps"
filtering="true">
<fileset dir="${basedir}/keymaps"/>
</copy>
<jar jarfile="${dist.dir}/${jar.path}" basedir="${build.dir}/"/>
<jar jarfile="${dist.dir}/${jar.path.14}" basedir="${build.dir}1.4/"/>
<jar jarfile="${dist.dir}/${jar.path.13}" basedir="${build.dir}1.3/"/>
<jar jarfile="${dist.dir}/${jar.path.12}" basedir="${build.dir}1.2/"/>
<jar jarfile="${dist.dir}/${jar.path.11}" basedir="${build.dir}1.1/"/>
</target>
<target name="clean-common">
<delete dir="${build.dir}" />
<delete dir="${build.dir}1.4" />
<delete dir="${build.dir}1.3" />
<delete dir="${build.dir}1.2" />
<delete dir="${build.dir}1.1" />
<delete dir="${dist.dir}" />
</target>
</project>