Changeset 28418 in osm for applications/editors/josm/plugins/mirrored_download
- Timestamp:
- 2012-06-01T09:17:57+02:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/mirrored_download
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mirrored_download/build.xml
r28174 r28418 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <!-- 3 ** This is the build file for the mirrored_download plugin 4 ** 5 ** Maintaining versions 6 ** ==================== 7 ** see README.template 8 ** 3 9 ** Usage 4 10 ** ===== … … 7 13 ** > ant dist 8 14 ** 9 ** To install the generated plugin locally (in you default plugin directory) run 15 ** To install the generated plugin locally (in your default plugin directory) run 10 16 ** 11 17 ** > ant install 12 18 ** 13 ** The generated plugin jar is not automatically available in JOSMs plugin configuration 14 ** dialog. You have to check it in first. 19 ** To build against the core in ../../core, create a correct manifest and deploy to 20 ** SVN, 21 ** set the properties commit.message and plugin.main.version 22 ** and run 23 ** > ant publish 24 ** 15 25 ** 16 26 --> 17 27 <project name="mirrored_download" default="dist" basedir="."> 18 <property name="josm.basedir" location="../.."/> 19 <!-- 20 ************************************************ 21 ** should not be necessary to change the following properties 22 --> 23 <property name="josm" location="${josm.basedir}/core/dist/josm-custom.jar"/> 24 <property name="plugin.build.dir" value="build"/> 25 <property name="plugin.src.dir" value="src"/> 26 <!-- this is the directory where the plugin jar is copied to --> 27 <property name="plugin.dist.dir" value="${josm.basedir}/dist"/> 28 <property name="ant.build.javac.target" value="1.6"/> 29 <property name="plugin.dist.dir" value="${josm.basedir}/dist"/> 30 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 28 29 <!-- enter the SVN commit message --> 30 <property name="commit.message" value=""/> 31 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 32 <property name="plugin.main.version" value="5097"/> 33 31 34 <!-- 32 35 ********************************************************** 33 ** in it - initializes the build36 ** include targets that all plugins have in common 34 37 ********************************************************** 35 38 --> 36 <target name="init"> 37 <mkdir dir="${plugin.build.dir}"/> 38 </target> 39 <!-- 40 ********************************************************** 41 ** compile - complies the source tree 42 ********************************************************** 43 --> 44 <target name="compile" depends="init"> 45 <echo message="compiling sources for ${plugin.jar} ... "/> 46 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}"> 47 <compilerarg value="-Xlint:deprecation"/> 48 <compilerarg value="-Xlint:unchecked"/> 49 </javac> 50 </target> 39 <import file="../build-common.xml"/> 40 51 41 <!-- 52 42 ********************************************************** … … 73 63 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 74 64 <!-- 75 ************************************************ 76 ** configure these properties. Most of them will be copied to the plugins 77 ** manifest file. Property values will also show up in the list available 78 ** plugins: http://josm.openstreetmap.de/wiki/Plugins. 79 ** 80 ************************************************ 81 --> 65 ************************************************ 66 ** configure these properties. Most of them will be copied to the plugins 67 ** manifest file. Property values will also show up in the list available 68 ** plugins: http://josm.openstreetmap.de/wiki/Plugins. 69 ** 70 ************************************************ 71 --> 82 72 <manifest> 83 73 <attribute name="Author" value="Roland M. Olbricht"/> … … 86 76 <attribute name="Plugin-Description" value="Simplifies download from different read-only APIs."/> 87 77 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/mirrored_download"/> 88 <attribute name="Plugin-Mainversion" value="5097"/> 78 <attribute name="Plugin-Icon" value="images/download_mirror.png"/> 79 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 89 80 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 90 81 </manifest> 91 82 </jar> 92 83 </target> 93 <!--94 **********************************************************95 ** revision - extracts the current revision number for the96 ** file build.number and stores it in the XML property97 ** version.*98 **********************************************************99 -->100 <target name="revision">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 environment113 **********************************************************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 installation122 **********************************************************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 84 </project> -
applications/editors/josm/plugins/mirrored_download/src/mirrored_download/MirroredDownloadAction.java
r28290 r28418 41 41 42 42 public MirroredDownloadAction() { 43 super(tr("Download from OSM mirror..."), (String)null, tr("Download map data from the OSM server."),43 super(tr("Download from OSM mirror..."), "download_mirror", tr("Download map data from the OSM server."), 44 44 Shortcut.registerShortcut("mirror:download", tr("File: {0}", tr("Download from OSM mirror...")), KeyEvent.VK_DOWN, Shortcut.ALT_SHIFT), 45 45 true, "mirroreddownload/download", true);
Note:
See TracChangeset
for help on using the changeset viewer.