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

i18n update, split plugin and core translation

Location:
applications/editors/josm/plugins/multipoly-convert
Files:
31 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/multipoly-convert/build.xml

    r25192 r26174  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<!--
    33** This is the build file for the multipoly-convert plugin.
     
    2929-->
    3030<project name="multipoly-convert" default="dist" basedir=".">
    31 
    32 
    33         <!-- enter the SVN commit message -->
    34         <property name="commit.message" value="Changed the constructor signature of the plugin main class" />
    35         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    36         <property name="plugin.main.version" value="3835" />
    37 
    38 
    39         <!-- compilation properties -->
    40         <property name="josm.build.dir" value="../../core" />
    41         <property name="josm.home.dir" value="${user.home}/.josm" />
    42         <property name="josm" location="../../core/dist/josm-custom.jar" />
    43         <property name="plugin.build.dir" value="build" />
    44         <property name="plugin.dist.dir" value="../../dist" />
    45         <property name="plugin.name" value="${ant.project.name}" />
    46         <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.name}.jar" />
    47 
    48         <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
    49         <property name="josm" location="../../core/dist/josm-custom.jar" />
    50 
    51         <property name="ant.build.javac.target" value="1.5" />
    52 
    53         <target name="init">
    54                 <mkdir dir="${plugin.build.dir}">
    55                 </mkdir>
    56                 <mkdir dir="${plugin.dist.dir}">
    57                 </mkdir>
    58         </target>
    59 
    60         <target name="compile" depends="init">
    61                 <echo message="creating ${plugin.jar}" />
    62                 <javac srcdir="src" target="1.5" classpath="${josm}" destdir="build" debug="true">
    63                         <include name="**/*.java" />
    64                 </javac>
    65         </target>
    66 
    67         <target name="revision">
    68                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    69                         <env key="LANG" value="C" />
    70                         <arg value="info" />
    71                         <arg value="--xml" />
    72                         <arg value="." />
    73                 </exec>
    74                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
    75                 <delete file="REVISION" />
    76         </target>
    77 
    78         <target name="dist" depends="compile,revision">
    79                 <copy todir="${plugin.build.dir}/images">
    80                         <fileset dir="images" />
    81                 </copy>
    82                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    83                         <manifest>
    84                                 <attribute name="Author" value="Stéphane Brunner" />
    85                                 <attribute name="Plugin-Class" value="converttomultipoly.MultipolyPlugin" />
    86                                 <attribute name="Plugin-Description" value="Simply convert an area to a multipolygon." />
    87                                 <attribute name="Plugin-Icon" value="images/multipoly_convert.png"/>
    88                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
    89                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
    90                                 <attribute name="Plugin-Link" value="http://www.stephane-brunner.ch/mediawiki/index.php/Plugins" />
    91                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
    92                                 <!--attribute name="2830_Plugin-Url" value="20583;http://trac.openstreetmap.org/browser/applications/editors/josm/dist/multipoly-convert.jar?rev=20584&amp;format=raw" /-->
    93                         </manifest>
    94                 </jar>
    95         </target>
    96 
    97         <target name="clean">
    98                 <delete dir="${plugin.build.dir}" />
    99                 <delete file="${plugin.jar}" />
    100         </target>
    101 
    102         <target name="clean_install">
    103                 <delete file="${plugins}/multipoly-convert.jar" />
    104         </target>
    105 
    106         <target name="install" depends="dist">
    107                 <property environment="env" />
    108                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    109                         <and>
    110                                 <os family="windows" />
    111                         </and>
    112                 </condition>
    113                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
    114         </target>
    115 
    116         <!--
    117         ************************** Publishing the plugin ***********************************
    118         -->
    119         <!--
    120                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    121                 ** property ${coreversion.info.entry.revision}
    122                 **
    123                 -->
    124         <target name="core-info">
    125                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    126                         <env key="LANG" value="C" />
    127                         <arg value="info" />
    128                         <arg value="--xml" />
    129                         <arg value="../../core" />
    130                 </exec>
    131                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />
    132                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    133                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    134                 <delete file="core.info.xml" />
    135         </target>
    136 
    137         <!--
    138                 ** commits the source tree for this plugin
    139                 -->
    140         <target name="commit-current">
    141                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    142                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    143                         <env key="LANG" value="C" />
    144                         <arg value="commit" />
    145                         <arg value="-m '${commit.message}'" />
    146                         <arg value="." />
    147                 </exec>
    148         </target>
    149 
    150         <!--
    151                 ** updates (svn up) the source tree for this plugin
    152                 -->
    153         <target name="update-current">
    154                 <echo>Updating plugin source ...</echo>
    155                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    156                         <env key="LANG" value="C" />
    157                         <arg value="up" />
    158                         <arg value="." />
    159                 </exec>
    160                 <echo>Updating ${plugin.jar} ...</echo>
    161                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    162                         <env key="LANG" value="C" />
    163                         <arg value="up" />
    164                         <arg value="../dist/${plugin.jar}" />
    165                 </exec>
    166         </target>
    167 
    168         <!--
    169                 ** commits the plugin.jar
    170                 -->
    171         <target name="commit-dist">
    172                 <echo>
    173         ***** Properties of published ${plugin.jar} *****
    174         Commit message    : '${commit.message}'                                 
    175         Plugin-Mainversion: ${plugin.main.version}
    176         JOSM build version: ${coreversion.info.entry.revision}
    177         Plugin-Version    : ${version.entry.commit.revision}
    178         ***** / Properties of published ${plugin.jar} *****                                     
    179                                                
    180         Now commiting ${plugin.jar} ...
    181         </echo>
    182                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    183                         <env key="LANG" value="C" />
    184                         <arg value="-m '${commit.message}'" />
    185                         <arg value="commit" />
    186                         <arg value="${plugin.jar}" />
    187                 </exec>
    188         </target>
    189 
    190         <!-- ** make sure svn is present as a command line tool ** -->
    191         <target name="ensure-svn-present">
    192                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    193                         <env key="LANG" value="C" />
    194                         <arg value="--version" />
    195                 </exec>
    196                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    197                         <!-- return code not set at all? Most likely svn isn't installed -->
    198                         <condition>
    199                                 <not>
    200                                         <isset property="svn.exit.code" />
    201                                 </not>
    202                         </condition>
    203                 </fail>
    204                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    205                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    206                         <condition>
    207                                 <isfailure code="${svn.exit.code}" />
    208                         </condition>
    209                 </fail>
    210         </target>
    211 
    212         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    213         </target>
    214 
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <!-- compilation properties -->
     36    <property name="josm.build.dir" value="../../core"/>
     37    <property name="josm.home.dir" value="${user.home}/.josm"/>
     38    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     39    <property name="plugin.build.dir" value="build"/>
     40    <property name="plugin.dist.dir" value="../../dist"/>
     41    <property name="plugin.name" value="${ant.project.name}"/>
     42    <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.name}.jar"/>
     43    <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary -->
     44    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     45    <property name="ant.build.javac.target" value="1.5"/>
     46    <target name="init">
     47        <mkdir dir="${plugin.build.dir}">
     48        </mkdir>
     49        <mkdir dir="${plugin.dist.dir}">
     50        </mkdir>
     51    </target>
     52    <target name="compile" depends="init">
     53        <echo message="creating ${plugin.jar}"/>
     54        <javac srcdir="src" target="1.5" classpath="${josm}" destdir="build" debug="true">
     55            <include name="**/*.java"/>
     56        </javac>
     57    </target>
     58    <target name="revision">
     59        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     60            <env key="LANG" value="C"/>
     61            <arg value="info"/>
     62            <arg value="--xml"/>
     63            <arg value="."/>
     64        </exec>
     65        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     66        <delete file="REVISION"/>
     67    </target>
     68    <target name="dist" depends="compile,revision">
     69        <copy todir="${plugin.build.dir}/images">
     70            <fileset dir="images"/>
     71        </copy>
     72        <copy todir="${plugin.build.dir}/data">
     73            <fileset dir="data"/>
     74        </copy>
     75        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     76            <manifest>
     77                <attribute name="Author" value="Stéphane Brunner"/>
     78                <attribute name="Plugin-Class" value="converttomultipoly.MultipolyPlugin"/>
     79                <attribute name="Plugin-Description" value="Simply convert an area to a multipolygon."/>
     80                <attribute name="Plugin-Icon" value="images/multipoly_convert.png"/>
     81                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     82                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     83                <attribute name="Plugin-Link" value="http://www.stephane-brunner.ch/mediawiki/index.php/Plugins"/>
     84                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     85                <!--attribute name="2830_Plugin-Url" value="20583;http://trac.openstreetmap.org/browser/applications/editors/josm/dist/multipoly-convert.jar?rev=20584&amp;format=raw" /-->
     86            </manifest>
     87        </jar>
     88    </target>
     89    <target name="clean">
     90        <delete dir="${plugin.build.dir}"/>
     91        <delete file="${plugin.jar}"/>
     92    </target>
     93    <target name="clean_install">
     94        <delete file="${plugins}/multipoly-convert.jar"/>
     95    </target>
     96    <target name="install" depends="dist">
     97        <property environment="env"/>
     98        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     99            <and>
     100                <os family="windows"/>
     101            </and>
     102        </condition>
     103        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     104    </target>
     105    <!--
     106    ************************** Publishing the plugin ***********************************
     107    -->
     108    <!--
     109        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     110        ** property ${coreversion.info.entry.revision}
     111        **
     112        -->
     113    <target name="core-info">
     114        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     115            <env key="LANG" value="C"/>
     116            <arg value="info"/>
     117            <arg value="--xml"/>
     118            <arg value="../../core"/>
     119        </exec>
     120        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     121        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     122        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     123        <delete file="core.info.xml"/>
     124    </target>
     125    <!--
     126        ** commits the source tree for this plugin
     127        -->
     128    <target name="commit-current">
     129        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     130        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     131            <env key="LANG" value="C"/>
     132            <arg value="commit"/>
     133            <arg value="-m '${commit.message}'"/>
     134            <arg value="."/>
     135        </exec>
     136    </target>
     137    <!--
     138        ** updates (svn up) the source tree for this plugin
     139        -->
     140    <target name="update-current">
     141        <echo>Updating plugin source ...</echo>
     142        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     143            <env key="LANG" value="C"/>
     144            <arg value="up"/>
     145            <arg value="."/>
     146        </exec>
     147        <echo>Updating ${plugin.jar} ...</echo>
     148        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     149            <env key="LANG" value="C"/>
     150            <arg value="up"/>
     151            <arg value="../dist/${plugin.jar}"/>
     152        </exec>
     153    </target>
     154    <!--
     155        ** commits the plugin.jar
     156        -->
     157    <target name="commit-dist">
     158        <echo>
     159    ***** Properties of published ${plugin.jar} *****
     160    Commit message    : '${commit.message}'                 
     161    Plugin-Mainversion: ${plugin.main.version}
     162    JOSM build version: ${coreversion.info.entry.revision}
     163    Plugin-Version    : ${version.entry.commit.revision}
     164    ***** / Properties of published ${plugin.jar} *****                 
     165                       
     166    Now commiting ${plugin.jar} ...
     167    </echo>
     168        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     169            <env key="LANG" value="C"/>
     170            <arg value="-m '${commit.message}'"/>
     171            <arg value="commit"/>
     172            <arg value="${plugin.jar}"/>
     173        </exec>
     174    </target>
     175    <!-- ** make sure svn is present as a command line tool ** -->
     176    <target name="ensure-svn-present">
     177        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     178            <env key="LANG" value="C"/>
     179            <arg value="--version"/>
     180        </exec>
     181        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     182            <!-- return code not set at all? Most likely svn isn't installed -->
     183            <condition>
     184                <not>
     185                    <isset property="svn.exit.code"/>
     186                </not>
     187            </condition>
     188        </fail>
     189        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     190            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     191            <condition>
     192                <isfailure code="${svn.exit.code}"/>
     193            </condition>
     194        </fail>
     195    </target>
     196    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     197    </target>
    215198</project>
Note: See TracChangeset for help on using the changeset viewer.