-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
89 lines (75 loc) · 3.12 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
<project name="getbirch" default="dist" basedir=".">
<!-- #################################################
These two properties are the only ones you are
likely to want to change for your own projects: -->
<property name="jar.name" value="getbirch.jar" />
<property name="java-main-class" value="BootStrap" />
<!-- ################################################## -->
<!-- Below here you dont' need to change for simple projects -->
<property name="java-src.dir" location="java-src"/>
<property name="src.dir" location="src"/>
<property name="onejar-src.dir" location="onejar-src"/>
<property name="java-build.dir" location="java-build"/>
<property name="resources.dir" location="resources"/>
<property name="build.dir" location="build"/>
<property name="lib.dir" location="lib"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="${java-build.dir}"/>
<delete dir="${build.dir}"/>
<delete file="${jar.name}"/>
</target>
<target name="dist" depends="clean">
<!-- prepare the build directory -->
<mkdir dir="${build.dir}/lib"/>
<mkdir dir="${build.dir}/main"/>
<!-- Build java code -->
<mkdir dir="${java-build.dir}"/>
<javac srcdir="${java-src.dir}" destdir="${java-build.dir}" classpathref="classpath"/>
<!-- Build main.jar -->
<jar destfile="${build.dir}/main/main.jar" basedir="${java-build.dir}">
<manifest>
<attribute name="Main-Class" value="BootStrap" />
</manifest>
</jar>
<delete file="${java-build.dir}"/>
<!-- Add the python source -->
<copy todir="${build.dir}">
<fileset dir="${src.dir}"/>
</copy>
<!-- Add the probes -->
<copy todir="${build.dir}/resources">
<fileset dir="${resources.dir}"/>
</copy>
<!-- Add the libs -->
<copy todir="${build.dir}/lib">
<fileset dir="${lib.dir}"/>
</copy>
<!-- Compile OneJar -->
<javac srcdir="${onejar-src.dir}" destdir="${build.dir}" classpathref="classpath"/>
<!-- Copy the OneJar license file -->
<copy file="${onejar-src.dir}/one-jar-license.txt" tofile="${build.dir}/one-jar-license.txt" />
<!-- Gui stuff -->
<copy todir="${build.dir}/content" file="java-src/content/dna.jpg"/>
<copy todir="${build.dir}/content" file="java-src/content/getbirchsplash.png"/>
<copy todir="${build.dir}/wizard" file="java-src/wizard/wizard.properties"/>
<copy todir="${build.dir}/wizard">
<fileset dir="java-src/wizard">
<include name="**/*.gif"/>
</fileset>
</copy>
<!-- Build the jar -->
<jar destfile="${jar.name}" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="com.simontuffs.onejar.Boot" />
<attribute name="Class-Path" value="getbirch_temp/jython-full.jar" />
<attribute name="SplashScreen-Image" value="content/getbirchsplash.png" />
</manifest>
</jar>
<!-- clean up -->
<delete dir="${java-build.dir}" />
<delete dir="${build.dir}" />
</target>
</project>