more build.xml optimizations

This commit is contained in:
MachineMuse 2013-01-25 02:36:27 -07:00
parent d54350c822
commit 8167f67242

View file

@ -33,12 +33,25 @@
<property name="package.meta-inf" value="META-INF" />
<!-- Version Checking -->
<propertyfile file="${forge.dir}/forgeversion.properties" />
<equals property="forge.already.installed" arg1="${forge.build.number}" arg2="497" />
<available property="forge-exists" file="${download.dir}/minecraftforge-src-${forge.version}.zip" />
<available property="forge-exists" file="${download.dir}/minecraftforge-src-${forge.version}.zip" />
<available property="already-compiled" file="${classes.dir}/net/machinemuse" />
<condition property="should-download-ant-contrib">
<or>
<available file="${download.dir}/ant-contrib/ant-contrib-1.0b3.jar" />
<available file="${download.dir}/minecraftforge-src-${forge.version}.zip" />
</or>
</condition>
<mkdir dir="${download.dir}" />
<mkdir dir="${build.dir}" />
<!-- Dependencies -->
<target name="get-coremod" depends="forgeinstalled.check,setup-forge">
<target name="get-coremod" depends="setup-forge">
<echo message="Downloading IC2 API... " />
<get src="https://dl.dropbox.com/s/u7adzz0rbftlufu/industrialcraft-2-api_1.112.198-lf.zip" dest="${download.dir}/industrialcraft-2-api_${ic2api.version}.zip" />
@ -72,14 +85,6 @@
</target>
<available property="forge-exists" file="${download.dir}/minecraftforge-src-${forge.version}.zip" />
<available property="already-compiled" file="${classes.dir}/net/machinemuse" />
<condition property="should-download-ant-contrib">
<or>
<available file="${download.dir}/ant-contrib/ant-contrib-1.0b3.jar" />
<available file="${download.dir}/minecraftforge-src-${forge.version}.zip" />
</or>
</condition>
<target name="revision">
<propertyfile file="build_number.txt">
@ -93,15 +98,19 @@
</target>
<target name="forgeinstalled.check">
<propertyfile file="${forge.dir}/forgeversion.properties"/>
<condition property="forge.already.installed">
<equals arg1="${forge.build.number}" arg2="497" />
</condition>
</target>
<target name="build" depends="get-coremod" unless="already-compiled">
<antcall target="revision" />
<!-- Copy source -->
<copy todir="${mcpsrc.dir}/net/machinemuse">
<fileset dir="${src.dir}/minecraft/net/machinemuse" />
<filterset>
<filter token="MOD_VERSION" value="${fullversion}" />
</filterset>
</copy>
<!-- Recompile -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows" failonerror="true">
<arg line="/c recompile.bat" />
@ -168,21 +177,7 @@
<chmod file="${mcp.dir}/reobfuscate.sh" perm="+x" />
<chmod file="${mcp.dir}/runtime/bin/astyle-osx" perm="+x" />
<chmod file="${mcp.dir}/runtime/bin/jad-osx" perm="+x" />
<!-- Copy source -->
<mkdir dir="${mcpsrc.dir}/net/machinemuse" />
<copy todir="${mcpsrc.dir}/net/machinemuse">
<fileset dir="${src.dir}/minecraft/net/machinemuse" />
<filterset>
<filter token="MOD_VERSION" value="${fullversion}" />
</filterset>
</copy>
<mkdir dir="${mcpsrc.dir}/net/machinemuse" />
<copy todir="${mcpsrc.dir}/net/machinemuse">
<fileset dir="${src.dir}/minecraft/net/machinemuse" />
<filterset>
<filter token="MOD_VERSION" value="${fullversion}" />
</filterset>
</copy>
<!-- Copy libraries
<copy todir="${mcp.dir}/lib">