1 | <project name="livegps" 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="../../JOSM/"/> -->
|
---|
13 | <property name="josm.build.dir" value="../../core/"/>
|
---|
14 | <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
|
---|
15 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
16 | <property name="plugin.build.dir" value="build"/>
|
---|
17 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
18 | <property name="plugin.name" value="${ant.project.name}"/>
|
---|
19 | <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
|
---|
20 |
|
---|
21 | <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
|
---|
22 | <property name="livegpsplugin.jar" value="${josm.home.dir}/plugins/livegps.jar"/>
|
---|
23 |
|
---|
24 | <!-- plugin meta data (enter new version number if anything changed!) -->
|
---|
25 | <property name="plugin.description" value="Allow live GPS feed from a gpsd server (V${plugin.version})."/>
|
---|
26 | <property name="plugin.stage" value="50"/>
|
---|
27 | <property name="plugin.class" value="livegps.LiveGpsPlugin"/>
|
---|
28 |
|
---|
29 | <!-- update site meta data -->
|
---|
30 | <property name="plugin.site.file" value="josm-site.xml"/>
|
---|
31 | <property name="plugin.site.description" value="Josm's LiveGps Update Site"/>
|
---|
32 | <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/livegps/"/>
|
---|
33 | <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/livegps/"/>
|
---|
34 |
|
---|
35 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
36 |
|
---|
37 | <target name="init">
|
---|
38 | <mkdir dir="${plugin.build.dir}"/>
|
---|
39 | </target>
|
---|
40 |
|
---|
41 | <target name="dist" depends="compile">
|
---|
42 | <!-- images -->
|
---|
43 | <copy todir="${plugin.build.dir}/images">
|
---|
44 | <fileset dir="images" />
|
---|
45 | </copy>
|
---|
46 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
47 | <env key="LANG" value="C"/>
|
---|
48 | <arg value="info"/>
|
---|
49 | <arg value="--xml"/>
|
---|
50 | <arg value="."/>
|
---|
51 | </exec>
|
---|
52 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
53 | <delete file="REVISION"/>
|
---|
54 |
|
---|
55 | <!-- create jar file -->
|
---|
56 | <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
|
---|
57 | <manifest>
|
---|
58 | <attribute name="Plugin-Class" value="${plugin.class}" />
|
---|
59 | <attribute name="Plugin-Description" value="${plugin.description}" />
|
---|
60 | <attribute name="Plugin-Mainversion" value="1180" />
|
---|
61 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
62 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
63 | <!--attribute name="Plugin-Dependencies" value="org.eigenheimstrasse.josm" /-->
|
---|
64 | <attribute name="Plugin-Stage" value="${plugin.stage}" />
|
---|
65 | </manifest>
|
---|
66 | </jar>
|
---|
67 | </target>
|
---|
68 |
|
---|
69 | <target name="compile" depends="init">
|
---|
70 | <javac srcdir="livegps" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
|
---|
71 | <compilerarg value="-Xlint:deprecation"/>
|
---|
72 | <classpath>
|
---|
73 | <pathelement path="${josm.build.dir}/build"/>
|
---|
74 | <fileset dir="${josm.build.dir}/lib">
|
---|
75 | <include name="../core/build/josm.jar"/>
|
---|
76 | <include name="**/*.jar"/>
|
---|
77 | </fileset>
|
---|
78 | <pathelement location="${plugin.jar}"/>
|
---|
79 | </classpath>
|
---|
80 | </javac>
|
---|
81 | </target>
|
---|
82 |
|
---|
83 | <target name="install" depends="dist">
|
---|
84 | <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
|
---|
85 | <copy file="liveGPS.conf" todir="${josm.plugins.dir}/livegps/" />
|
---|
86 | </target>
|
---|
87 |
|
---|
88 | <target name="clean">
|
---|
89 | <delete dir="${plugin.build.dir}" />
|
---|
90 | <delete file="${plugin.jar}" />
|
---|
91 | </target>
|
---|
92 | </project>
|
---|