1 | <project name="Lakewalker" default="dist" basedir=".">
|
---|
2 |
|
---|
3 | <!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
|
---|
4 | <property environment="env"/>
|
---|
5 | <condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
|
---|
6 | <and>
|
---|
7 | <os family="windows"/>
|
---|
8 | </and>
|
---|
9 | </condition>
|
---|
10 |
|
---|
11 | <!-- compilation properties -->
|
---|
12 | <property name="josm.build.dir" value="../../core"/>
|
---|
13 | <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
|
---|
14 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
15 | <property name="plugin.build.dir" value="build"/>
|
---|
16 | <property name="plugin.dist.dir" value="../dist"/>
|
---|
17 | <property name="plugin.name" value="${ant.project.name}"/>
|
---|
18 | <property name="plugin.jar" value="../dist/${plugin.name}.jar"/>
|
---|
19 |
|
---|
20 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
21 |
|
---|
22 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
23 |
|
---|
24 | <target name="init">
|
---|
25 | <mkdir dir="${plugin.build.dir}"/>
|
---|
26 | </target>
|
---|
27 |
|
---|
28 | <target name="compile" depends="init">
|
---|
29 | <mkdir dir="build"></mkdir>
|
---|
30 | <mkdir dir="build/images"></mkdir>
|
---|
31 | <copy todir="build">
|
---|
32 | <fileset dir="${plugin.build.dir}" casesensitive="yes">
|
---|
33 | <filename name="**/*.class"/>
|
---|
34 | </fileset>
|
---|
35 | </copy>
|
---|
36 | <copy todir="build/images">
|
---|
37 | <fileset dir="images" casesensitive="yes">
|
---|
38 | <filename name="**/*.png"/>
|
---|
39 | </fileset>
|
---|
40 | </copy>
|
---|
41 | </target>
|
---|
42 |
|
---|
43 | <target name="dist" depends="compile">
|
---|
44 | <jar destfile="${plugin.jar}" basedir="build">
|
---|
45 | <manifest>
|
---|
46 | <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.lakewalker.LakewalkerPlugin" />
|
---|
47 | <attribute name="Plugin-Description" value="Interface to Lakewalker module" />
|
---|
48 | <attribute name="Plugin-Version" value="0.1"/>
|
---|
49 | <attribute name="Author" value="Brent Easton <b.easton@uws.edu.au>"/>
|
---|
50 | </manifest>
|
---|
51 | </jar>
|
---|
52 | </target>
|
---|
53 |
|
---|
54 | <target name="clean">
|
---|
55 | <delete dir="${plugin.build.dir}" />
|
---|
56 | <delete file="${plugin.jar}" />
|
---|
57 | </target>
|
---|
58 |
|
---|
59 | <target name="install" depends="dist">
|
---|
60 | <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
|
---|
61 | <copy todir="${user.home}/Application Data/JOSM/plugins/Lakewalker">
|
---|
62 | <fileset dir="Lakewalker">
|
---|
63 | <filename name = "*.py"/>
|
---|
64 | </fileset>
|
---|
65 | </copy>
|
---|
66 | </target>
|
---|
67 |
|
---|
68 | </project>
|
---|