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/piclayer
Files:
30 added
1 edited

Legend:

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

    r25219 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="PicLayer" default="dist" basedir=".">
    24 
    25         <property name="commit.message" value="applied #J5852 (patch by Petschge) - new shear option" />
    26         <property name="plugin.main.version" value="3835" />
    27 
    28         <!--
     24    <property name="commit.message" value="applied #J5852 (patch by Petschge) - new shear option"/>
     25    <property name="plugin.main.version" value="3835"/>
     26    <!--
    2927      ************************************************
    3028      ** should not be necessary to change the following properties
    3129     -->
    32         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    33         <property name="plugin.build.dir"       value="build"/>
    34         <property name="plugin.src.dir"         value="src"/>
    35         <!-- this is the directory where the plugin jar is copied to -->
    36         <property name="plugin.dist.dir"        value="../../dist"/>
    37         <property name="ant.build.javac.target" value="1.5"/>
    38         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    39 
    40         <!--
     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.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     37    <!--
    4138    **********************************************************
    4239    ** init - initializes the build
    4340    **********************************************************
    4441    -->
    45         <target name="init">
    46                 <mkdir dir="${plugin.build.dir}"/>
    47         </target>
    48 
    49         <!--
     42    <target name="init">
     43        <mkdir dir="${plugin.build.dir}"/>
     44    </target>
     45    <!--
    5046    **********************************************************
    5147    ** compile - complies the source tree
    5248    **********************************************************
    5349    -->
    54         <target name="compile" depends="init">
    55                 <echo message="compiling sources for ${ant.project.name} ... "/>
    56                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    57                         <compilerarg value="-Xlint:deprecation"/>
    58                         <compilerarg value="-Xlint:unchecked"/>
    59                 </javac>
    60         </target>
    61 
    62         <!--
     50    <target name="compile" depends="init">
     51        <echo message="compiling sources for ${ant.project.name} ... "/>
     52        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     53            <compilerarg value="-Xlint:deprecation"/>
     54            <compilerarg value="-Xlint:unchecked"/>
     55        </javac>
     56    </target>
     57    <!--
    6358    **********************************************************
    6459    ** dist - creates the plugin jar
    6560    **********************************************************
    6661    -->
    67         <target name="dist" depends="compile,revision">
    68                 <echo message="creating ${plugin.jar} ... "/>
    69                 <copy todir="${plugin.build.dir}/resources">
    70                         <fileset dir="resources"/>
    71                 </copy>
    72                 <copy todir="${plugin.build.dir}/images">
    73                         <fileset dir="images"/>
    74                 </copy>
    75                 <copy todir="${plugin.build.dir}">
    76                         <fileset dir=".">
    77                                 <include name="README" />
    78                                 <include name="LICENSE" />
    79                         </fileset>
    80                 </copy>
    81                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    82                         <manifest>
    83                                 <attribute name="Author" value="Tomasz Stelmach"/>
    84                                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin"/>
    85                                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    86                                 <attribute name="Plugin-Description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/>
    87                                 <attribute name="Plugin-Icon" value="images/layericon.png"/>
     62    <target name="dist" depends="compile,revision">
     63        <echo message="creating ${plugin.jar} ... "/>
     64        <copy todir="${plugin.build.dir}/resources">
     65            <fileset dir="resources"/>
     66        </copy>
     67        <copy todir="${plugin.build.dir}/images">
     68            <fileset dir="images"/>
     69        </copy>
     70        <copy todir="${plugin.build.dir}/data">
     71            <fileset dir="data"/>
     72        </copy>
     73        <copy todir="${plugin.build.dir}">
     74            <fileset dir=".">
     75                <include name="README"/>
     76                <include name="LICENSE"/>
     77            </fileset>
     78        </copy>
     79        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     80            <manifest>
     81                <attribute name="Author" value="Tomasz Stelmach"/>
     82                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin"/>
     83                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     84                <attribute name="Plugin-Description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/>
     85                <attribute name="Plugin-Icon" value="images/layericon.png"/>
    8886                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/PicLayer"/>
    89                                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    90                                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    91                         </manifest>
    92                 </jar>
    93         </target>
    94 
    95         <!--
     87                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     88                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     89            </manifest>
     90        </jar>
     91    </target>
     92    <!--
    9693    **********************************************************
    9794    ** revision - extracts the current revision number for the
     
    10097    **********************************************************
    10198    -->
    102         <target name="revision">
     99    <target name="revision">
     100        <!-- extract the SVN revision information for file build.number -->
     101        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     102            <env key="LANG" value="C"/>
     103            <arg value="info"/>
     104            <arg value="--xml"/>
     105            <arg value="."/>
     106        </exec>
     107        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     108        <delete file="REVISION"/>
     109    </target>
     110    <!--
     111    **********************************************************
     112    ** clean - clean up the build environment
     113    **********************************************************
     114    -->
     115    <target name="clean">
     116        <delete dir="${plugin.build.dir}"/>
     117        <delete file="${plugin.jar}"/>
     118    </target>
     119    <!--
     120    **********************************************************
     121    ** install - install the plugin in your local JOSM installation
     122    **********************************************************
     123    -->
     124    <target name="install" depends="dist">
     125        <property environment="env"/>
     126        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     127            <and>
     128                <os family="windows"/>
     129            </and>
     130        </condition>
     131        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     132    </target>
     133    <!--
     134         ************************** Publishing the plugin ***********************************
     135        -->
     136    <!--
     137        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     138        ** property ${coreversion.info.entry.revision}
     139        **
     140        -->
     141    <target name="core-info">
     142        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     143            <env key="LANG" value="C"/>
     144            <arg value="info"/>
     145            <arg value="--xml"/>
     146            <arg value="../../core"/>
     147        </exec>
     148        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     149        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     150        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     151        <delete file="core.info.xml"/>
     152    </target>
     153    <!--
     154        ** commits the source tree for this plugin
     155        -->
     156    <target name="commit-current">
     157        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     158        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     159            <env key="LANG" value="C"/>
     160            <arg value="commit"/>
     161            <arg value="-m '${commit.message}'"/>
     162            <arg value="."/>
     163        </exec>
     164    </target>
     165    <!--
     166        ** updates (svn up) the source tree for this plugin
     167        -->
     168    <target name="update-current">
     169        <echo>Updating plugin source ...</echo>
     170        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     171            <env key="LANG" value="C"/>
     172            <arg value="up"/>
     173            <arg value="."/>
     174        </exec>
     175        <echo>Updating ${plugin.jar} ...</echo>
     176        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     177            <env key="LANG" value="C"/>
     178            <arg value="up"/>
     179            <arg value="../dist/${plugin.jar}"/>
     180        </exec>
     181    </target>
     182    <!--
     183        ** commits the plugin.jar
     184        -->
     185    <target name="commit-dist">
     186        <echo>
     187    ***** Properties of published ${plugin.jar} *****
     188    Commit message    : '${commit.message}'
     189    Plugin-Mainversion: ${plugin.main.version}
     190    JOSM build version: ${coreversion.info.entry.revision}
     191    Plugin-Version    : ${version.entry.commit.revision}
     192    ***** / Properties of published ${plugin.jar} *****
    103193
    104                 <!-- extract the SVN revision information for file build.number -->
    105                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    106                         <env key="LANG" value="C"/>
    107                         <arg value="info"/>
    108                         <arg value="--xml"/>
    109                         <arg value="."/>
    110                 </exec>
    111                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    112                 <delete file="REVISION"/>
    113         </target>
    114 
    115         <!--
    116     **********************************************************
    117     ** clean - clean up the build environment
    118     **********************************************************
    119     -->
    120         <target name="clean">
    121                 <delete dir="${plugin.build.dir}"/>
    122                 <delete file="${plugin.jar}"/>
    123         </target>
    124 
    125         <!--
    126     **********************************************************
    127     ** install - install the plugin in your local JOSM installation
    128     **********************************************************
    129     -->
    130         <target name="install" depends="dist">
    131                 <property environment="env"/>
    132                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    133                         <and>
    134                                 <os family="windows"/>
    135                         </and>
    136                 </condition>
    137                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    138         </target>
    139 
    140         <!--
    141                  ************************** Publishing the plugin ***********************************
    142                 -->
    143         <!--
    144                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    145                 ** property ${coreversion.info.entry.revision}
    146                 **
    147                 -->
    148         <target name="core-info">
    149                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    150                         <env key="LANG" value="C"/>
    151                         <arg value="info"/>
    152                         <arg value="--xml"/>
    153                         <arg value="../../core"/>
    154                 </exec>
    155                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    156                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    157                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    158                 <delete file="core.info.xml" />
    159         </target>
    160 
    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         <!--
    175                 ** updates (svn up) the source tree for this plugin
    176                 -->
    177         <target name="update-current">
    178                 <echo>Updating plugin source ...</echo>
    179                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    180                         <env key="LANG" value="C"/>
    181                         <arg value="up"/>
    182                         <arg value="."/>
    183                 </exec>
    184                 <echo>Updating ${plugin.jar} ...</echo>
    185                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186                         <env key="LANG" value="C"/>
    187                         <arg value="up"/>
    188                         <arg value="../dist/${plugin.jar}"/>
    189                 </exec>
    190         </target>
    191 
    192         <!--
    193                 ** commits the plugin.jar
    194                 -->
    195         <target name="commit-dist">
    196                 <echo>
    197         ***** Properties of published ${plugin.jar} *****
    198         Commit message    : '${commit.message}'
    199         Plugin-Mainversion: ${plugin.main.version}
    200         JOSM build version: ${coreversion.info.entry.revision}
    201         Plugin-Version    : ${version.entry.commit.revision}
    202         ***** / Properties of published ${plugin.jar} *****
    203 
    204         Now commiting ${plugin.jar} ...
    205         </echo>
    206                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    207                         <env key="LANG" value="C"/>
    208                         <arg value="-m '${commit.message}'"/>
    209                         <arg value="commit"/>
    210                         <arg value="${plugin.jar}"/>
    211                 </exec>
    212         </target>
    213 
    214         <!-- ** make sure svn is present as a command line tool ** -->
    215         <target name="ensure-svn-present">
    216                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    217                         <env key="LANG" value="C" />
    218                         <arg value="--version" />
    219                 </exec>
    220                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    221                         <!-- return code not set at all? Most likely svn isn't installed -->
    222                         <condition>
    223                                 <not>
    224                                         <isset property="svn.exit.code" />
    225                                 </not>
    226                         </condition>
    227                 </fail>
    228                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    229                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    230                         <condition>
    231                                 <isfailure code="${svn.exit.code}" />
    232                         </condition>
    233                 </fail>
    234         </target>
    235 
    236         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    237         </target>
     194    Now commiting ${plugin.jar} ...
     195    </echo>
     196        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     197            <env key="LANG" value="C"/>
     198            <arg value="-m '${commit.message}'"/>
     199            <arg value="commit"/>
     200            <arg value="${plugin.jar}"/>
     201        </exec>
     202    </target>
     203    <!-- ** make sure svn is present as a command line tool ** -->
     204    <target name="ensure-svn-present">
     205        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     206            <env key="LANG" value="C"/>
     207            <arg value="--version"/>
     208        </exec>
     209        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     210            <!-- return code not set at all? Most likely svn isn't installed -->
     211            <condition>
     212                <not>
     213                    <isset property="svn.exit.code"/>
     214                </not>
     215            </condition>
     216        </fail>
     217        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     218            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     219            <condition>
     220                <isfailure code="${svn.exit.code}"/>
     221            </condition>
     222        </fail>
     223    </target>
     224    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     225    </target>
    238226</project>
Note: See TracChangeset for help on using the changeset viewer.