Changeset 14003 in osm for applications/editors/josm/plugins/colorscheme
- Timestamp:
- 2009-03-08T12:02:49+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/colorscheme/build.xml
r12780 r14003 1 1 <project name="colorscheme" default="dist" basedir="."> 2 <!-- compilation properties --> 3 <property name="josm.build.dir" value="../../core"/> 4 <property name="josm.home.dir" value="${user.home}/.josm"/> 5 <property name="josm" location="../../core/dist/josm-custom.jar" /> 6 <property name="plugin.build.dir" value="build"/> 7 <property name="plugin.dist.dir" value="../../dist"/> 8 <property name="plugin.name" value="${ant.project.name}"/> 9 <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/> 10 <property name="plugin.description" value="Allows the user to create different color schemes and to switch between them. Just change the colors and create a new scheme. Used to switch to a white background with matching colors for better visibility in bright sunlight. See dialog in JOSM's preferences and 'Map Settings' (strange but true :-) (V${plugin.version})."/> 11 <property name="plugin.class" value="at.dallermassl.josm.plugin.colorscheme.ColorSchemePlugin"/> 12 <!-- update site meta data --> 13 <property name="plugin.site.file" value="josm-site.xml"/> 14 <property name="plugin.site.description" value="Josm's ColorScheme Plugin Update Site"/> 15 <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/colorscheme/"/> 16 <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/colorscheme/"/> 2 <property name="josm" location="../../core/dist/josm-custom.jar"/> 3 <property name="plugin.dist.dir" value="../../dist"/> 4 <property name="plugin.build.dir" value="build"/> 5 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 17 6 <property name="ant.build.javac.target" value="1.5"/> 18 <target name="dist" depends="compile, site"> 7 <target name="init"> 8 <mkdir dir="${plugin.build.dir}"/> 9 </target> 10 <target name="compile" depends="init"> 19 11 <echo message="creating ${plugin.jar}"/> 20 <!-- images --> 21 <!-- 22 <copy todir="${plugin.build.dir}/images"> 23 <fileset dir="src/images" /> 24 </copy> 25 --> 26 <!-- copy configuration xml files --> 12 <javac srcdir="src" classpath="${josm}" debug="false" destdir="${plugin.build.dir}"> 13 <compilerarg value="-Xlint:deprecation"/> 14 <compilerarg value="-Xlint:unchecked"/> 15 </javac> 16 </target> 17 <target name="dist" depends="compile,revision"> 27 18 <copy todir="${plugin.build.dir}"> 28 19 <fileset dir="src"> … … 30 21 </fileset> 31 22 </copy> 23 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 24 <manifest> 25 <attribute name="Author" value="Christof Dallermassl"/> 26 <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.colorscheme.ColorSchemePlugin" /> 27 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 28 <attribute name="Plugin-Description" value="Allows the user to create different color schemes and to switch between them. Just change the colors and create a new scheme. Used to switch to a white background with matching colors for better visibility in bright sunlight. See dialog in JOSM's preferences and 'Map Settings' (strange but true :-)" /> 29 <attribute name="Plugin-Mainversion" value="1180"/> 30 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 31 </manifest> 32 </jar> 33 </target> 34 <target name="revision"> 32 35 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 33 36 <env key="LANG" value="C"/> … … 38 41 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 39 42 <delete file="REVISION"/> 40 <!-- create jar file -->41 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">42 <manifest>43 <attribute name="Plugin-Class" value="${plugin.class}" />44 <attribute name="Plugin-Description" value="${plugin.description}" />45 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>46 <attribute name="Plugin-Mainversion" value="1180"/>47 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>48 </manifest>49 </jar>50 43 </target> 51 <target name="compile" depends="init"> 52 <mkdir dir="${plugin.build.dir}"/> 53 <javac srcdir="src" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5"> 54 <classpath> 55 <pathelement path="${josm.build.dir}/build"/> 56 <fileset dir="${josm.build.dir}/lib"> 57 <include name="**/*.jar"/> 58 </fileset> 59 </classpath> 60 </javac> 44 <target name="clean"> 45 <delete dir="${plugin.build.dir}"/> 46 <delete file="${plugin.jar}"/> 61 47 </target> 62 48 <target name="install" depends="dist"> 63 <copy file="${plugin.jar}" todir="${josm.home.dir}/plugins" /> 64 </target> 65 <target name="init"> 66 <echo>java version: ${java.version}</echo> 67 </target> 68 <target name="clean"> 69 <delete dir="${plugin.site.file}" /> 70 <delete dir="${plugin.build.dir}" /> 71 <delete file="${plugin.jar}" /> 72 </target> 73 <!-- write site description for the given plugin so josm will accept it --> 74 <target name="site"> 75 <echo message="creating site description in ${plugin.site.file}"/> 76 <echo file="${plugin.site.file}"><!-- plugins available on this site --> 77 <plugins> 78 <plugin id="${ant.project.name}" version="${plugin.version}"> 79 <name>${ant.project.name}</name> 80 <description>${plugin.description}</description> 81 <resource>${plugin.site.url}${plugin.jar}</resource> 82 </plugin> 83 </plugins> 84 </echo> 85 </target> 86 <!-- write site description for the given plugin (not implemented in JOSM as full version yet!) --> 87 <target name="site-full-donotuse"> 88 <echo message="creating site description in ${plugin.site.file}"/> 89 <echo file="${plugin.site.file}"><?xml version="1.0"?> 90 <site version="1.0"> 91 <!-- meta data of site --> 92 <site-info> 93 <site-name>${plugin.site.description}</site-name> 94 <site-url>${plugin.site.url}</site-url> 95 </site-info> 96 97 <!-- plugins available on this site --> 98 <plugins> 99 <plugin id="${ant.project.name}" version="${plugin.version}"> 100 <name>${ant.project.name}</name> 101 <description>${plugin.description}</description> 102 <resources> 103 <resource src="${plugin.site.url}${plugin.jar}" 104 target="${josm.home.dir}/plugins/${plugin.jar}"/> 105 </resources> 106 </plugin> 107 </plugins> 108 </site> 109 </echo> 110 </target> 111 <!-- upload the site description and the jar file via ssh --> 112 <target name="upload" depends="dist,site"> 113 <echo message="uploading jar and site description to ${plugin.site.upload.target}"/> 114 <exec executable="scp"> 115 <arg value="${plugin.jar}"/> 116 <arg value="${plugin.site.file}"/> 117 <arg value="${plugin.site.upload.target}"/> 118 </exec> 49 <property environment="env"/> 50 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 51 <and> 52 <os family="windows"/> 53 </and> 54 </condition> 55 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 119 56 </target> 120 57 </project>
Note:
See TracChangeset
for help on using the changeset viewer.