2013-02-14 21:02:42 +00:00
|
|
|
<!--
|
|
|
|
// This file is part of MicropolisJ.
|
|
|
|
// Copyright (C) 2013 Jason Long
|
|
|
|
// Portions Copyright (C) 1989-2007 Electronic Arts Inc.
|
|
|
|
//
|
|
|
|
// MicropolisJ is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU GPLv3, with additional terms.
|
|
|
|
// See the README file, included in this distribution, for details.
|
|
|
|
-->
|
|
|
|
<project name="micropolisj" default="all">
|
|
|
|
|
2013-05-24 00:32:28 +00:00
|
|
|
<property name="package-version" value="1.4" />
|
2013-02-14 21:02:42 +00:00
|
|
|
|
|
|
|
<property name="srcdir" location="src" />
|
|
|
|
<property name="builddir" location="build" />
|
|
|
|
<property name="distfile" value="${ant.project.name}.jar" />
|
|
|
|
<property name="zipfile" value="${ant.project.name}-${package-version}.zip" />
|
|
|
|
|
|
|
|
<path id="build-classpath">
|
|
|
|
<fileset dir="extlib">
|
|
|
|
<include name="*.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="init-builddir">
|
|
|
|
<mkdir dir="${builddir}" />
|
|
|
|
<mkdir dir="extlib" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="copy-resources" depends="init-builddir">
|
|
|
|
<copy todir="${builddir}">
|
|
|
|
<fileset dir="resources"
|
|
|
|
excludes="**/*.xcf **/Thumbs.db"
|
|
|
|
/>
|
|
|
|
</copy>
|
2013-06-18 01:02:53 +00:00
|
|
|
<native2ascii encoding="UTF-8" ext=".properties"
|
|
|
|
src="strings"
|
|
|
|
includes="**/*.utf8"
|
|
|
|
dest="${builddir}/micropolisj"
|
|
|
|
/>
|
|
|
|
|
2013-02-14 21:02:42 +00:00
|
|
|
<copy todir="${builddir}/micropolisj">
|
2013-06-18 01:02:53 +00:00
|
|
|
<fileset dir="strings" excludes="**/*.utf8" />
|
2013-02-14 21:02:42 +00:00
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="init-builddir">
|
|
|
|
<javac srcdir="${srcdir}"
|
|
|
|
destdir="${builddir}"
|
|
|
|
classpathref="build-classpath"
|
|
|
|
includeantruntime="false"
|
|
|
|
debug="true" debuglevel="lines,vars,source"
|
2013-02-24 14:01:36 +00:00
|
|
|
source="1.6" target="1.6"
|
2013-02-14 21:02:42 +00:00
|
|
|
>
|
|
|
|
<compilerarg value="-Xlint:unchecked" />
|
|
|
|
<compilerarg value="-Xlint:deprecation" />
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build" depends="copy-resources,compile">
|
|
|
|
<pathconvert property="runtime-classpath" pathsep=" " refid="build-classpath">
|
|
|
|
<map from="${basedir}" to="." />
|
|
|
|
</pathconvert>
|
|
|
|
|
2013-06-26 22:11:38 +00:00
|
|
|
<jar destfile="${distfile}" basedir="${builddir}" excludes="/micropolisj/build_tool/**">
|
2013-02-14 21:02:42 +00:00
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="micropolisj.Main" />
|
|
|
|
<attribute name="Class-Path" value="${runtime-classpath}" />
|
|
|
|
<attribute name="Implementation-Version" value="${package-version}" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="all" depends="build">
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete dir="${builddir}" />
|
|
|
|
<delete file="${distfile}" />
|
|
|
|
<delete>
|
|
|
|
<fileset dir="." includes="${ant.project.name}*.zip" />
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="dist" depends="build">
|
|
|
|
<zip destfile="${zipfile}">
|
|
|
|
<fileset dir="." includes="${distfile}, ${ant.project.name}.ico, README, COPYING" />
|
|
|
|
</zip>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javadoc">
|
|
|
|
<mkdir dir="docs/api" />
|
|
|
|
<javadoc sourcepath="src" destdir="docs/api"
|
|
|
|
classpathref="build-classpath"
|
|
|
|
Private="true"
|
|
|
|
>
|
|
|
|
<link href="http://docs.oracle.com/javase/7/docs/api" />
|
|
|
|
<link href="http://docs.oracle.com/cd/E17802_01/j2se/javase/technologies/desktop/java3d/forDevelopers/J3D_1_3_API/j3dapi" />
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|