Ignore:
Timestamp:
2009-03-08T12:02:49+01:00 (16 years ago)
Author:
stoecker
Message:

cleanup build scripts and manifests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/globalsat/build.xml

    r12780 r14003  
    11<project name="globalsat" default="dist" basedir=".">
    2 <!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
    3     <property environment="env"/>
    4     <condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
    5         <and>
    6             <os family="windows"/>
    7         </and>
    8     </condition>
    9 <!-- compilation properties -->
    10     <property name="josm.build.dir"   value="../../core"/>
    11     <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
    12     <property name="josm"             location="../../core/dist/josm-custom.jar" />
    13     <property name="RXTX"             location="./libs/RXTXcomm.jar" />
    14     <property name="plugin.build.dir" value="build"/>
    15     <property name="plugin.dist.dir"  value="../../dist"/>
    16     <property name="plugin.name"      value="${ant.project.name}"/>
    17     <property name="plugin.jar"       value="../../dist/${plugin.name}.jar"/>
     2    <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
     3    <property name="plugin.dist.dir"        value="../../dist"/>
     4    <property name="plugin.build.dir"       value="build"/>
     5    <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    186    <property name="ant.build.javac.target" value="1.5"/>
    19     <path id="classpath">
    20         <fileset id="RXTX" file="${RXTX}"/>
    21         <fileset file="${josm}"/>
    22     </path>
    23     <target name="dist" depends="compile">
    24         <unjar dest="build">
    25             <fileset refid="RXTX" />
    26         </unjar>
    27 <!-- images -->
    28         <copy todir="build/images">
    29             <fileset dir="images" />
     7    <property name="RXTX"                   location="./libs/RXTXcomm.jar"/>
     8    <target name="init">
     9        <mkdir dir="${plugin.build.dir}"/>
     10    </target>
     11    <target name="compile" depends="init">
     12        <echo message="creating ${plugin.jar}"/>
     13        <javac srcdir="src" debug="false" destdir="${plugin.build.dir}">
     14            <compilerarg value="-Xlint:deprecation"/>
     15            <compilerarg value="-Xlint:unchecked"/>
     16            <classpath>
     17                <pathelement location="${josm}"/>
     18                <pathelement location="${RXTX}"/>
     19            </classpath>
     20        </javac>
     21    </target>
     22    <target name="dist" depends="compile,revision">
     23        <unjar dest="${plugin.build.dir}" src="${RXTX}"/>
     24        <copy todir="${plugin.build.dir}/images">
     25            <fileset dir="images"/>
    3026        </copy>
     27        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     28            <manifest>
     29                <attribute name="Author" value="Raphael Mack"/>
     30                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.globalsat.GlobalsatPlugin"/>
     31                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     32                <attribute name="Plugin-Description" value="Download GPS points from Globalsat dg100 data logger directly in JOSM."/>
     33                <attribute name="Plugin-Link" value="http://www.raphael-mack.de/josm-globalsat-gpx-import-plugin/"/>
     34                <attribute name="Plugin-Mainversion" value="1465"/>
     35                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     36            </manifest>
     37        </jar>
     38    </target>
     39    <target name="revision">
    3140        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    3241            <env key="LANG" value="C"/>
     
    3746        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    3847        <delete file="REVISION"/>
    39         <jar destfile="${plugin.jar}" basedir="build">
    40             <manifest>
    41                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.globalsat.GlobalsatPlugin" />
    42                 <attribute name="Plugin-Description" value="Provide a dialog to read stored tracks from a Globalsat DG100 datalogger into a GPX-layer. Depends on installed rxtx library." />
    43                 <attribute name="Plugin-Author" value="ramack@raphael-mack.de" />
    44                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    45                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    46                 <attribute name="Plugin-Mainversion" value="1180"/>
    47             </manifest>
    48         </jar>
    49     </target>
    50     <target name="compile" depends="init">
    51         <echo message="creating ${plugin.jar}"/>
    52         <javac srcdir="src" classpathref="classpath" destdir="build">
    53             <compilerarg value="-Xlint:deprecation"/>
    54         </javac>
    55     </target>
    56     <target name="init">
    57         <mkdir dir="${plugin.build.dir}" />
    5848    </target>
    5949    <target name="clean">
    60         <delete dir="${plugin.build.dir}" />
    61         <delete file="${plugin.jar}" />
     50        <delete dir="${plugin.build.dir}"/>
     51        <delete file="${plugin.jar}"/>
    6252    </target>
    6353    <target name="install" depends="dist">
     54        <property environment="env"/>
     55        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     56            <and>
     57                <os family="windows"/>
     58            </and>
     59        </condition>
    6460        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    6561    </target>
Note: See TracChangeset for help on using the changeset viewer.