-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
129 lines (95 loc) · 4.34 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
<?xml version="1.0" encoding="UTF-8" ?>
<project name="jgex" default="all" basedir=".">
<property name="src" value="."/>
<property name="dest" value="classes"/>
<property name="out" value="output"/>
<property name="jgex_jar" value="jgex.jar"/>
<!-- Step 1: clean alreay exists directory and files -->
<target name="clean">
<delete dir="${dest}"/>
</target>
<!-- Step 2: create output directorys -->
<target name="init" description="Initialize" depends="clean">
<mkdir dir="${dest}/maths"/>
<mkdir dir="${dest}/gprover"/>
<mkdir dir="${dest}/UI"/>
<mkdir dir="${dest}/wprover"/>
<mkdir dir="${dest}/pdf"/>
</target>
<!-- Step 3: compile all .java files, here we have four packages totally -->
<target name="compile" depends="clean, init" description="compiling jgex">
<javac srcdir="${src}/pdf" destdir="${dest}" debug="off" nowarn="on" />
<javac srcdir="${src}/UI" destdir="${dest}" debug="off" nowarn="on" />
<javac srcdir="${src}/maths" destdir="${dest}" debug="off" nowarn="on" />
<javac srcdir="${src}/gprover" destdir="${dest}" debug="off" nowarn="on" />
<javac srcdir="${src}/wprover" destdir="${dest}" debug="off" nowarn="on" />
</target>
<!-- Step 4: copy all images to destination before generating jar file -->
<target name="copy-images" depends="compile"
description="Copy all images to destination">
<copy todir="${dest}/wprover" overwrite="true">
<fileset dir="${src}/wprover">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy todir="${dest}" overwrite="true">
<fileset dir="${src}/wprover/images/about">
<exclude name="**/**/**/head*.*"/>
<exclude name="**/**/**/*.db"/>
</fileset>
</copy>
</target>
<!-- Step 5: build jgex.jar file -->
<target name="build" depends="compile, copy-images" description="building jgex">
<!-- <delete dir="${out}"/>
<mkdir dir="${out}"/> -->
<jar jarfile="${out}/${jgex_jar}" manifest="./MANIFEST.MF" basedir="${dest}"/>
</target>
<!-- Step 6: copy all resources(examples, rules and help) to output folder -->
<target name="copy-resources" depends="build"
description="Copy resources to output folder">
<mkdir dir="${out}/rules"/>
<copy todir="${out}/rules/" overwrite="true">
<fileset dir="${src}/rules">
</fileset>
</copy>
<mkdir dir="${dest}/examples"/>
<copy todir="${out}/examples" overwrite="true">
<fileset dir="${src}/examples">
</fileset>
</copy>
<mkdir dir="${dest}/language"/>
<copy todir="${out}/language" overwrite="true">
<fileset dir="${src}/language">
</fileset>
</copy>
<mkdir dir="${out}/help"/>
<copy todir="${out}/help/" overwrite="true">
<fileset dir="${src}/help">
</fileset>
</copy>
</target>
<!-- Step 7: run JGEX -->
<target name="run_all" depends="build" description="Run jar file">
<java jar="${out}/${jgex_jar}" classpath="${out}/"
fork="true"
failonerror="true"
maxmemory="128m"/>
</target>
<!-- Step 8: default act, build jgex.jar and run all -->
<target name="all" depends="clean, init, compile, copy-resources,copy-images, build, run_all" description="build and run all"/>
<!-- Build Applet 1 for simple ainmation. -->
<target name="build1" depends="compile" description="building jgex1">
<delete dir="${out}"/>
<mkdir dir="${out}"/>
<jar jarfile="${out}/${jgex_jar}" manifest="./MANIFEST1.MF" basedir="${dest}"/>
</target>
<target name="gexApp1" depends="clean, init, compile,copy-images, build1" description="build applet 1"/>
<!-- run. This just run jar file without rebuild. -->
<target name="run" description="Run jar file">
<java jar="${out}/${jgex_jar}" classpath="${out}/"
fork="true"
failonerror="true"
maxmemory="128m"/>
</target>
</project>