-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
88 lines (84 loc) · 3.14 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
<project name="xkcd936" default="cli" basedir=".">
<description>
simple example build file
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<!-- libs only used for compiling -->
<property name="compile.lib" value="compile_lib" />
<!-- some stuff for Mac OSX application bundles... -->
<!-- unfortunately, this only work on max os X right now. -->
<taskdef name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler">
<classpath>
<pathelement path="${compile.lib}/jarbundler-1.8.1.jar" />
<pathelement path="${compile.lib}/xercesImpl.jar" />
<pathelement path="${compile.lib}/xml-apis.jar" />
</classpath>
</taskdef>
<target name="bundle" depends="swing"
description="Make a mac application bundle">
<delete dir="bundle" />
<mkdir dir="bundle"/>
<mkdir dir="bundle/EasyPassword"/>
<jarbundler dir="bundle/EasyPassword"
name="EasyPassword"
mainclass="com.xkcd.n936.swing.EasyPasswordApp"
jars="dist/xkcd936swing.jar"
icon="static/images/xkcd936.icns"
version="0.1"
aboutmenuname="EasyPassword"
vmoptions="-Xmx500m -Dapple.awt.TextAntialiasing=false "
arguments="-b ."
/>
<mkdir dir="bundle/EasyPassword/dict"/>
<copy file="books.txt" tofile="bundle/EasyPassword/books.txt"/>
<delete file="dist/xkcd936swing.jar"/>
</target>
<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>
<target name="cli" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/xkcd936cli.jar">
<manifest>
<attribute name="Main-Class"
value="com.xkcd.n936.cli.MakePassword"/>
</manifest>
<fileset dir="${build}" includes="com/xkcd/n936/cli/**"/>
<fileset dir="${build}" includes="com/xkcd/n936/lib/**"/>
</jar>
</target>
<target name="swing" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/xkcd936swing.jar">
<manifest>
<attribute name="Main-Class"
value="com.xkcd.n936.swing.EasyPasswordApp"/>
</manifest>
<fileset dir="${build}" includes="com/xkcd/n936/swing/**"/>
<fileset dir="${build}" includes="com/xkcd/n936/lib/**"/>
</jar>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="bundle"/>
</target>
</project>