-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
124 lines (108 loc) · 4.4 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="packageRobots" name="robots">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<!--Set to 1.6 to be able to run on all systems.
Recommend to switch to 1.8 java once more people have it.
Java 1.8 has really cool features, (cough lambdas cough)-->
<property name="source" value="1.7"/>
<property name="target" value="1.7"/>
<property name="bin" location="bin"/>
<property name="lib" location="lib"/>
<property name="src" location="src"/>
<property name="conf" location="conf"/>
<property name="build" location="build"/>
<property name="build_controllers" location="${build}/controllers"/>
<property name="build_controllers_lib" location="${build_controllers}/lib"/>
<property name="build_robots" location="${build}/robots"/>
<property name="build_robots_lib" location="${build_robots}/lib"/>
<path id="common.classpath">
<pathelement location="${bin}"/>
<pathelement location="${lib}/JInput/x86/jinput.jar"/>
<pathelement location="${lib}/RXTX/x86/RXTXcomm.jar"/>
</path>
<path id="controllers.classpath">
<path refid="common.classpath"/>
</path>
<path id="robots.classpath">
<path refid="common.classpath"/>
<pathelement location="${lib}/args4j-2.0.29.jar"/>
<pathelement location="${lib}/BullDog/Debian_Ubuntu/bulldog.beagleboneblack.hardfp.jar"/>
</path>
<target depends="buildControllers,buildRobots" name="buildAll"/>
<target depends="packageControllers,packageRobots" name="packageAll"/>
<target name="init">
<mkdir dir="${bin}"/>
<copy includeemptydirs="false" todir="${bin}">
<fileset dir="src">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="cleanAll">
<delete dir="${bin}"/>
<delete dir="${build}"/>
<delete file="robots_v2.zip"/>
</target>
<target depends="init" name="buildControllers">
<javac debug="true" debuglevel="${debuglevel}" destdir="${bin}" includeantruntime="false" source="${source}" target="${target}">
<src path="${src}/org/illinoistechrobotics/common"/>
<src path="${src}/org/illinoistechrobotics/controller"/>
<classpath refid="controllers.classpath"/>
</javac>
</target>
<target depends="init" name="buildRobots">
<javac debug="true" debuglevel="${debuglevel}" destdir="${bin}" includeantruntime="false" source="${source}" target="${target}">
<src path="${src}/org/illinoistechrobotics/common"/>
<src path="${src}/org/illinoistechrobotics/robot"/>
<src path="${src}/org/illinoistechrobotics/jaguar"/>
<classpath refid="robots.classpath"/>
</javac>
</target>
<target depends="buildControllers" name="packageControllers">
<jar destfile="${build_controllers}/controllers.jar">
<manifest>
<attribute name="Main-Class" value="org.illinoistechrobotics.controller.GUI"/>
</manifest>
<fileset dir="${bin}"/>
</jar>
<copy todir="${build_controllers_lib}/JInput">
<fileset dir="${lib}/JInput"/>
</copy>
<copy todir="${build_controllers_lib}/RXTX">
<fileset dir="${lib}/RXTX"/>
</copy>
<copy todir="${build_controllers}">
<fileset dir="${conf}/controllers"/>
</copy>
<chmod file="${build_controllers}/LinRun.sh" perm="+x"/>
<chmod file="${build_controllers}/BBBRun.sh" perm="+x"/>
</target>
<target depends="buildRobots" name="packageRobots">
<jar destfile="${build_robots}/robots.jar">
<manifest>
<attribute name="Main-Class" value="org.illinoistechrobotics.robot.RobotMain"/>
</manifest>
<fileset dir="${bin}"/>
</jar>
<copy todir="${build_robots_lib}/JInput">
<fileset dir="${lib}/JInput"/>
</copy>
<copy todir="${build_robots_lib}/RXTX">
<fileset dir="${lib}/RXTX"/>
</copy>
<copy todir="${build_robots_lib}/BullDog">
<fileset dir="${lib}/BullDog"/>
</copy>
<copy todir="${build_robots}">
<fileset dir="${conf}/robots"/>
</copy>
<copy file="${lib}/args4j-2.0.29.jar" todir="${build_robots_lib}"/>
<chmod file="${build_robots}/LinRun.sh" perm="+x"/>
<chmod file="${build_robots}/BBBRun.sh" perm="+x"/>
</target>
<target depends="packageAll" name="deployAll">
<zip destfile="robots_v2.zip" basedir="${build}"/>
</target>
</project>