source: josm/build.xml@ 113

Last change on this file since 113 was 113, checked in by imi, 18 years ago

fixed i18n messages (cleanup)

File size: 2.2 KB
Line 
1<project name="openstreetmap" default="dist" basedir=".">
2
3 <property name="src" location="src" />
4 <property name="po" location="po" />
5 <property name="build" location="build" />
6 <property name="dist" location="dist" />
7 <property name="lib" location="lib" />
8
9 <path id="classpath">
10 <fileset dir="${lib}">
11 <include name="**/*.jar"/>
12 </fileset>
13 </path>
14
15 <path id="srcfiles">
16 <fileset dir="${src}">
17 <include name="**/*.java"/>
18 </fileset>
19 </path>
20
21 <target name="init">
22 <mkdir dir="${build}" />
23 <mkdir dir="${dist}" />
24 </target>
25
26 <target name="compile" depends="init">
27 <javac srcdir="${src}" classpathref="classpath" destdir="${build}">
28 <include name="org/openstreetmap/josm/gui/MainApplication.java"/>
29 <include name="org/openstreetmap/josm/gui/MainApplet.java"/>
30 </javac>
31 </target>
32
33 <target name="dist" depends="compile,gettext">
34 <!-- jars -->
35 <unjar src="${lib}/MinML2.jar" dest="${build}" />
36 <unjar src="${lib}/gettext-commons-0.9.jar" dest="${build}" />
37 <unjar src="${lib}/metadata-extractor-2.3.1.jar" dest="${build}" />
38
39 <!-- images -->
40 <copy todir="${build}/images">
41 <fileset dir="images" />
42 </copy>
43
44 <jar destfile="${dist}/josm-custom.jar" basedir="${build}">
45 <manifest>
46 <attribute name="Main-class" value="org.openstreetmap.josm.gui.MainApplication" />
47 </manifest>
48 </jar>
49 </target>
50
51 <target name="clean">
52 <delete dir="${build}" />
53 <delete dir="${dist}" />
54 </target>
55
56
57 <target name="gettext" depends="init">
58 <exec executable="find" output="${build}/alljava.txt">
59 <arg line="${src} -name '*.java'"/>
60 </exec>
61 <exec executable="xgettext">
62 <arg line="-ktr -ktrn:1,2 -ktrc -kmarktr -Ljava -o${build}/keys.pot -f${build}/alljava.txt"/>
63 </exec>
64 <apply executable="msgmerge">
65 <arg value="-U"/>
66 <srcfile/>
67 <arg file="${build}/keys.pot"/>
68 <fileset dir="${po}">
69 <include name="*.po"/>
70 </fileset>
71 </apply>
72
73 <!-- FIXME: somehow iterate the po-directory and create the java files -->
74 <exec executable="msgfmt">
75 <arg line="--java2 -d${po} -rorg.openstreetmap.josm.Translation -lde ${po}/de.po"/>
76 </exec>
77 </target>
78
79</project>
Note: See TracBrowser for help on using the repository browser.