source: subversion/applications/editors/josm/plugins/lakewalker/build.xml @ 6910

Last change on this file since 6910 was 6910, checked in by jrreid, 12 years ago

Updates to lakewalker to add native java port of the python script (consider it an alpha release). Older style of calling the python script still supported (via an additional menu item)

File size: 2.8 KB
Line 
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    <javac srcdir="src" classpath="${josm}" destdir="build" debug="true">
31          <include name="**/*.java" />
32        </javac>
33    <mkdir dir="build/images"></mkdir>
34    <copy todir="build">
35      <fileset dir="${plugin.build.dir}" casesensitive="yes">
36        <filename name="**/*.class"/>
37      </fileset>
38    </copy>
39    <copy todir="build/images">
40      <fileset dir="images" casesensitive="yes">
41        <filename name="**/*.png"/>
42      </fileset>
43    </copy>
44  </target>
45
46  <target name="dist" depends="compile">
47    <jar destfile="${plugin.jar}" basedir="build">
48      <manifest>
49        <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.lakewalker.LakewalkerPlugin" />
50        <attribute name="Plugin-Description" value="Interface to Lakewalker module" />
51        <attribute name="Plugin-Version" value="0.2"/>
52        <attribute name="Author" value="Brent Easton &lt;b.easton@uws.edu.au>, Jason Reid &lt;jrreid@ucalgary.ca>"/>
53                <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.lakewalker.LakewalkerApp"/>
54      </manifest>
55    </jar>
56  </target>
57
58  <target name="clean">
59    <delete dir="${plugin.build.dir}" />
60    <delete file="${plugin.jar}" />
61  </target>
62
63  <target name="install" depends="dist">
64    <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
65    <copy todir="${josm.plugins.dir}/Lakewalker">
66      <fileset dir="Lakewalker">
67                <filename name = "*.py"/>
68      </fileset>
69    </copy>
70        <mkdir dir="${josm.plugins.dir}/Lakewalker/IR1"></mkdir>
71        <mkdir dir="${josm.plugins.dir}/Lakewalker/IR2"></mkdir>
72        <mkdir dir="${josm.plugins.dir}/Lakewalker/IR3"></mkdir>
73  </target>
74
75</project>
Note: See TracBrowser for help on using the repository browser.