more build.xml optimizations
This commit is contained in:
parent
d54350c822
commit
8167f67242
1 changed files with 24 additions and 29 deletions
53
build.xml
53
build.xml
|
@ -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">
|
||||
|
@ -91,17 +96,21 @@
|
|||
<jar destfile="${dist.dir}/ModularPowersuits-${fullversion}.jar" basedir="${classes.dir}" />
|
||||
<delete dir="${classes.dir}" />
|
||||
</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">
|
||||
|
|
Loading…
Reference in a new issue