forked from andern/pplex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
106 lines (96 loc) · 4.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0"?>
<project name="pplex" default="jar">
<taskdef resource="proguard/ant/task.properties" classpath="lib/proguard.jar" />
<target name="antlr">
<java classpath="lib/antlr-3.4-complete-no-antlrv2.jar" classname="org.antlr.Tool" fork="true" failonerror="true">
<arg value="-verbose"/>
<arg value="-make"/>
<arg value="-o"/>
<arg path="src/parser/"/>
<arg path="src/parser/LpFileFormat.g"/>
</java>
</target>
<target name="clean" description="remove intermediate files">
<delete dir="bin"/>
<delete dir="src/parser/output"/> <!-- For some reason, ANTLR _sometimes_ creates this dir. -->
<delete file="src/parser/LpFileFormatLexer.java"/>
<delete file="src/parser/LpFileFormatParser.java"/>
<delete file="src/parser/LpFileFormat.tokens"/>
</target>
<target name="clobber" depends="clean" description="remove all artifact files">
<delete file="pplex.jar"/>
<delete file="pplex-applet.jar"/>
</target>
<target name="compile" depends="antlr" description="compile the Java source code to class files">
<mkdir dir="bin"/>
<javac includeantruntime="false" srcdir="src" destdir="bin">
<classpath>
<pathelement location="lib/commons-math3-3.0.jar"/>
<pathelement location="lib/jcoolib.jar"/>
<pathelement location="lib/antlr-runtime-3.1.3.jar"/>
</classpath>
</javac>
</target>
<target name="jarunopt" depends="compile" description="create an unoptimized Jar file for the application">
<jar destfile="bin/pplex-unopt.jar" filesetmanifest="skip">
<zipgroupfileset dir="lib" includes="jcoolib.jar"/>
<zipgroupfileset dir="lib" includes="commons-math3-3.0.jar"/>
<zipgroupfileset dir="lib" includes="antlr-runtime-3.1.3.jar"/>
<fileset dir="bin" includes="**/*.class"/>
<manifest>
<attribute name="Main-class" value="controller/Main"/>
</manifest>
</jar>
</target>
<target name="jar" depends="jarunopt" description="create a Jar file for the application">
<proguard>
-libraryjars "${java.home}/lib/rt.jar"
-injars bin/pplex-unopt.jar
-outjars pplex.jar
-keep class controller.Main { public static void main(java.lang.String[]); }
-dontobfuscate
-dontwarn org.antlr.runtime.tree.DOTTreeGenerator
</proguard>
</target>
<target name="mac" depends="jarunopt" description="create a Jar file for the application">
<proguard>
-libraryjars "${java.home}/../Classes/classes.jar"
-injars bin/pplex-unopt.jar
-outjars pplex.jar
-keep class controller.Main { public static void main(java.lang.String[]); }
-dontobfuscate
-dontwarn org.antlr.runtime.tree.DOTTreeGenerator
</proguard>
</target>
<target name="appletunopt" depends="compile" description="create an unoptimized applet version of pplex as a Jar file">
<jar destfile="bin/pplex-applet-unopt.jar" filesetmanifest="skip">
<zipgroupfileset dir="lib" includes="commons-math3-3.0.jar"/>
<zipgroupfileset dir="lib" includes="jcoolib.jar"/>
<zipgroupfileset dir="lib" includes="antlr-runtime-3.1.3.jar"/>
<fileset dir="bin" includes="**/*.class"/>
<manifest>
<attribute name="Main-class" value="controller/Applet"/>
</manifest>
</jar>
</target>
<target name="applet" depends="appletunopt" description="create a Jar file for the application">
<proguard>
-libraryjars "${java.home}/lib/rt.jar"
-injars bin/pplex-applet-unopt.jar
-outjars pplex-applet.jar
-keep class controller.Applet { public static void main(java.lang.String[]); }
-dontobfuscate
-dontwarn org.antlr.runtime.tree.DOTTreeGenerator
</proguard>
</target>
<target name="macapplet" depends="appletunopt" description="create a Jar file for the application">
<proguard>
-libraryjars "${java.home}/../Classes/classes.jar"
-injars bin/pplex-applet-unopt.jar
-outjars pplex-applet.jar
-keep class controller.Applet { public static void main(java.lang.String[]); }
-dontobfuscate
-dontwarn org.antlr.runtime.tree.DOTTreeGenerator
</proguard>
</target>
</project>