[154] | 1 | <project name="josm" default="dist" basedir=".">
|
---|
[109] | 2 |
|
---|
[151] | 3 | <!-- Java classpath addition (all jar files to compile tests with this) -->
|
---|
[111] | 4 | <path id="classpath">
|
---|
[151] | 5 | <fileset dir="lib">
|
---|
[111] | 6 | <include name="**/*.jar"/>
|
---|
| 7 | </fileset>
|
---|
| 8 | </path>
|
---|
[109] | 9 |
|
---|
[135] | 10 | <target name="dist" depends="compile">
|
---|
[1660] | 11 |
|
---|
[1079] | 12 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
| 13 | <env key="LANG" value="C"/>
|
---|
| 14 | <arg value="info"/>
|
---|
| 15 | <arg value="--xml"/>
|
---|
| 16 | <arg value="."/>
|
---|
| 17 | </exec>
|
---|
| 18 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
| 19 | <delete file="REVISION"/>
|
---|
[1141] | 20 | <property name="version.entry.commit.revision" value="UNKNOWN"/>
|
---|
| 21 | <property name="version.entry.commit.date" value="UNKNOWN"/>
|
---|
[1079] | 22 |
|
---|
| 23 | <copy file="CONTRIBUTION" todir="build"/>
|
---|
| 24 | <copy file="README" todir="build"/>
|
---|
| 25 | <copy file="LICENSE" todir="build"/>
|
---|
| 26 |
|
---|
| 27 | <!-- styles -->
|
---|
[790] | 28 | <copy file="styles/standard/elemstyles.xml" todir="build/styles/standard"/>
|
---|
| 29 |
|
---|
[151] | 30 | <!-- create josm-custom.jar -->
|
---|
[407] | 31 | <delete file="dist/josm-custom.jar"/>
|
---|
[151] | 32 | <jar destfile="dist/josm-custom.jar" basedir="build">
|
---|
[111] | 33 | <manifest>
|
---|
[1023] | 34 | <attribute name="Main-class" value="JOSM" />
|
---|
[1079] | 35 | <attribute name="Main-Version" value="${version.entry.commit.revision} SVN"/>
|
---|
| 36 | <attribute name="Main-Date" value="${version.entry.commit.date}"/>
|
---|
[111] | 37 | </manifest>
|
---|
[1660] | 38 | <zipfileset dir="presets" prefix="presets" />
|
---|
| 39 | <zipfileset dir="images" prefix="images" />
|
---|
| 40 | <zipfileset src="lib/josm-translation.jar" />
|
---|
| 41 |
|
---|
| 42 | <!-- All jar files necessary to run only JOSM (no tests) -->
|
---|
| 43 | <zipfileset src="lib/gettext-commons-0.9.6.jar" />
|
---|
| 44 | <zipfileset src="lib/metadata-extractor-2.3.1-nosun.jar" />
|
---|
[111] | 45 | </jar>
|
---|
| 46 | </target>
|
---|
[109] | 47 |
|
---|
[1492] | 48 | <target name="distmac" depends="dist">
|
---|
| 49 | <!-- modify MacOS X Info.plist file to hold the SVN version number -->
|
---|
| 50 | <copy file="macosx/JOSM.app/Contents/Info.plist" todir="build"/>
|
---|
| 51 | <replace file="build/Info.plist" token="@SVNVersion@" value="${version.entry.commit.revision}"/>
|
---|
| 52 | <!-- create ZIP file with MacOS X application bundle -->
|
---|
| 53 | <zip destfile="dist/josm-custom-macosx.zip" update="true">
|
---|
| 54 | <zipfileset dir="build" includes="CONTRIBUTION README LICENSE"/>
|
---|
| 55 | <zipfileset dir="macosx" includes="JOSM.app/Contents JOSM.app/Contents/MacOS JOSM.app/Contents/Resources JOSM.app/Contents/Resources/Java JOSM.app/Contents/PkgInfo JOSM.app/Contents/Resources/JOSM.icns"/>
|
---|
| 56 | <zipfileset dir="build" includes="Info.plist" prefix="JOSM.app/Contents"/>
|
---|
| 57 | <zipfileset dir="dist" includes="josm-custom.jar" prefix="JOSM.app/Contents/Resources/Java"/>
|
---|
| 58 | <zipfileset dir="macosx" includes="JOSM.app/Contents/MacOS/JOSM" filemode="755"/>
|
---|
| 59 | </zip>
|
---|
| 60 | </target>
|
---|
| 61 |
|
---|
[151] | 62 | <target name="compile" depends="init">
|
---|
[639] | 63 | <javac srcdir="src" classpathref="classpath" destdir="build"
|
---|
[793] | 64 | target="1.5" source="1.5" debug="on" encoding="UTF-8">
|
---|
[529] | 65 | <compilerarg value="-Xlint:deprecation"/>
|
---|
| 66 | </javac>
|
---|
[151] | 67 | </target>
|
---|
| 68 |
|
---|
| 69 | <target name="init">
|
---|
| 70 | <mkdir dir="build" />
|
---|
| 71 | <mkdir dir="dist" />
|
---|
| 72 | </target>
|
---|
| 73 |
|
---|
| 74 | <target name="clean">
|
---|
| 75 | <delete dir="build" />
|
---|
| 76 | <delete dir="dist" />
|
---|
| 77 | </target>
|
---|
| 78 |
|
---|
[1682] | 79 |
|
---|
[109] | 80 | </project>
|
---|