Boring build file stuff
This commit is contained in:
parent
3400ea1676
commit
06e133f5d9
1 changed files with 50 additions and 2 deletions
52
build.xml
52
build.xml
|
@ -22,6 +22,7 @@
|
||||||
<property name="forge.dir" value="${build.dir}/forge" />
|
<property name="forge.dir" value="${build.dir}/forge" />
|
||||||
<property name="fmp.dir" value="${build.dir}/fmp" />
|
<property name="fmp.dir" value="${build.dir}/fmp" />
|
||||||
<property name="ccc.dir" value="${build.dir}/ccc" />
|
<property name="ccc.dir" value="${build.dir}/ccc" />
|
||||||
|
<property name="worldcore.dir" value="${build.dir}/worldcore" />
|
||||||
<property name="mcp.dir" value="${forge.dir}/mcp" />
|
<property name="mcp.dir" value="${forge.dir}/mcp" />
|
||||||
|
|
||||||
<property name="mod.name" value="BiomesOPlenty-universal-${mc.version}-${mod.version}.${mod.build}.jar" />
|
<property name="mod.name" value="BiomesOPlenty-universal-${mc.version}-${mod.version}.${mod.build}.jar" />
|
||||||
|
@ -31,12 +32,14 @@
|
||||||
|
|
||||||
<property name="forge.name" value="minecraftforge-src-${mc.version}-${forge.version}.zip" />
|
<property name="forge.name" value="minecraftforge-src-${mc.version}-${forge.version}.zip" />
|
||||||
<property name="ccc.name" value="CodeChickenCore-dev%20${ccc.version}.jar" />
|
<property name="ccc.name" value="CodeChickenCore-dev%20${ccc.version}.jar" />
|
||||||
|
<property name="worldcore.name" value="WorldCore-dev-${mc.version}-${worldcore.version}.jar" />
|
||||||
<property name="fmp.name" value="ForgeMultipart-dev-${mc.version}-${fmp.version}.jar" />
|
<property name="fmp.name" value="ForgeMultipart-dev-${mc.version}-${fmp.version}.jar" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Check downloaded dependencies -->
|
<!-- Check downloaded dependencies -->
|
||||||
<available property="forge-downloaded" file="${download.dir}/${forge.name}" />
|
<available property="forge-downloaded" file="${download.dir}/${forge.name}" />
|
||||||
<available property="ccc-downloaded" file="${download.dir}/${ccc.name}" />
|
<available property="ccc-downloaded" file="${download.dir}/${ccc.name}" />
|
||||||
|
<available property="worldcore-downloaded" file="${download.dir}/${worldcore.name}" />
|
||||||
<available property="fmp-downloaded" file="${download.dir}/${fmp.name}" />
|
<available property="fmp-downloaded" file="${download.dir}/${fmp.name}" />
|
||||||
|
|
||||||
<!-- Check installed dependencies -->
|
<!-- Check installed dependencies -->
|
||||||
|
@ -51,6 +54,12 @@
|
||||||
<equals arg1="${build.dependencies.fmp}" arg2="${fmp.version}" />
|
<equals arg1="${build.dependencies.fmp}" arg2="${fmp.version}" />
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
|
<condition property="worldcore-installed">
|
||||||
|
<and>
|
||||||
|
<isset property="forge-installed" />
|
||||||
|
<equals arg1="${build.dependencies.worldcore}" arg2="${worldcore.version}" />
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<!-- Make directories -->
|
<!-- Make directories -->
|
||||||
<mkdir dir="${build.dir}" />
|
<mkdir dir="${build.dir}" />
|
||||||
|
@ -66,6 +75,10 @@
|
||||||
<target name="download-ccc" unless="ccc-downloaded">
|
<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" />
|
<get src="http://www.chickenbones.craftsaddle.org/Files/New_Versions/${mc.version}/${ccc.name}" dest="${download.dir}" usetimestamp="true" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="download-worldcore" unless="worldcore-downloaded">
|
||||||
|
<get src="http://files.minecraftforge.net/WorldCore/${worldcore.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" />
|
||||||
|
@ -119,8 +132,28 @@
|
||||||
<entry key="ccc.name" value="${ccc.name}" />
|
<entry key="ccc.name" value="${ccc.name}" />
|
||||||
</propertyfile>
|
</propertyfile>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="install-worldcore" depends="download-worldcore" unless="worldcore-installed">
|
||||||
|
<echo message="Deleting old WorldCore" />
|
||||||
|
<delete file="${mcp.dir}/lib/${build.dependencies.worldcore.name}" />
|
||||||
|
<delete dir="${fmp.dir}" />
|
||||||
|
|
||||||
|
<echo message="Installing WorldCore" />
|
||||||
|
<copy file="${download.dir}/${worldcore.name}" todir="${mcp.dir}/lib" />
|
||||||
|
<unzip src="${download.dir}/${worldcore.name}" dest="${worldcore.dir}">
|
||||||
|
<patternset>
|
||||||
|
<include name="**/*.class" />
|
||||||
|
</patternset>
|
||||||
|
</unzip>
|
||||||
|
|
||||||
|
<echo message="Updating build.dependencies" />
|
||||||
|
<propertyfile file="${build.dependencies.file}">
|
||||||
|
<entry key="worldcore" value="${worldcore.version}" />
|
||||||
|
<entry key="worldcore.name" value="${worldcore.name}" />
|
||||||
|
</propertyfile>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="install-fmp" depends="install-forge,download-fmp" unless="fmp-installed">
|
<target name="install-fmp" depends="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}" />
|
||||||
<delete dir="${fmp.dir}" />
|
<delete dir="${fmp.dir}" />
|
||||||
|
@ -140,7 +173,7 @@
|
||||||
</propertyfile>
|
</propertyfile>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="install-dependencies" depends="install-forge,install-fmp,install-ccc" />
|
<target name="install-dependencies" depends="install-forge,install-worldcore,install-fmp,install-ccc" />
|
||||||
|
|
||||||
<!-- Targets for building -->
|
<!-- Targets for building -->
|
||||||
<target name="recompile">
|
<target name="recompile">
|
||||||
|
@ -201,6 +234,11 @@
|
||||||
<fileset dir="${fmp.dir}" />
|
<fileset dir="${fmp.dir}" />
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
|
<echo message="Copying WorldCore" />
|
||||||
|
<copy todir="${mcp.dir}/bin/minecraft">
|
||||||
|
<fileset dir="${worldcore.dir}" />
|
||||||
|
</copy>
|
||||||
|
|
||||||
<echo message="Copying CodeChickenCore" />
|
<echo message="Copying CodeChickenCore" />
|
||||||
<copy todir="${mcp.dir}/bin/minecraft">
|
<copy todir="${mcp.dir}/bin/minecraft">
|
||||||
<fileset dir="${ccc.dir}" />
|
<fileset dir="${ccc.dir}" />
|
||||||
|
@ -225,6 +263,16 @@
|
||||||
</fileset>
|
</fileset>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<echo message="Removing WorldCore" />
|
||||||
|
<delete includeemptydirs="true">
|
||||||
|
<fileset dir="${mcp.dir}/bin/minecraft">
|
||||||
|
<present present="both" targetdir="${worldcore.dir}" />
|
||||||
|
</fileset>
|
||||||
|
<fileset dir="${mcp.dir}/reobf/minecraft">
|
||||||
|
<present present="both" targetdir="${worldcore.dir}" />
|
||||||
|
</fileset>
|
||||||
|
</delete>
|
||||||
|
|
||||||
<echo message="Removing CodeChickenCore" />
|
<echo message="Removing CodeChickenCore" />
|
||||||
<delete includeemptydirs="true">
|
<delete includeemptydirs="true">
|
||||||
<fileset dir="${mcp.dir}/bin/minecraft">
|
<fileset dir="${mcp.dir}/bin/minecraft">
|
||||||
|
|
Loading…
Reference in a new issue