-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
75 lines (67 loc) · 3.23 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
<project default="info">
<property environment="env"/>
<path id="classpath">
<fileset dir="${env.AIR_HOME}/lib" includes="compiler.jar"/>
</path>
<target name="info">
<available file="${env.AIR_HOME}/lib/ascsh.jar" property="no"/>
<echo message="----------------------------------------------------------------" />
<echo message="available targets:" />
<echo message=" compile - compiles source class files" />
<echo message=" jar - builds dist/ascsh.jar" />
<echo message=" install - installs ascsh.jar and ascshd into your AIR SDK" />
<echo message=" at $AIR_HOME for command-line use" />
<echo message=" uninstall - removes ascsh.jar/ascshd from your AIR SDK" />
<echo message="----------------------------------------------------------------" />
<echo message="Current $AIR_HOME: ${env.AIR_HOME}" />
<echo message="ascsh installed? ${no}"/>
<echo message="----------------------------------------------------------------" />
</target>
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile">
<mkdir dir="build/classes"/>
<javac source="1.6" target="1.6" srcdir="src/java" destdir="build/classes" classpathref="classpath" includeantruntime="false"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/ascsh.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="ascsh"/>
<attribute name="Class-Path" value="compiler.jar"/>
</manifest>
</jar>
<mkdir dir="dist"/>
<copy todir="dist" overwrite="true">
<fileset dir="build/jar" includes="ascsh.jar"/>
</copy>
</target>
<target name="install" depends="compile" description="Install ascsh/ascshd into AIR_SDK">
<echo message="----------------------------------------------------------------" />
<echo message="Installing ascsh to AIR_HOME at ${env.AIR_HOME}" />
<echo message="----------------------------------------------------------------" />
<copy todir="${env.AIR_HOME}/lib" overwrite="true">
<fileset dir="build/classes"/>
</copy>
<copy todir="${env.AIR_HOME}/bin" overwrite="true">
<fileset dir="src/bin"/>
</copy>
<chmod perm="ugo+rx">
<fileset dir="${env.AIR_HOME}/bin" includes="ascsh*" defaultexcludes="false"/>
</chmod>
<echo message="----------------------------------------------------------------" />
</target>
<target name="uninstall" description="Uninstall ascsh/ascshd from AIR_SDK">
<echo message="----------------------------------------------------------------" />
<echo message="Uninstalling ascsh from AIR_HOME at ${env.JAVA_HOME}" />
<echo message="----------------------------------------------------------------" />
<echo message="Deleting lib/ascsh*.class, bin/ascsh*" />
<delete>
<fileset dir="${env.AIR_HOME}/lib" includes="ascsh*.class" defaultexcludes="false"/>
<fileset dir="${env.AIR_HOME}/bin" includes="ascsh*" defaultexcludes="false"/>
<fileset dir="${env.AIR_HOME}/lib" includes="Commandline.class" defaultexcludes="false"/>
</delete>
<echo message="----------------------------------------------------------------" />
</target>
</project>