And more build file crap!

This commit is contained in:
Adubbz 2013-11-07 06:08:50 +11:00
parent 195e55209e
commit 72b1966493

View file

@ -58,6 +58,10 @@
<get src="http://files.minecraftforge.net/${forge.name}" dest="${download.dir}" usetimestamp="true" /> <get src="http://files.minecraftforge.net/${forge.name}" dest="${download.dir}" usetimestamp="true" />
</target> </target>
<target name="download-ccc" unless="ccc-downloaded">
<get src="http://www.chickenbones.craftsaddle.org/Files/New_Versions/${mc.version}/${ccc.name}" dest="${download.dir}" usetimestamp="true" />
</target>
<target name="download-fmp" unless="fmp-downloaded"> <target name="download-fmp" unless="fmp-downloaded">
<get src="http://files.minecraftforge.net/ForgeMultipart/${fmp.name}" dest="${download.dir}" usetimestamp="true" /> <get src="http://files.minecraftforge.net/ForgeMultipart/${fmp.name}" dest="${download.dir}" usetimestamp="true" />
</target> </target>
@ -91,6 +95,26 @@
</propertyfile> </propertyfile>
</target> </target>
<target name="install-ccc" depends="install-forge,download-ccc" unless="ccc-installed">
<echo message="Deleting old CodeChickenCore" />
<delete file="${mcp.dir}/lib/${build.dependencies.ccc.name}" />
<echo message="Installing CodeChickenCore" />
<copy file="${download.dir}/${ccc.name}" todir="${mcp.dir}/lib" />
<unzip src="${download.dir}/${ccc.name}" dest="${ccc.dir}">
<patternset>
<include name="**/*.class" />
</patternset>
</unzip>
<echo message="Updating build.dependencies" />
<propertyfile file="${build.dependencies.file}">
<entry key="ccc" value="${ccc.version}" />
<entry key="ccc.name" value="${ccc.name}" />
</propertyfile>
</target>
<target name="install-fmp" depends="install-forge,download-fmp" unless="fmp-installed"> <target name="install-fmp" depends="install-forge,download-fmp" unless="fmp-installed">
<echo message="Deleting old ForgeMultipart" /> <echo message="Deleting old ForgeMultipart" />
<delete file="${mcp.dir}/lib/${build.dependencies.fmp.name}" /> <delete file="${mcp.dir}/lib/${build.dependencies.fmp.name}" />
@ -171,6 +195,11 @@
<fileset dir="${fmp.dir}" /> <fileset dir="${fmp.dir}" />
</copy> </copy>
<echo message="Copying CodeChickenCore" />
<copy todir="${mcp.dir}/bin/minecraft">
<fileset dir="${ccc.dir}" />
</copy>
<echo message="Reobfuscating" /> <echo message="Reobfuscating" />
<property name="mcp.python.exe" location="${mcp.dir}/runtime/bin/python/python_mcp.exe" /> <property name="mcp.python.exe" location="${mcp.dir}/runtime/bin/python/python_mcp.exe" />
<exec dir="${mcp.dir}" executable="${mcp.python.exe}" osfamily="windows" resultproperty="reobfuscate.code"> <exec dir="${mcp.dir}" executable="${mcp.python.exe}" osfamily="windows" resultproperty="reobfuscate.code">
@ -190,6 +219,21 @@
</fileset> </fileset>
</delete> </delete>
<echo message="Removing CodeChickenCore" />
<delete includeemptydirs="true">
<fileset dir="${mcp.dir}/bin/minecraft">
<present present="both" targetdir="${ccc.dir}" />
</fileset>
<fileset dir="${mcp.dir}/reobf/minecraft">
<present present="both" targetdir="${ccc.dir}" />
</fileset>
</delete>
<echo message="Copying DepLoader.class from CCC" />
<copy todir="${mcp.dir}/reobf/minecraft/codechicken/core/launch/">
<fileset dir="${ccc.dir}/codechicken/core/launch/" includes="DepLoader*.class" />
</copy>
<fail message="Failed to reobfuscate"> <fail message="Failed to reobfuscate">
<condition> <condition>
<isfailure code="${reobfuscate.code}" /> <isfailure code="${reobfuscate.code}" />
@ -204,7 +248,6 @@
<echo message="Packaging BiomesOPlenty Universal" /> <echo message="Packaging BiomesOPlenty Universal" />
<jar destfile="${dist.dir}/${mod.name}" manifest="${mcp.dir}/reobf/resources/MANIFEST.MF"> <jar destfile="${dist.dir}/${mod.name}" manifest="${mcp.dir}/reobf/resources/MANIFEST.MF">
<fileset dir="${mcp.dir}/reobf/minecraft" includes="**/biomesoplenty/**" /> <fileset dir="${mcp.dir}/reobf/minecraft" includes="**/biomesoplenty/**" />
<fileset dir="${mcp.dir}/reobf/minecraft" includes="**/codechicken/**" />
<fileset dir="${mcp.dir}/reobf/resources" excludes="MANIFEST.MF"> <fileset dir="${mcp.dir}/reobf/resources" excludes="MANIFEST.MF">
</fileset> </fileset>
</jar> </jar>
@ -217,7 +260,6 @@
<jar destfile="${dist.dir}/${dev.name}" manifest="${mcp.dir}/reobf/resources/MANIFEST.MF"> <jar destfile="${dist.dir}/${dev.name}" manifest="${mcp.dir}/reobf/resources/MANIFEST.MF">
<fileset dir="tmp" includes="**/src/**" /> <fileset dir="tmp" includes="**/src/**" />
<fileset dir="${mcp.dir}/bin/minecraft" includes="**/biomesoplenty/**" /> <fileset dir="${mcp.dir}/bin/minecraft" includes="**/biomesoplenty/**" />
<fileset dir="${mcp.dir}/bin/minecraft" includes="**/codechicken/**" />
<fileset dir="${mcp.dir}/reobf/resources" excludes="MANIFEST.MF"> <fileset dir="${mcp.dir}/reobf/resources" excludes="MANIFEST.MF">
</fileset> </fileset>
</jar> </jar>