-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.xml
206 lines (190 loc) · 7.35 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
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
<project name="StrangeBrew" default="dist" basedir=".">
<description>
StrangeBrew Brewing Software
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="source" location="source"/>
<property name="installer" location="installer"/>
<property name="version.num" value="${VER_MAJOR}.${VER_MINOR}.${VER_POINT}"/>
<property name="VER_MAJOR" value="2"/>
<property name="VER_MINOR" value="1"/>
<property name="VER_POINT" value="0"/>
<property name="project_name" value="StrangeBrew"/>
<path id="project.class.path">
<pathelement location="lib/"/>
<pathelement path="${java.class.path}/"/>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- 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}" target="1.5" source="1.5"
debug="true" debuglevel="lines,vars,source">
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="lib/trident-6.3.jar"/>
<pathelement location="lib/microba-0.4.4.jar"/>
<pathelement location="lib/BrowserLauncher2-1.3.jar"/>
<pathelement location="lib/sqlite-jdbc-3.7.2.jar"/>
<pathelement location="lib/SteelSeries-3.9.31-SNAPSHOT.jar"/>
<pathelement location="lib/synthetica.jar"/>
<pathelement location="lib/json-simple-1.1.1.jar"/>
</classpath>
</javac>
<copy todir="${build}">
<fileset dir="${src}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="version">
<exec outputproperty="datestr" executable="date">
<arg value="+%B %e, %Y"/>
</exec>
<buildnumber/>
<delete file="src/ca/strangebrew/SBVersion.java" />
<delete file="build/ca/strangebrew/SBVersion.class" />
<delete file="build/ca/strangebrew/ui/swing/dialogs/AboutDialog.class" />
<echo file="src/ca/strangebrew/SBVersion.java">
// This file was generated by build.xml, do not edit!
package ca.strangebrew;
public class SBVersion {
/** JabaDex major release version */
public final static String VERSION =
${VER_MAJOR} + "." + ${VER_MINOR} + "." + ${VER_POINT};
public final static String BUILDDATE = "${datestr}";
public final static String BUILDNUMBER = "${build.number}";
}
</echo>
</target>
<target name="dist" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<delete file="${dist}/StrangeBrew.jar"/>
<delete file="MANIFEST.MF"/>
<buildnumber file="build.num"/>
<manifest file="MANIFEST.MF">
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="ca.strangebrew.ui.swing.dialogs.StrangeBrew"/>
<attribute name="Implementation-Version" value="${VER_MAJOR}.${VER_MINOR}.${VER_POINT}-b${build.number}"/>
</manifest>
<jar jarfile="${dist}/StrangeBrew.jar"
basedir="${build}"
manifest="MANIFEST.MF">
<zipgroupfileset dir="lib" includes="*.jar" excludes="source/**"/>
</jar>
<copy file="gpl.txt" todir="${dist}"/>
<copy file="ChangeLog.txt" todir="${dist}"/>
<copy file="README.md" todir="${dist}"/>
<mkdir dir="${dist}/recipes"/>
<copy todir="${dist}/recipes">
<fileset dir="recipes"/>
</copy>
<mkdir dir="${dist}/help"/>
<copy todir="${dist}/help">
<fileset dir="help"/>
</copy>
<mkdir dir="${dist}/src/ca/strangebrew/data"/>
<copy todir="${dist}/src/ca/strangebrew/data">
<fileset dir="${src}/ca/strangebrew/data"/>
</copy>
<mkdir dir="${dist}/src/ca/strangebrew/icons"/>
<copy todir="${dist}/src/ca/strangebrew/icons">
<fileset dir="${src}/ca/strangebrew/icons"/>
</copy>
</target>
<target name="zip" description="Create Zipped Distribution" depends="version,dist">
<zip destfile="StrangeBrew-${VER_MAJOR}.${VER_MINOR}.${VER_POINT}-b${build.number}.zip" basedir="${dist}"/>
</target>
<target name="source" description="Create Zipped Source Distribution">
<mkdir dir="${source}"/>
<copy file="gpl.txt" todir="${source}"/>
<copy file="build.xml" todir="${source}"/>
<copy file="ChangeLog.txt" todir="${source}"/>
<copy file="readme" todir="${source}"/>
<mkdir dir="${source}/recipes"/>
<copy todir="${source}/recipes">
<fileset dir="recipes"/>
</copy>
<mkdir dir="${source}/help"/>
<copy todir="${source}/help">
<fileset dir="help"/>
</copy>
<mkdir dir="${source}/src/ca/strangebrew/data"/>
<copy todir="${source}/src/ca/strangebrew/data">
<fileset dir="${src}/ca/strangebrew/data"/>
</copy>
<mkdir dir="${source}/src/ca/strangebrew/icons"/>
<copy todir="${source}/src/ca/strangebrew/icons">
<fileset dir="${src}/ca/strangebrew/icons"/>
</copy>
<mkdir dir="${source}/src/ca/strangebrew/ui/swing/dialogs"/>
<copy todir="${source}/src/ca/strangebrew/ui/swing/dialogs">
<fileset dir="${src}/ca/strangebrew/ui/swing/dialogs"/>
</copy>
<copy todir="${source}/src/ca/strangebrew/ui/swing">
<fileset dir="${src}/ca/strangebrew/ui/swing"/>
</copy>
<copy todir="${source}/src/ca/strangebrew">
<fileset dir="${src}/ca/strangebrew"/>
</copy>
<mkdir dir="${source}/lib"/>
<copy todir="${source}/lib">
<fileset dir="lib"/>
</copy>
<mkdir dir="${source}/src/com/mindprod/csv"/>
<copy todir="${source}/src/com/mindprod/csv">
<fileset dir="${src}/com/mindprod/csv"/>
</copy>
<mkdir dir="${source}/help/images"/>
<copy todir="${source}/help/images">
<fileset dir="help/images"/>
</copy>
<copy todir="${source}/help">
<fileset dir="help"/>
</copy>
<mkdir dir="${source}/doc/PromashFormat"/>
<copy todir="${source}/doc/PromashFormat">
<fileset dir="doc/PromashFormat"/>
</copy>
<copy todir="${source}/doc">
<fileset dir="doc"/>
</copy>
<zip destfile="StrangeBrew-${VER_MAJOR}.${VER_MINOR}.${VER_POINT}-src.zip" basedir="${source}"/>
</target>
<target name="clean" description="clean up" >
<!-- Delete the ${build} ${source} and ${dist} directory trees -->
<delete file="StrangeBrew-${VER_MAJOR}.${VER_MINOR}.${VER_POINT}.zip"/>
<delete file="StrangeBrew-src-${VER_MAJOR}.${VER_MINOR}.${VER_POINT}.zip"/>
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${source}"/>
<delete file="${installer}/setup.exe"/>
<delete file="${installer}/build.log"/>
</target>
<target name="installer" depends="dist" description="build the installer" >
<taskdef name="izpack" classpath="lib\standalone-compiler.jar"
classname="com.izforge.izpack.ant.IzPackTask"/>
<!-- Run installer build -->
<echo message="Running IzPack to build the installer..."/>
<izpack input="install.xml"
output="installer/StrangeBrew-installer.jar"
installerType="standard"
inheritAll="true"
basedir="."
compression="deflate"
compressionlevel="9"/>
<!-- Clean working directory -->
<echo message="Cleaning up working directory..."/>
<delete dir="${temp.dir}" quiet="true" includeemptydirs="true"/>
<echo message="Done."/>
</target>
</project>