| 1 | <project name="openstreetmap" default="dist" basedir=".">
|
|---|
| 2 |
|
|---|
| 3 | <!-- All jar files necessary to run only JOSM (no tests) -->
|
|---|
| 4 | <fileset id="josm_required_libs" dir="lib">
|
|---|
| 5 | <include name="gettext-commons-0.9.jar"/>
|
|---|
| 6 | <include name="metadata-extractor-2.3.1.jar"/>
|
|---|
| 7 | <include name="MinML2.jar"/>
|
|---|
| 8 | </fileset>
|
|---|
| 9 |
|
|---|
| 10 | <!-- Java classpath addition (all jar files to compile tests with this) -->
|
|---|
| 11 | <path id="classpath">
|
|---|
| 12 | <fileset dir="lib">
|
|---|
| 13 | <include name="**/*.jar"/>
|
|---|
| 14 | </fileset>
|
|---|
| 15 | </path>
|
|---|
| 16 |
|
|---|
| 17 | <target name="dist" depends="compile">
|
|---|
| 18 | <!-- jars -->
|
|---|
| 19 | <unjar dest="build">
|
|---|
| 20 | <fileset refid="josm_required_libs" />
|
|---|
| 21 | </unjar>
|
|---|
| 22 |
|
|---|
| 23 | <!-- images -->
|
|---|
| 24 | <copy todir="build/images">
|
|---|
| 25 | <fileset dir="images" />
|
|---|
| 26 | </copy>
|
|---|
| 27 | <copy todir="build/org/openstreetmap/josm">
|
|---|
| 28 | <fileset dir="po/org/openstreetmap/josm" />
|
|---|
| 29 | </copy>
|
|---|
| 30 |
|
|---|
| 31 | <!-- create josm-custom.jar -->
|
|---|
| 32 | <jar destfile="dist/josm-custom.jar" basedir="build">
|
|---|
| 33 | <manifest>
|
|---|
| 34 | <attribute name="Main-class" value="org.openstreetmap.josm.gui.MainApplication" />
|
|---|
| 35 | </manifest>
|
|---|
| 36 | </jar>
|
|---|
| 37 | </target>
|
|---|
| 38 |
|
|---|
| 39 | <target name="gettext" depends="init">
|
|---|
| 40 | <exec executable="find" output="build/alljava.txt">
|
|---|
| 41 | <arg line="src -name '*.java'"/>
|
|---|
| 42 | </exec>
|
|---|
| 43 | <exec executable="xgettext">
|
|---|
| 44 | <arg line="-ktr -ktrn:1,2 -ktrc -kmarktr -Ljava -opo/keys.pot -fbuild/alljava.txt"/>
|
|---|
| 45 | </exec>
|
|---|
| 46 | <apply executable="msgmerge">
|
|---|
| 47 | <arg value="-U"/>
|
|---|
| 48 | <srcfile/>
|
|---|
| 49 | <arg file="po/keys.pot"/>
|
|---|
| 50 | <fileset dir="po">
|
|---|
| 51 | <include name="*.po"/>
|
|---|
| 52 | </fileset>
|
|---|
| 53 | </apply>
|
|---|
| 54 |
|
|---|
| 55 | <!-- FIXME: somehow iterate the po-directory and create the java files -->
|
|---|
| 56 | <exec executable="msgfmt">
|
|---|
| 57 | <arg line="--java2 -dpo -rorg.openstreetmap.josm.Translation -lde po/de.po"/>
|
|---|
| 58 | </exec>
|
|---|
| 59 | <exec executable="msgfmt">
|
|---|
| 60 | <arg line="--java2 -dpo -rorg.openstreetmap.josm.Translation -lfr po/fr.po"/>
|
|---|
| 61 | </exec>
|
|---|
| 62 | <exec executable="msgfmt">
|
|---|
| 63 | <arg line="--java2 -dpo -rorg.openstreetmap.josm.Translation -len_GB po/en_GB.po"/>
|
|---|
| 64 | </exec>
|
|---|
| 65 | <exec executable="msgfmt">
|
|---|
| 66 | <arg line="--java2 -dpo -rorg.openstreetmap.josm.Translation -lro po/ro.po"/>
|
|---|
| 67 | </exec>
|
|---|
| 68 | </target>
|
|---|
| 69 |
|
|---|
| 70 | <target name="compile" depends="init">
|
|---|
| 71 | <javac srcdir="src" classpathref="classpath" destdir="build" />
|
|---|
| 72 | </target>
|
|---|
| 73 |
|
|---|
| 74 | <target name="compile-tests" depends="compile">
|
|---|
| 75 |
|
|---|
| 76 | </target>
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 | <target name="init">
|
|---|
| 80 | <mkdir dir="build" />
|
|---|
| 81 | <mkdir dir="dist" />
|
|---|
| 82 | </target>
|
|---|
| 83 |
|
|---|
| 84 | <target name="clean">
|
|---|
| 85 | <delete dir="build" />
|
|---|
| 86 | <delete dir="dist" />
|
|---|
| 87 | </target>
|
|---|
| 88 |
|
|---|
| 89 | </project>
|
|---|