forked from NetLogo/GIS-Extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
75 lines (69 loc) · 2.16 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
<?xml version="1.0"?>
<project name="GIS Extension" default="make" basedir=".">
<target name="init">
<tstamp/>
</target>
<target name="make" depends="init">
<exec executable="make">
<arg value="-f" />
<arg path="Makefile" />
<arg value="gis.jar" />
</exec>
</target>
<target name="clean" depends="init">
<exec executable="make">
<arg value="-f" />
<arg path="Makefile" />
<arg value="clean" />
</exec>
<delete dir="dist" />
</target>
<target name="dist" depends="clean,make">
<delete file="gis-dist.zip" />
<delete dir="dist" />
<mkdir dir="dist" />
<zip destfile="dist/GIS-Extension.zip">
<zipfileset dir="."
prefix="gis"
includes="*.jar *.nlogo LICENSE.txt Makefile config.mk manifest.txt" />
<zipfileset dir="./data"
prefix="gis/data"
includes="*.*"
excludes=".*" />
<zipfileset dir="./src"
prefix="gis/src"
includes="*.java"
excludes=".*" />
</zip>
<copy file="LICENSE.txt" todir="dist" />
<!--
<loadfile srcFile="gis-dist.html" property="dist.html" />
-->
<zip destfile="gis-dist.zip">
<zipfileset dir="dist" prefix="gis" includes="**/*" />
</zip>
<delete dir="dist" />
</target>
<target name="copy" depends="init">
<property name="sourceDir" value="${basedir}" />
<property name="targetDir" value="${basedir}/../netlogo/extensions/gis" />
<mkdir dir="${targetDir}"/>
<delete>
<fileset dir="${targetDir}" includes="**/*" />
<dirset dir="${targetDir}" includes="**" />
</delete>
<copy todir="${targetDir}">
<fileset dir="${sourceDir}"
includes="*,data/**/*,doc-files/**/*"
excludes="bin,src,.*"/>
</copy>
<copy todir="${targetDir}/src" flatten="true">
<fileset dir="${sourceDir}/src"
includes="**/*.java"/>
</copy>
<exec dir="${targetDir}" executable="make" os="Mac OS X">
<env key="JAVA_HOME" value="${java.home}/.." />
<arg value="gis.jar" />
</exec>
</target>
</project>