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/nearclick/build.xml

    r12781 r14003  
    11<project name="nearclick" default="dist" basedir=".">
    2 <!-- compilation properties -->
    3     <property name="josm.build.dir"   value="../../core"/>
    4     <property name="josm.home.dir"    value="${user.home}/.josm"/>
    5     <property name="josm"         location="../../core/dist/josm-custom.jar" />
    6     <property name="plugin.build.dir" value="build"/>
    7     <property name="plugin.dist.dir"  value="../../dist"/>
    8     <property name="plugin.name"      value="${ant.project.name}"/>
    9     <property name="plugin.jar"       value="../../dist/${plugin.name}.jar"/>
    10 <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
    11     <property name="josm" location="../../core/dist/josm-custom.jar" />
    12 <!-- target directory to place the plugin in -->
    13 <!-- Windows has a different home directory scheme then unix/linux -->
    14 <!-- I don't know an automatic way to find it with ant :-(, if you know, please fix -->
    15 <!--<property name="plugins" location="${user.home}/.josm/plugins" ></property>-->
    16     <property name="plugins" location="${user.home}/Application Data/JOSM/plugins" ></property>
    17 <!-- you should not need to modify anything below this! -->
     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"/>
    197    <target name="init">
    20         <mkdir dir="build"></mkdir>
     8        <mkdir dir="${plugin.build.dir}"/>
    219    </target>
    2210    <target name="compile" depends="init">
    2311        <echo message="creating ${plugin.jar}"/>
    24         <javac srcdir="src" target="1.5" classpath="${josm}" destdir="build" debug="true">
    25             <include name="**/*.java" />
     12        <javac srcdir="src" classpath="${josm}" debug="false" destdir="${plugin.build.dir}">
     13            <compilerarg value="-Xlint:deprecation"/>
     14            <compilerarg value="-Xlint:unchecked"/>
    2615        </javac>
    2716    </target>
    28     <target name="dist" depends="compile">
    29 <!-- define the version of the jar file -->
     17    <target name="dist" depends="compile,revision">
     18        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     19            <manifest>
     20                <attribute name="Author" value="Imi, David Earl"/>
     21                <attribute name="Plugin-Class" value="nearclick.NearClickPlugin"/>
     22                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     23                <attribute name="Plugin-Description" value="Simulates a click when you do a small and short drag. This is usefull for tablet pens, when you have problems just clicking the tablet without the mouse moving (general Java - tablet problem)."/>
     24                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Nearclick"/>
     25                <attribute name="Plugin-Mainversion" value="1465"/>
     26                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     27            </manifest>
     28        </jar>
     29    </target>
     30    <target name="revision">
    3031        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    3132            <env key="LANG" value="C"/>
     
    3536        </exec>
    3637        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    37 <!-- delete intermediate file -->
    3838        <delete file="REVISION"/>
    39         <jar destfile="${plugin.jar}" basedir="build">
    40             <manifest>
    41                 <attribute name="Plugin-Class" value="nearclick.NearClickPlugin" />
    42                 <attribute name="Plugin-Description" value="Simulates a click when you do a small and short drag. This is usefull for tablet pens, when you have problems just clicking the tablet without the mouse moving (general Java - tablet problem)." />
    43                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    44                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    45                 <attribute name="Plugin-Mainversion" value="1180" />
    46             </manifest>
    47         </jar>
    4839    </target>
    4940    <target name="clean">
    50         <delete dir="${plugin.build.dir}" />
    51         <delete file="${plugin.jar}" />
    52     </target>
    53     <target name="clean_install">
    54         <delete file="${plugins}/nearclick.jar" />
     41        <delete dir="${plugin.build.dir}"/>
     42        <delete file="${plugin.jar}"/>
    5543    </target>
    5644    <target name="install" depends="dist">
    57         <copy file="${plugin.jar}" todir="${plugins}"/>
     45        <property environment="env"/>
     46        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     47            <and>
     48                <os family="windows"/>
     49            </and>
     50        </condition>
     51        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    5852    </target>
    5953</project>
Note: See TracChangeset for help on using the changeset viewer.