Ignore:
Timestamp:
2011-06-25T19:02:31+02:00 (14 years ago)
Author:
stoecker
Message:

i18n update, split plugin and core translation

Location:
applications/editors/josm/plugins/addrinterpolation
Files:
31 added
1 edited

Legend:

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

    r25199 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is a template build file for a JOSM  plugin.
     
    2222-->
    2323<project name="AddrInterpolation" default="dist" basedir=".">
    24 
    25 
    26         <property name="commit.message" value="Impoved Icon" />
    27         <property name="plugin.main.version" value="3835" />
    28 
    29         <!--
     24    <property name="commit.message" value="Impoved Icon"/>
     25    <property name="plugin.main.version" value="3835"/>
     26    <!--
    3027      ************************************************
    3128      ** should not be necessary to change the following properties
    3229     -->
    33         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    34         <property name="plugin.build.dir"       value="build"/>
    35         <property name="plugin.src.dir"         value="src"/>
    36         <!-- this is the directory where the plugin jar is copied to -->
    37         <property name="plugin.dist.dir"        value="../../dist"/>
    38         <property name="ant.build.javac.target" value="1.5"/>
    39         <property name="plugin.dist.dir"        value="../../dist"/>
    40         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    41 
    42         <!--
     30    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     31    <property name="plugin.build.dir" value="build"/>
     32    <property name="plugin.src.dir" value="src"/>
     33    <!-- this is the directory where the plugin jar is copied to -->
     34    <property name="plugin.dist.dir" value="../../dist"/>
     35    <property name="ant.build.javac.target" value="1.5"/>
     36    <property name="plugin.dist.dir" value="../../dist"/>
     37    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     38    <!--
    4339    **********************************************************
    4440    ** init - initializes the build
    4541    **********************************************************
    4642    -->
    47         <target name="init">
    48                 <mkdir dir="${plugin.build.dir}"/>
    49         </target>
    50 
    51         <!--
     43    <target name="init">
     44        <mkdir dir="${plugin.build.dir}"/>
     45    </target>
     46    <!--
    5247    **********************************************************
    5348    ** compile - complies the source tree
    5449    **********************************************************
    5550    -->
    56         <target name="compile" depends="init">
    57                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    58                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    59                         <compilerarg value="-Xlint:deprecation"/>
    60                         <compilerarg value="-Xlint:unchecked"/>
    61                 </javac>
    62         </target>
    63 
    64         <!--
     51    <target name="compile" depends="init">
     52        <echo message="compiling sources for  ${plugin.jar} ... "/>
     53        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     54            <compilerarg value="-Xlint:deprecation"/>
     55            <compilerarg value="-Xlint:unchecked"/>
     56        </javac>
     57    </target>
     58    <!--
    6559    **********************************************************
    6660    ** dist - creates the plugin jar
    6761    **********************************************************
    6862    -->
    69         <target name="dist" depends="compile,revision">
    70                 <echo message="creating ${plugin.jar.name} ... "/>
    71                 <copy todir="${plugin.build.dir}/resources">
    72                         <fileset dir="resources"/>
    73                 </copy>
    74                 <copy todir="${plugin.build.dir}/images">
    75                         <fileset dir="images"/>
    76                 </copy>
    77                 <copy todir="${plugin.build.dir}">
    78                         <fileset dir=".">
    79                                 <include name="README" />
    80                                 <include name="LICENSE" />
    81                         </fileset>
    82                 </copy>
    83                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    84                         <!--
     63    <target name="dist" depends="compile,revision">
     64        <echo message="creating ${plugin.jar.name} ... "/>
     65        <copy todir="${plugin.build.dir}/resources">
     66            <fileset dir="resources"/>
     67        </copy>
     68        <copy todir="${plugin.build.dir}/images">
     69            <fileset dir="images"/>
     70        </copy>
     71        <copy todir="${plugin.build.dir}/data">
     72            <fileset dir="data"/>
     73        </copy>
     74        <copy todir="${plugin.build.dir}">
     75            <fileset dir=".">
     76                <include name="README"/>
     77                <include name="LICENSE"/>
     78            </fileset>
     79        </copy>
     80        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     81            <!--
    8582        ************************************************
    8683        ** configure these properties. Most of them will be copied to the plugins
     
    9087        ************************************************
    9188    -->
    92                         <manifest>
    93                                 <attribute name="Author" value="Mike Nice"/>
    94                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/>
    95                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    96                                 <attribute name="Plugin-Description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/>
    97                                 <attribute name="Plugin-Icon" value="images/AddrInterpolation.png"/>
    98                                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/>
    99                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    100                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    101                         </manifest>
    102                 </jar>
    103         </target>
    104 
    105         <!--
     89            <manifest>
     90                <attribute name="Author" value="Mike Nice"/>
     91                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/>
     92                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     93                <attribute name="Plugin-Description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/>
     94                <attribute name="Plugin-Icon" value="images/AddrInterpolation.png"/>
     95                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/>
     96                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     97                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     98            </manifest>
     99        </jar>
     100    </target>
     101    <!--
    106102    **********************************************************
    107103    ** revision - extracts the current revision number for the
     
    110106    **********************************************************
    111107    -->
    112         <target name="revision">
    113                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    114                         <env key="LANG" value="C"/>
    115                         <arg value="info"/>
    116                         <arg value="--xml"/>
    117                         <arg value="."/>
    118                 </exec>
    119                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    120                 <delete file="REVISION"/>
    121         </target>
    122 
    123         <!--
     108    <target name="revision">
     109        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     110            <env key="LANG" value="C"/>
     111            <arg value="info"/>
     112            <arg value="--xml"/>
     113            <arg value="."/>
     114        </exec>
     115        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     116        <delete file="REVISION"/>
     117    </target>
     118    <!--
    124119    **********************************************************
    125120    ** clean - clean up the build environment
    126121    **********************************************************
    127122    -->
    128         <target name="clean">
    129                 <delete dir="${plugin.build.dir}"/>
    130                 <delete file="${plugin.jar}"/>
    131         </target>
    132 
    133         <!--
     123    <target name="clean">
     124        <delete dir="${plugin.build.dir}"/>
     125        <delete file="${plugin.jar}"/>
     126    </target>
     127    <!--
    134128    **********************************************************
    135129    ** install - install the plugin in your local JOSM installation
    136130    **********************************************************
    137131    -->
    138         <target name="install" depends="dist">
    139                 <property environment="env"/>
    140                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    141                         <and>
    142                                 <os family="windows"/>
    143                         </and>
    144                 </condition>
    145                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    146         </target>
    147 
    148         <!--
    149          ************************** Publishing the plugin ***********************************
    150         -->
    151         <!--
    152         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    153         ** property ${coreversion.info.entry.revision}
    154         **
    155         -->
    156         <target name="core-info">
    157                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    158                         <env key="LANG" value="C"/>
    159                         <arg value="info"/>
    160                         <arg value="--xml"/>
    161                         <arg value="../../core"/>
    162                 </exec>
    163                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    164                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    165                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    166                 <delete file="core.info.xml" />
    167         </target>
    168 
    169         <!--
    170         ** commits the source tree for this plugin
    171         -->
    172         <target name="commit-current">
    173                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    174                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    175                         <env key="LANG" value="C"/>
    176                         <arg value="commit"/>
    177                         <arg value="-m '${commit.message}'"/>
    178                         <arg value="."/>
    179                 </exec>
    180         </target>
    181 
    182         <!--
    183         ** updates (svn up) the source tree for this plugin
    184         -->
    185         <target name="update-current">
    186                 <echo>Updating plugin source ...</echo>
    187                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    188                         <env key="LANG" value="C"/>
    189                         <arg value="up"/>
    190                         <arg value="."/>
    191                 </exec>
    192                 <echo>Updating ${plugin.jar} ...</echo>
    193                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    194                         <env key="LANG" value="C"/>
    195                         <arg value="up"/>
    196                         <arg value="../dist/${plugin.jar}"/>
    197                 </exec>
    198         </target>
    199 
    200         <!--
    201         ** commits the plugin.jar
    202         -->
    203         <target name="commit-dist">
    204                 <echo>
     132    <target name="install" depends="dist">
     133        <property environment="env"/>
     134        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     135            <and>
     136                <os family="windows"/>
     137            </and>
     138        </condition>
     139        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     140    </target>
     141    <!--
     142     ************************** Publishing the plugin ***********************************
     143    -->
     144    <!--
     145    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     146    ** property ${coreversion.info.entry.revision}
     147    **
     148    -->
     149    <target name="core-info">
     150        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     151            <env key="LANG" value="C"/>
     152            <arg value="info"/>
     153            <arg value="--xml"/>
     154            <arg value="../../core"/>
     155        </exec>
     156        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     157        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     158        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     159        <delete file="core.info.xml"/>
     160    </target>
     161    <!--
     162    ** commits the source tree for this plugin
     163    -->
     164    <target name="commit-current">
     165        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     166        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     167            <env key="LANG" value="C"/>
     168            <arg value="commit"/>
     169            <arg value="-m '${commit.message}'"/>
     170            <arg value="."/>
     171        </exec>
     172    </target>
     173    <!--
     174    ** updates (svn up) the source tree for this plugin
     175    -->
     176    <target name="update-current">
     177        <echo>Updating plugin source ...</echo>
     178        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     179            <env key="LANG" value="C"/>
     180            <arg value="up"/>
     181            <arg value="."/>
     182        </exec>
     183        <echo>Updating ${plugin.jar} ...</echo>
     184        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     185            <env key="LANG" value="C"/>
     186            <arg value="up"/>
     187            <arg value="../dist/${plugin.jar}"/>
     188        </exec>
     189    </target>
     190    <!--
     191    ** commits the plugin.jar
     192    -->
     193    <target name="commit-dist">
     194        <echo>
    205195***** Properties of published ${plugin.jar} *****
    206 Commit message    : '${commit.message}'                                 
     196Commit message    : '${commit.message}'                 
    207197Plugin-Mainversion: ${plugin.main.version}
    208198JOSM build version: ${coreversion.info.entry.revision}
    209199Plugin-Version    : ${version.entry.commit.revision}
    210 ***** / Properties of published ${plugin.jar} *****                                     
    211                                        
     200***** / Properties of published ${plugin.jar} *****                 
     201                   
    212202Now commiting ${plugin.jar} ...
    213203</echo>
    214                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    215                         <env key="LANG" value="C"/>
    216                         <arg value="-m '${commit.message}'"/>
    217                         <arg value="commit"/>
    218                         <arg value="${plugin.jar}"/>
    219                 </exec>
    220         </target>
    221 
    222         <!-- ** make sure svn is present as a command line tool ** -->
    223         <target name="ensure-svn-present">
    224                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    225                         <env key="LANG" value="C" />
    226                         <arg value="--version" />
    227                 </exec>
    228                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    229                         <!-- return code not set at all? Most likely svn isn't installed -->
    230                         <condition>
    231                                 <not>
    232                                         <isset property="svn.exit.code" />
    233                                 </not>
    234                         </condition>
    235                 </fail>
    236                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    237                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    238                         <condition>
    239                                 <isfailure code="${svn.exit.code}" />
    240                         </condition>
    241                 </fail>
    242         </target>
    243 
    244         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    245         </target>
     204        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     205            <env key="LANG" value="C"/>
     206            <arg value="-m '${commit.message}'"/>
     207            <arg value="commit"/>
     208            <arg value="${plugin.jar}"/>
     209        </exec>
     210    </target>
     211    <!-- ** make sure svn is present as a command line tool ** -->
     212    <target name="ensure-svn-present">
     213        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     214            <env key="LANG" value="C"/>
     215            <arg value="--version"/>
     216        </exec>
     217        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     218            <!-- return code not set at all? Most likely svn isn't installed -->
     219            <condition>
     220                <not>
     221                    <isset property="svn.exit.code"/>
     222                </not>
     223            </condition>
     224        </fail>
     225        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     226            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     227            <condition>
     228                <isfailure code="${svn.exit.code}"/>
     229            </condition>
     230        </fail>
     231    </target>
     232    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     233    </target>
    246234</project>
Note: See TracChangeset for help on using the changeset viewer.