forked from drewhannay/chess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
129 lines (112 loc) · 4.7 KB
/
build.xml
File metadata and controls
129 lines (112 loc) · 4.7 KB
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
<?xml version="1.0"?>
<project name="Chess" default="dist" >
<!-- properties: basic -->
<property name="src.dir" value="src" />
<property name="jar.dir" value="jar" />
<property name="lib.dir" value="lib" />
<property name="release.dir" value="release" />
<property name="classes.dir" value="classes" />
<property name="images.dir" value="images" />
<!-- properties: application-specific properties -->
<property name="jar-file-name" value="Chess.jar" />
<property name="app.name" value="Chess" />
<!-- properties: jarbundler properties (Mac Only) -->
<property name="jarbundler.name" value="${app.name}" />
<property name="jarbundler.shortname" value="${app.name}" />
<property name="jarbundler.signature" value="Drew Hannay, drewhannay.com" />
<property name="jarbundler.mainclass" value="gui.Driver" />
<property name="jarbundler.icon" value="images/chess.icns" />
<property name="jarbundler.jvmversion" value="1.6+" />
<property name="jarbundler.version" value="1.0" />
<property name="jarbundler.infostring" value="${app.name}" />
<property name="jarbundler.build" value="100" />
<property name="jarbundler.bundleid" value="com.drewhannay.chess" />
<property name="jarbundler.apple.laf.useScreenMenuBar" value="true"/>
<property name="jarbundler.apple.awt.brushMetal" value="true"/>
<property name="jarbundler.apple.awt.showGrowBox" value="true"/>
<property name="jarbundler.com.apple.mrj.application.apple.menu.about.name" value="${mac.aboutname}"/>
<property name="jarbundler.apple.awt.textantialiasing" value="true"/>
<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler"/>
<path id="class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
<target name="init">
<tstamp/>
</target>
<target name="create-dirs" depends="init">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${lib.dir}"/>
<mkdir dir="${jar.dir}"/>
<mkdir dir="${release.dir}"/>
</target>
<target name="clean" depends="create-dirs">
<!-- remove all the old jars from the jar directory -->
<delete>
<fileset dir="${jar.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</delete>
<!-- remove the old version of the app -->
<delete>
<fileset dir="${release.dir}">
<include name="**/*.app"/>
</fileset>
</delete>
</target>
<!-- COMPILE -->
<!-- compile: compile all our code to the "classes" directory -->
<target name="compile" depends="clean,create-dirs">
<javac destdir="${classes.dir}" source="1.6" includeAntRuntime="false">
<src path="${src.dir}"/>
<classpath refid="class.path"/>
</javac>
</target>
<!-- CREATE-JAR -->
<target name="create-jar" depends="compile">
<!-- create the jar file from our compiled classes and manifest file -->
<jar jarfile="${jar.dir}/${jar-file-name}" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="gui.Driver"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="${classes.dir}" />
<fileset dir="${images.dir}" />
</jar>
<!-- copy any libraries our application depends on -->
<copy todir="${jar.dir}">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</copy>
<delete dir="${classes.dir}"/>
</target>
<!-- BUNDLE -->
<!-- mac/jar bundle: create our mac os x bundle based on our jar file, our libraries, and these properties -->
<target name="dist" depends="create-jar">
<jarbundler dir="${release.dir}"
name="${jarbundler.name}"
shortname="${jarbundler.shortname}"
signature="${jarbundler.signature}"
mainclass="${jarbundler.mainclass}"
icon="${jarbundler.icon}"
jvmversion="${jarbundler.jvmversion}"
version="${jarbundler.version}"
infostring="${jarbundler.infostring}"
build="${jarbundler.build}"
bundleid="${jarbundler.bundleid}" >
<jarfileset dir="${jar.dir}">
<include name="**/*.jar" />
<exclude name="**/CVS" />
</jarfileset>
<javaproperty name="apple.laf.useScreenMenuBar" value="${jarbundler.apple.laf.useScreenMenuBar}"/>
<javaproperty name="apple.awt.brushMetal" value="${jarbundler.apple.awt.brushMetal}"/>
<javaproperty name="apple.awt.showGrowBox" value="${jarbundler.apple.awt.showGrowBox}"/>
<javaproperty name="apple.awt.textantialiasing" value="${jarbundler.apple.awt.textantialiasing}"/>
</jarbundler>
</target>
</project>