-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
54 lines (46 loc) · 2 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
<?xml version="1.0"?>
<project name="Arduino Updater" default="build">
<target name="clean" description="Clean the build directories">
<delete dir="bin" />
</target>
<target name="compile" description="Compile sources">
<mkdir dir="bin" />
<!-- ant seems to nuke ${java.home} for some reason, pointing at the JRE
subfolder instead of the actual JDK found at JAVA_HOME.
To avoid this, we grab the actual JAVA_HOME environment variable
and use that to specify the location of tools.jar. -->
<!-- if someone is better with ant please help clean this up -->
<property environment="env" />
<property name="java_home" value="${env.JAVA_HOME}" />
<condition property="linux"><os family="unix" /></condition>
<fail if="linux" unless="java_home"
message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Ubuntu Linux, this might be /usr/lib/jvm/java-6-sun." />
<condition property="windows"><os family="windows" /></condition>
<fail if="windows" unless="java_home"
message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Windows, this might be c:\jdk1.6.0_18." />
<!--
<dirname property="blah" file="${java.home}" />
<echo message="here! ${java.home}/lib/tools.jar or there: ${blah}" />
<echo message="override ${env.JAVA_HOME}/lib/tools.jar" />
<fail />
-->
<javac source="1.6" target="1.6"
srcdir="src"
destdir="bin"
encoding="UTF-8"
includeAntRuntime="false"
debug="true"
classpath="${env.JAVA_HOME}/lib/tools.jar;" />
<copy todir="bin" overwrite="true" verbose="true">
<fileset dir="src" includes="**/*.properties" />
</copy>
</target>
<target name="build" depends="compile" description="Build Updater">
<jar basedir="bin" destfile="arduinoupdater.jar">
<manifest>
<attribute name="Main-Class" value="arduinoupdater.UpdaterMain"/>
</manifest>
</jar>
<!-- <classpath path="${classpath}"/> -->
</target>
</project>