-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-custom.xml
94 lines (78 loc) · 3.36 KB
/
build-custom.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
<project name="Qubero" default="dist" basedir=".">
<description>
Build Qubero.
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build/classes"/>
<property name="dist" location="dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp>
<format property="stamp" pattern="yyyyMMdd-HHmm"/>
</tstamp>
<property name="dist-bin-file" value="${dist}/Qubero-${stamp}-bin.jar"/>
<property name="dist-backup-file" value="${dist}/Qubero-${stamp}-backup.jar"/>
<property name="dist-latest-bin" value="${dist}/latest/qubero-bin.jar"/>
<property name="manifest" value="extras/mf.txt"/>
<property name="backup-exclude" value="extras/jar-excludes.txt"/>
<property name="noncode-path" value="net/pengo/noncode"/>
<!-- 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}"/>
<!-- i wish: <javac srcdir="${src}" destdir="${build}" target="1.4" source="1.5" /> -->
<!--<copy file="extras/mooj32.png" todir="${build}"/>-->
<!-- copy across noncode resources -->
<mkdir dir="${build}/${noncode-path}"/>
<copy todir="${build}/${noncode-path}">
<fileset dir="${src}/${noncode-path}"/>
</copy>
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/latest"/>
<!-- Put everything in ${build} into the ${dist-bin-file} -->
<jar jarfile="${dist-bin-file}" basedir="${build}" manifest="${manifest}"/>
<jar jarfile="${dist-latest-bin}" basedir="${build}" manifest="${manifest}"/>
<!-- save date and size to text files... not _really_ needed.. but when qubero has a version number... -->
<!-- <copy todir="${dist-latest-bin}" -->
</target>
<target name="backup" depends="compile"
description="generates a backup" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Put everything into ${dist-backup-file} -->
<jar jarfile="${dist-backup-file}"
manifest="${manifest}"
excludesfile="${backup-exclude}"
basedir="."/>
<!-- Include the build, to make it an executable jar -->
<jar jarfile="${dist-backup-file}" basedir="${build}" update="true" index="true"/>
</target>
<target name="distribute_backup" depends="backup"
description="distribute backup to ftp + other hdd">
<!-- pending -->
</target>
<target name="execute" depends="compile"
description="run Qubero">
<java classname="net.pengo.app.Mooj" fork="true">
<classpath>
<!-- pathelement location="${dist}/Bedrock-${stamp}-bin.jar"/ -->
<pathelement path="${java.class.path}"/>
<pathelement path="${build}"/>
</classpath>
</java>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>