2012-06-15 14:15:11 +02:00
|
|
|
<project name="Buildcraft" basedir="../" default="main">
|
|
|
|
|
|
|
|
<!-- Properties -->
|
|
|
|
|
2012-06-20 03:50:57 +02:00
|
|
|
<property name="build.dir" value="build"/>
|
|
|
|
<property name="src.dir" value="src"/>
|
2012-06-15 14:15:11 +02:00
|
|
|
|
2012-07-01 19:10:24 +02:00
|
|
|
<property name="download.dir" value="download"/>
|
2012-06-20 03:50:57 +02:00
|
|
|
<property name="files.minecraft.dir" value="jars"/>
|
2012-06-15 14:15:11 +02:00
|
|
|
|
2012-06-20 03:50:57 +02:00
|
|
|
<property name="classes.dir" value="${build.dir}/classes"/>
|
|
|
|
<property name="jar.dir" value="${build.dir}/dist"/>
|
|
|
|
|
|
|
|
<property name="mcp.dir" value="${build.dir}/mcp"/>
|
|
|
|
<property name="forge.dir" value="${mcp.dir}/forge"/>
|
|
|
|
|
|
|
|
<property name="clientsrc.dir" value="${mcp.dir}/src/minecraft"/>
|
|
|
|
<property name="serversrc.dir" value="${mcp.dir}/src/minecraft_server"/>
|
|
|
|
|
|
|
|
<property name="mcp.version" value="62"/>
|
2012-06-25 18:37:27 +02:00
|
|
|
<property name="forge.version" value="3.3.8.152"/>
|
2012-06-25 21:23:15 +02:00
|
|
|
<property name="bc.version" value="3.1.6"/>
|
|
|
|
<property name="bc.version.full" value="${bc.version}.${BUILD_NUMBER}"/>
|
2012-06-15 14:15:11 +02:00
|
|
|
|
2012-06-25 21:23:15 +02:00
|
|
|
<echo message="Starting build for ${bc.version.full}"/>
|
2012-06-25 18:37:27 +02:00
|
|
|
|
2012-06-15 14:15:11 +02:00
|
|
|
<!-- Targets -->
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete dir="${build.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="setup">
|
|
|
|
|
2012-06-20 03:50:57 +02:00
|
|
|
<mkdir dir="${download.dir}"/>
|
|
|
|
|
2012-07-01 19:10:24 +02:00
|
|
|
<get src="http://mcp.ocean-labs.de/files/mcp${mcp.version}.zip" dest="${download.dir}" usetimestamp="True"/>
|
2012-06-20 03:50:57 +02:00
|
|
|
<get src="https://dl.dropbox.com/u/28221422/MinecraftForge/forge-${forge.version}/minecraftforge-src-${forge.version}.zip"
|
2012-07-01 19:10:24 +02:00
|
|
|
dest="${download.dir}" usetimestamp="True"/>
|
2012-06-20 03:50:57 +02:00
|
|
|
|
2012-06-15 22:04:26 +02:00
|
|
|
<unzip dest="${mcp.dir}">
|
2012-06-20 03:50:57 +02:00
|
|
|
<fileset dir="${download.dir}">
|
2012-06-15 22:04:26 +02:00
|
|
|
<include name="mcp*.zip"/>
|
|
|
|
</fileset>
|
|
|
|
</unzip>
|
|
|
|
|
|
|
|
<unzip dest="${mcp.dir}">
|
2012-06-20 03:50:57 +02:00
|
|
|
<fileset dir="${download.dir}">
|
2012-06-15 22:04:26 +02:00
|
|
|
<include name="minecraftforge-src-*.zip"/>
|
|
|
|
</fileset>
|
|
|
|
</unzip>
|
2012-06-15 14:15:11 +02:00
|
|
|
|
2012-06-20 03:50:57 +02:00
|
|
|
<copy todir="${mcp.dir}/jars">
|
|
|
|
<fileset dir="${files.minecraft.dir}"/>
|
|
|
|
</copy>
|
|
|
|
|
2012-06-15 14:15:11 +02:00
|
|
|
<chmod file="${mcp.dir}/updatemd5.sh" perm="+x"/>
|
|
|
|
<chmod file="${mcp.dir}/recompile.sh" perm="+x"/>
|
|
|
|
<chmod file="${mcp.dir}/reobfuscate.sh" perm="+x"/>
|
|
|
|
<chmod file="${forge.dir}/install.sh" perm="+x"/>
|
|
|
|
|
|
|
|
<!-- Install forge -->
|
|
|
|
<exec dir="${forge.dir}" executable="cmd" osfamily="windows">
|
|
|
|
<arg line="/c install.cmd"/>
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<exec dir="${forge.dir}" executable="sh" osfamily="unix">
|
|
|
|
<arg value="install.sh" />
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<!-- Copy BC source -->
|
|
|
|
<copy todir="${clientsrc.dir}">
|
2012-06-23 16:37:15 +02:00
|
|
|
<fileset dir="${src.dir}/buildcraft_client"/>
|
2012-06-15 14:15:11 +02:00
|
|
|
</copy>
|
|
|
|
<copy todir="${clientsrc.dir}">
|
|
|
|
<fileset dir="${src.dir}/common">
|
2012-06-20 03:50:57 +02:00
|
|
|
<exclude name="**/buildcraft/devel"/>
|
2012-06-15 14:15:11 +02:00
|
|
|
</fileset>
|
2012-06-23 15:45:52 +02:00
|
|
|
<filterset>
|
|
|
|
<filter token="VERSION" value="${bc.version}" />
|
|
|
|
</filterset>
|
2012-06-15 14:15:11 +02:00
|
|
|
</copy>
|
2012-06-23 15:45:52 +02:00
|
|
|
|
2012-06-15 14:15:11 +02:00
|
|
|
<copy todir="${serversrc.dir}">
|
2012-06-23 17:07:17 +02:00
|
|
|
<fileset dir="${src.dir}/buildcraft_server"/>
|
2012-06-15 14:15:11 +02:00
|
|
|
</copy>
|
|
|
|
<copy todir="${serversrc.dir}">
|
|
|
|
<fileset dir="${src.dir}/common">
|
2012-06-20 03:50:57 +02:00
|
|
|
<exclude name="**/buildcraft/devel"/>
|
2012-06-15 14:15:11 +02:00
|
|
|
</fileset>
|
2012-06-23 15:45:52 +02:00
|
|
|
<filterset>
|
|
|
|
<filter token="VERSION" value="${bc.version}" />
|
|
|
|
</filterset>
|
2012-06-15 14:15:11 +02:00
|
|
|
</copy>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="setup">
|
|
|
|
|
|
|
|
<!-- Recompile -->
|
|
|
|
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
|
|
|
|
<arg line="/c recompile.bat"/>
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
|
|
|
|
<arg value="recompile.sh" />
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<!-- Reobf -->
|
|
|
|
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
|
|
|
|
<arg line="/c reobfuscate.bat"/>
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
|
|
|
|
<arg value="reobfuscate.sh" />
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<!-- Copy BC classes -->
|
|
|
|
<copy todir="${classes.dir}/client">
|
|
|
|
<fileset dir="${mcp.dir}/reobf/minecraft"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${classes.dir}/server">
|
|
|
|
<fileset dir="${mcp.dir}/reobf/minecraft_server"/>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- Copy resoucres -->
|
|
|
|
<copy todir="${classes.dir}/client">
|
|
|
|
<fileset dir="${src.dir}/buildcraft_resources"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${classes.dir}/server">
|
|
|
|
<fileset dir="${src.dir}/buildcraft_resources">
|
|
|
|
<exclude name="gfx/*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="package" depends="compile">
|
|
|
|
|
2012-06-25 21:23:15 +02:00
|
|
|
<jar destfile="${jar.dir}/buildcraft-client-${bc.version.full}.jar" basedir="${classes.dir}/client"/>
|
|
|
|
<jar destfile="${jar.dir}/buildcraft-server-${bc.version.full}.jar" basedir="${classes.dir}/server"/>
|
2012-06-15 14:15:11 +02:00
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="main" depends="clean,package"/>
|
|
|
|
|
2012-07-01 19:10:24 +02:00
|
|
|
</project>
|