2013-08-12 13:34:37 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
2013-08-12 14:12:17 +00:00
|
|
|
<project name="game" default="build">
|
2013-08-12 13:34:37 +00:00
|
|
|
|
2013-08-12 14:12:17 +00:00
|
|
|
<property name="projName" value="game"/> <!-- base part of output file name -->
|
2013-08-12 13:34:37 +00:00
|
|
|
<property name="src.dir" location="./src"/>
|
|
|
|
<property name="build.dir" value="./build"/>
|
|
|
|
<property name="a2copy.dir" value="../tools/A2Copy/dist"/>
|
2014-02-09 22:59:43 +00:00
|
|
|
<property name="pack.dir" value="../tools/PackPartitions/dist"/>
|
2014-07-06 21:40:35 +00:00
|
|
|
<property name="plasma.dir" location="../tools/PLASMA/src"/>
|
2013-08-12 13:34:37 +00:00
|
|
|
|
|
|
|
<property name="IMG_FILE" value="${build.dir}/${projName}.bin#${ORG_ADDR}"/>
|
|
|
|
|
|
|
|
<target name="all">
|
|
|
|
<antcall target="clean"/>
|
|
|
|
<antcall target="build"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete failonerror="false" dir="${build.dir}"/>
|
2014-01-02 23:27:31 +00:00
|
|
|
<ant dir="${src.dir}/core" target="clean" useNativeBasedir="true" inheritAll="false"/>
|
2014-06-25 13:37:10 +00:00
|
|
|
<ant dir="${src.dir}/plasma" target="clean" useNativeBasedir="true" inheritAll="false"/>
|
|
|
|
<ant dir="${src.dir}/raycast" target="clean" useNativeBasedir="true" inheritAll="false"/>
|
|
|
|
<ant dir="${src.dir}/font" target="clean" useNativeBasedir="true" inheritAll="false"/>
|
2013-08-12 13:34:37 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build">
|
|
|
|
|
|
|
|
<!-- Create build directory -->
|
|
|
|
<mkdir dir="${build.dir}"/>
|
|
|
|
|
2014-01-02 23:27:31 +00:00
|
|
|
<!-- Build sub-projects -->
|
|
|
|
<echo>Building core.</echo>
|
|
|
|
<ant dir="${src.dir}/core" target="build" useNativeBasedir="true" inheritAll="false"/>
|
2014-06-25 13:37:10 +00:00
|
|
|
<echo>Building PLASMA.</echo>
|
|
|
|
<ant dir="${src.dir}/plasma" target="build" useNativeBasedir="true" inheritAll="false"/>
|
2013-08-12 13:34:37 +00:00
|
|
|
<echo>Building raycast.</echo>
|
|
|
|
<ant dir="${src.dir}/raycast" target="build" useNativeBasedir="true" inheritAll="false"/>
|
2014-02-20 15:45:48 +00:00
|
|
|
<echo>Building font engine.</echo>
|
|
|
|
<ant dir="${src.dir}/font" target="build" useNativeBasedir="true" inheritAll="false"/>
|
2014-09-05 14:43:43 +00:00
|
|
|
<echo>Building tile engine.</echo>
|
|
|
|
<ant dir="${src.dir}/tile" target="build" useNativeBasedir="true" inheritAll="false"/>
|
2013-08-12 13:34:37 +00:00
|
|
|
|
2014-02-09 22:59:43 +00:00
|
|
|
<!-- Pack the game data -->
|
|
|
|
<echo>Packing game and code resources.</echo>
|
|
|
|
<java jar="${pack.dir}/PackPartitions.jar" fork="true" failonerror="true">
|
2014-02-20 15:55:07 +00:00
|
|
|
<arg value="data/world/world.xml"/>
|
|
|
|
<arg value="build/game.part.0.bin"/>
|
2014-02-09 22:59:43 +00:00
|
|
|
</java>
|
|
|
|
|
2013-08-12 13:34:37 +00:00
|
|
|
<!-- Construct a directory to put on the Apple -->
|
2013-08-21 17:07:13 +00:00
|
|
|
<delete failonerror="false" dir="${build.dir}/root"/>
|
2013-08-12 13:34:37 +00:00
|
|
|
<mkdir dir="${build.dir}/root"/>
|
|
|
|
<copy todir="${build.dir}/root">
|
2014-07-06 21:40:35 +00:00
|
|
|
<fileset dir="${plasma.dir}" includes="PLVM02.SYSTEM*"/>
|
2014-03-18 20:29:02 +00:00
|
|
|
<fileset dir="${src.dir}/core/build" includes="*.sys*"/>
|
2014-02-20 15:55:07 +00:00
|
|
|
<fileset dir="./build" includes="game.part*.bin"/>
|
2013-08-12 13:34:37 +00:00
|
|
|
</copy>
|
|
|
|
<mkdir dir="${build.dir}/root/"/>
|
|
|
|
|
|
|
|
<!-- Make a new base image file -->
|
2013-08-21 17:07:13 +00:00
|
|
|
<delete failonerror="false" file="${build.dir}/${projName}.2mg"/>
|
2013-08-12 13:34:37 +00:00
|
|
|
<bunzip2 src="./data/disks/base.2mg.bz2" dest="${build.dir}/${projName}.2mg"/>
|
|
|
|
|
|
|
|
<!-- And stuff the directory into it -->
|
2013-08-26 01:31:01 +00:00
|
|
|
<echo>Adding files to image.</echo>
|
2013-08-12 13:34:37 +00:00
|
|
|
<java jar="${a2copy.dir}/a2copy.jar" fork="true" failonerror="true">
|
|
|
|
<arg value="-put"/>
|
|
|
|
<arg value="${build.dir}/${projName}.2mg"/>
|
|
|
|
<arg value="/"/>
|
|
|
|
<arg value="${build.dir}/root"/>
|
|
|
|
</java>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|