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/touchscreenhelper
Files:
14 added
1 edited

Legend:

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

    r25191 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.
     
    2929-->
    3030<project name="touchscreenhelper" default="dist" basedir=".">
    31         <!-- enter the SVN commit message -->
    32         <property name="commit.message" value="Commit message" />
    33         <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34         <property name="plugin.main.version" value="3835" />
    35 
    36         <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
    37         <property name="plugin.build.dir"       value="build"/>
    38         <property name="plugin.src.dir"         value="src"/>
    39         <property name="plugin.dist.dir"        value="../../dist"/>
    40         <property name="ant.build.javac.target" value="1.5"/>
    41         <property name="plugin.dist.dir"        value="../../dist"/>
    42         <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    43 
    44         <target name="init">
    45                 <mkdir dir="${plugin.build.dir}"/>
    46         </target>
    47 
    48         <target name="compile" depends="init">
    49                 <echo message="compiling sources for  ${plugin.jar} ... "/>
    50                 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    51                         <compilerarg value="-Xlint:deprecation"/>
    52                         <compilerarg value="-Xlint:unchecked"/>
    53                 </javac>
    54         </target>
    55 
    56         <target name="dist" depends="compile,revision">
    57                 <echo message="creating ${ant.project.name}.jar ... "/>
    58                 <copy todir="${plugin.build.dir}/resources">
    59                         <fileset dir="resources"/>
    60                 </copy>
    61                 <copy todir="${plugin.build.dir}/images">
    62                         <fileset dir="images"/>
    63                 </copy>
    64                 <copy todir="${plugin.build.dir}">
    65                         <fileset dir=".">
    66                                 <include name="README" />
    67                                 <include name="LICENSE" />
    68                         </fileset>
    69                 </copy>
    70                 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    71                 <manifest>
    72                         <attribute name="Author" value="glebius@glebius.int.ru"/>
    73                         <attribute name="Plugin-Class" value="touchscreenhelper.TouchScreenHelperPlugin"/>
    74                         <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    75                         <attribute name="Plugin-Description" value="Provides helper buttons to allow working with single button mouse (stylus). Currently adds only one button to slip the map."/>
    76                         <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    77                         <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    78                 </manifest>
    79                 </jar>
    80         </target>
    81 
    82         <target name="revision">
    83 
    84                 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    85                         <env key="LANG" value="C"/>
    86                         <arg value="info"/>
    87                         <arg value="--xml"/>
    88                         <arg value="."/>
    89                 </exec>
    90                 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    91                 <delete file="REVISION"/>
    92         </target>
    93 
    94         <target name="clean">
    95                 <delete dir="${plugin.build.dir}"/>
    96                 <delete file="${plugin.jar}"/>
    97         </target>
    98 
    99         <target name="install" depends="dist">
    100                 <property environment="env"/>
    101                 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    102                         <and>
    103                                 <os family="windows"/>
    104                         </and>
    105                 </condition>
    106                 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    107         </target>
    108 
    109 
    110         <target name="core-info">
    111                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    112                         <env key="LANG" value="C"/>
    113                         <arg value="info"/>
    114                         <arg value="--xml"/>
    115                         <arg value="../../core"/>
    116                 </exec>
    117                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    118                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    119                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    120                 <delete file="core.info.xml" />
    121         </target>
    122 
    123         <target name="commit-current">
    124                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    125                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    126                         <env key="LANG" value="C"/>
    127                         <arg value="commit"/>
    128                         <arg value="-m '${commit.message}'"/>
    129                         <arg value="."/>
    130                 </exec>
    131         </target>
    132 
    133         <target name="update-current">
    134                 <echo>Updating plugin source ...</echo>
    135                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    136                         <env key="LANG" value="C"/>
    137                         <arg value="up"/>
    138                         <arg value="."/>
    139                 </exec>
    140                 <echo>Updating ${plugin.jar} ...</echo>
    141                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    142                         <env key="LANG" value="C"/>
    143                         <arg value="up"/>
    144                         <arg value="../dist/${plugin.jar}"/>
    145                 </exec>
    146         </target>
    147 
    148         <target name="commit-dist">
    149                 <echo>
    150         ***** Properties of published ${plugin.jar} *****
    151         Commit message    : '${commit.message}'                                 
    152         Plugin-Mainversion: ${plugin.main.version}
    153         JOSM build version: ${coreversion.info.entry.revision}
    154         Plugin-Version    : ${version.entry.commit.revision}
    155         ***** / Properties of published ${plugin.jar} *****                                     
    156                                                
    157         Now commiting ${plugin.jar} ...
    158         </echo>
    159                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    160                         <env key="LANG" value="C"/>
    161                         <arg value="-m '${commit.message}'"/>
    162                         <arg value="commit"/>
    163                         <arg value="${plugin.jar}"/>
    164                 </exec>
    165         </target>
    166 
    167         <target name="ensure-svn-present">
    168                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    169                         <env key="LANG" value="C" />
    170                         <arg value="--version" />
    171                 </exec>
    172                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    173                         <!-- return code not set at all? Most likely svn isn't installed -->
    174                         <condition>
    175                                 <not>
    176                                         <isset property="svn.exit.code" />
    177                                 </not>
    178                         </condition>
    179                 </fail>
    180                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    181                         <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    182                         <condition>
    183                                 <isfailure code="${svn.exit.code}" />
    184                         </condition>
    185                 </fail>
    186         </target>
    187 
    188         <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    189         </target>
     31    <!-- enter the SVN commit message -->
     32    <property name="commit.message" value="Commit message"/>
     33    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     34    <property name="plugin.main.version" value="3835"/>
     35    <property name="josm" location="../../core/dist/josm-custom.jar"/>
     36    <property name="plugin.build.dir" value="build"/>
     37    <property name="plugin.src.dir" value="src"/>
     38    <property name="plugin.dist.dir" value="../../dist"/>
     39    <property name="ant.build.javac.target" value="1.5"/>
     40    <property name="plugin.dist.dir" value="../../dist"/>
     41    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     42    <target name="init">
     43        <mkdir dir="${plugin.build.dir}"/>
     44    </target>
     45    <target name="compile" depends="init">
     46        <echo message="compiling sources for  ${plugin.jar} ... "/>
     47        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
     48            <compilerarg value="-Xlint:deprecation"/>
     49            <compilerarg value="-Xlint:unchecked"/>
     50        </javac>
     51    </target>
     52    <target name="dist" depends="compile,revision">
     53        <echo message="creating ${ant.project.name}.jar ... "/>
     54        <copy todir="${plugin.build.dir}/resources">
     55            <fileset dir="resources"/>
     56        </copy>
     57        <copy todir="${plugin.build.dir}/images">
     58            <fileset dir="images"/>
     59        </copy>
     60        <copy todir="${plugin.build.dir}/data">
     61            <fileset dir="data"/>
     62        </copy>
     63        <copy todir="${plugin.build.dir}">
     64            <fileset dir=".">
     65                <include name="README"/>
     66                <include name="LICENSE"/>
     67            </fileset>
     68        </copy>
     69        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     70            <manifest>
     71                <attribute name="Author" value="glebius@glebius.int.ru"/>
     72                <attribute name="Plugin-Class" value="touchscreenhelper.TouchScreenHelperPlugin"/>
     73                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
     74                <attribute name="Plugin-Description" value="Provides helper buttons to allow working with single button mouse (stylus). Currently adds only one button to slip the map."/>
     75                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
     76                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
     77            </manifest>
     78        </jar>
     79    </target>
     80    <target name="revision">
     81        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     82            <env key="LANG" value="C"/>
     83            <arg value="info"/>
     84            <arg value="--xml"/>
     85            <arg value="."/>
     86        </exec>
     87        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     88        <delete file="REVISION"/>
     89    </target>
     90    <target name="clean">
     91        <delete dir="${plugin.build.dir}"/>
     92        <delete file="${plugin.jar}"/>
     93    </target>
     94    <target name="install" depends="dist">
     95        <property environment="env"/>
     96        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     97            <and>
     98                <os family="windows"/>
     99            </and>
     100        </condition>
     101        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     102    </target>
     103    <target name="core-info">
     104        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
     105            <env key="LANG" value="C"/>
     106            <arg value="info"/>
     107            <arg value="--xml"/>
     108            <arg value="../../core"/>
     109        </exec>
     110        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
     111        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
     112        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
     113        <delete file="core.info.xml"/>
     114    </target>
     115    <target name="commit-current">
     116        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
     117        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     118            <env key="LANG" value="C"/>
     119            <arg value="commit"/>
     120            <arg value="-m '${commit.message}'"/>
     121            <arg value="."/>
     122        </exec>
     123    </target>
     124    <target name="update-current">
     125        <echo>Updating plugin source ...</echo>
     126        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     127            <env key="LANG" value="C"/>
     128            <arg value="up"/>
     129            <arg value="."/>
     130        </exec>
     131        <echo>Updating ${plugin.jar} ...</echo>
     132        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     133            <env key="LANG" value="C"/>
     134            <arg value="up"/>
     135            <arg value="../dist/${plugin.jar}"/>
     136        </exec>
     137    </target>
     138    <target name="commit-dist">
     139        <echo>
     140    ***** Properties of published ${plugin.jar} *****
     141    Commit message    : '${commit.message}'                 
     142    Plugin-Mainversion: ${plugin.main.version}
     143    JOSM build version: ${coreversion.info.entry.revision}
     144    Plugin-Version    : ${version.entry.commit.revision}
     145    ***** / Properties of published ${plugin.jar} *****                 
     146                       
     147    Now commiting ${plugin.jar} ...
     148    </echo>
     149        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
     150            <env key="LANG" value="C"/>
     151            <arg value="-m '${commit.message}'"/>
     152            <arg value="commit"/>
     153            <arg value="${plugin.jar}"/>
     154        </exec>
     155    </target>
     156    <target name="ensure-svn-present">
     157        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
     158            <env key="LANG" value="C"/>
     159            <arg value="--version"/>
     160        </exec>
     161        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
     162            <!-- return code not set at all? Most likely svn isn't installed -->
     163            <condition>
     164                <not>
     165                    <isset property="svn.exit.code"/>
     166                </not>
     167            </condition>
     168        </fail>
     169        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
     170            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
     171            <condition>
     172                <isfailure code="${svn.exit.code}"/>
     173            </condition>
     174        </fail>
     175    </target>
     176    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
     177    </target>
    190178</project>
Note: See TracChangeset for help on using the changeset viewer.