-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
127 lines (112 loc) · 4.17 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
<project name="QemuJuicy" default="dist" basedir=".">
<description>
Ant build file
To build:
ant start in directory where the file build.xml is located
ant clean cleanup the build fileset
results are in the dist and build directories
</description>
<!-- set global properties for this build -->
<property name="appname" value="QemuJuicy"/>
<property name="appdesc" value="QemuJuicy - QEMU Java User Interface Contributed Yet"/>
<property name="repo" value="https://github.com/openworld42/QemuJuicy"/>
<property name="mainclass" value="qemujuicy.Main"/>
<property name="jarprefix" value="qemujuicy"/>
<property name="src" location="src"/>
<property name="dir.src" value="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="base" location="."/>
<property name="javadoc" location="javadoc"/>
<property name="dir.javadoc" value="javadoc"/>
<property name="dir.docs" value="docs"/>
<property name="javahelp.jar" value="jhall-2.0.05.ds1.jar"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<echo>
appname: ${appname}
appdesc: ${appdesc}
repo: ${repo}
mainclass: ${mainclass}
jarprefix: ${jarprefix} + "_vN.N.N.jar"
</echo>
<input message="Please enter the version (as of Version.java, like v1.2.3): "
addproperty="version"/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the source">
<!-- Compile the Java code from ${src} into ${build} -->
<javac srcdir="${src}"
destdir="${build}"
classpath="${javahelp.jar}"
includeantruntime="false"
/>
</target>
<target name="javadoc" depends="compile" description="generate javadoc">
<delete dir="${javadoc}" />
<mkdir dir="${javadoc}" />
<javadoc destdir="${javadoc}" access="private" author="true" classpath="." nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false"
sourcepath="${src}" splitindex="true" use="true" version="true">
<doctitle><![CDATA[${appdesc}]]></doctitle>
<bottom>
<![CDATA[Copyright © 2021. All Rights Reserved. Read the license file(s) enclosed. ]]>
</bottom>
<link href="https://docs.oracle.com/en/java/javase/17/docs/api/"/>
<classpath>
<fileset dir=".">
<include name="${javahelp.jar}"/>
</fileset>
</classpath>
</javadoc>
</target>
<target name="dist" depends="compile,javadoc"
description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Copy the images into ${build} -->
<copy todir="${build}/qemujuicy/images">
<fileset dir="${src}/qemujuicy/images">
<include name="**/*.*"/>
</fileset>
</copy>
<copy todir="${build}/qemujuicy/help">
<fileset dir="${src}/qemujuicy/help">
<include name="**/*.*"/>
</fileset>
</copy>
<!-- Put everything in ${build} into the Project-${DSTAMP}.jar file -->
<jar jarfile="${dist}/${jarprefix}_${version}.jar" basedir="${build}">
<fileset file="${base}/README*"/>
<fileset file="${base}/CHANGELOG.md"/>
<fileset file="${base}/CONTRIBUTE.md"/>
<fileset file="${base}/DOCUMENTATION.md"/>
<fileset file="${base}/LICENSE*"/>
<fileset file="${base}/build.xml"/>
<fileset file="${base}/${javahelp.jar}"/>
<fileset dir="." includes="${dir.src}/**"/>
<fileset dir="." includes="${dir.javadoc}/**"/>
<fileset dir="." includes="${dir.docs}/**"/>
<manifest>
<attribute name="Main-Class" value="${mainclass}"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Built-Date" value="${DSTAMP}"/>
<attribute name="Implementation-URL" value="${repo}"/>
<attribute name="Class-Path" value="${javahelp.jar}"/>
</manifest>
</jar>
<copy file="${dist}/${jarprefix}_${version}.jar" tofile="${base}/${jarprefix}_${version}.jar"/>
<echo>
check the file qemujuicy_${version}.jar
then run: ant clean
</echo>
</target>
<target name="clean"
description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>