Add in a setupenvironment ant target specifically for setting up an FML environment from scratch
This commit is contained in:
parent
0418f01886
commit
6c99b80b73
1 changed files with 62 additions and 23 deletions
|
@ -26,10 +26,10 @@
|
||||||
<target name="writeversion" depends="buildenvsetup">
|
<target name="writeversion" depends="buildenvsetup">
|
||||||
<exec executable="${python.exe}" dir="${basedir}" failonerror="true">
|
<exec executable="${python.exe}" dir="${basedir}" failonerror="true">
|
||||||
<arg value="${basedir}/getversion.py" />
|
<arg value="${basedir}/getversion.py" />
|
||||||
<arg value="${mcp.home}"/>
|
<arg value="${mcp.home}" />
|
||||||
</exec>
|
</exec>
|
||||||
<propertyfile file="fmlversion.properties">
|
<propertyfile file="fmlversion.properties">
|
||||||
<entry key="fmlbuild.build.number" type="int" value="${version.build}"/>
|
<entry key="fmlbuild.build.number" type="int" value="${version.build}" />
|
||||||
</propertyfile>
|
</propertyfile>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -68,7 +68,6 @@
|
||||||
<antcall target="writeversion" />
|
<antcall target="writeversion" />
|
||||||
<property file="fmlversion.properties" />
|
<property file="fmlversion.properties" />
|
||||||
<property name="build.number" value="${fmlbuild.major.number}.${fmlbuild.minor.number}.${fmlbuild.revision.number}" />
|
<property name="build.number" value="${fmlbuild.major.number}.${fmlbuild.minor.number}.${fmlbuild.revision.number}" />
|
||||||
<property name="version.minecraft" value="${fmlbuild.mcversion}" />
|
|
||||||
<property name="version.major" value="${fmlbuild.major.number}" />
|
<property name="version.major" value="${fmlbuild.major.number}" />
|
||||||
<property name="version.minor" value="${fmlbuild.minor.number}" />
|
<property name="version.minor" value="${fmlbuild.minor.number}" />
|
||||||
<property name="version.rev" value="${fmlbuild.revision.number}" />
|
<property name="version.rev" value="${fmlbuild.revision.number}" />
|
||||||
|
@ -95,8 +94,8 @@
|
||||||
<condition>
|
<condition>
|
||||||
<not>
|
<not>
|
||||||
<and>
|
<and>
|
||||||
<available file="${mcp.home}/bin/minecraft/net/minecraft/client/Minecraft.class"/>
|
<available file="${mcp.home}/bin/minecraft/net/minecraft/client/Minecraft.class" />
|
||||||
<available file="${mcp.home}/bin/minecraft_server/net/minecraft/server/MinecraftServer.class"/>
|
<available file="${mcp.home}/bin/minecraft_server/net/minecraft/server/MinecraftServer.class" />
|
||||||
</and>
|
</and>
|
||||||
</not>
|
</not>
|
||||||
</condition>
|
</condition>
|
||||||
|
@ -105,9 +104,9 @@
|
||||||
<arg value="${mcp.home}/runtime/reobfuscate.py" />
|
<arg value="${mcp.home}/runtime/reobfuscate.py" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="${python.exe}" dir="${mcp.home}">
|
<exec executable="${python.exe}" dir="${mcp.home}">
|
||||||
<arg value="${basedir}/generatechangedfilelist.py"/>
|
<arg value="${basedir}/generatechangedfilelist.py" />
|
||||||
<arg value="${mcp.home}"/>
|
<arg value="${mcp.home}" />
|
||||||
<arg value="${basedir}/difflist.txt"/>
|
<arg value="${basedir}/difflist.txt" />
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -151,9 +150,9 @@
|
||||||
<mkdir dir="${basedir}/target" />
|
<mkdir dir="${basedir}/target" />
|
||||||
<zip destfile="${basedir}/target/${jarname}.zip">
|
<zip destfile="${basedir}/target/${jarname}.zip">
|
||||||
<fileset dir="${output}" includes="**/*.class" />
|
<fileset dir="${output}" includes="**/*.class" />
|
||||||
<zipfileset dir="${basedir}" includes="fmlversion.properties"/>
|
<zipfileset dir="${basedir}" includes="fmlversion.properties" />
|
||||||
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt" />
|
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt" />
|
||||||
<zipfileset dir="${basedir}" includes="install/CREDITS-fml.txt" fullpath="CREDITS-fml.txt"/>
|
<zipfileset dir="${basedir}" includes="install/CREDITS-fml.txt" fullpath="CREDITS-fml.txt" />
|
||||||
<mappedresources>
|
<mappedresources>
|
||||||
<concat>
|
<concat>
|
||||||
<fileset dir="${basedir}/install" includes="README.txt" />
|
<fileset dir="${basedir}/install" includes="README.txt" />
|
||||||
|
@ -214,4 +213,44 @@
|
||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="setupenvironment" depends="buildenvsetup">
|
||||||
|
<input message="This will clean the mcp environment at ${mcp.home} and backup any src-work folder there (src-base will be erased). Continue?" validargs="y,n" addproperty="do.continue" />
|
||||||
|
<condition property="do.not.continue">
|
||||||
|
<equals arg1="n" arg2="${do.continue}" />
|
||||||
|
</condition>
|
||||||
|
<fail if="do.not.continue">You have decided not to continue. This script will stop now.</fail>
|
||||||
|
<echo>Preparing the MCP environment at ${mcp.home}</echo>
|
||||||
|
<exec executable="${python.exe}" dir="${mcp.home}">
|
||||||
|
<arg value="${mcp.home}/runtime/cleanup.py" />
|
||||||
|
<arg value="-f" />
|
||||||
|
</exec>
|
||||||
|
<exec executable="${python.exe}" dir="${mcp.home}">
|
||||||
|
<arg value="${mcp.home}/runtime/decompile.py" />
|
||||||
|
<arg value="-d" />
|
||||||
|
<arg value="-n" />
|
||||||
|
<arg value="-r" />
|
||||||
|
</exec>
|
||||||
|
<exec executable="${python.exe}" dir="${mcp.home}">
|
||||||
|
<arg value="${mcp.home}/runtime/updatemd5.py" />
|
||||||
|
<arg value="-f" />
|
||||||
|
</exec>
|
||||||
|
<echo>Moving old patched sources at ${mcp.home}/src-work out of the way</echo>
|
||||||
|
<move todir="${mcp.home}/src-work${timestamp}" failonerror="false" verbose="true">
|
||||||
|
<fileset dir="${mcp.home}/src-work"/>
|
||||||
|
</move>
|
||||||
|
<echo>Deleting old patch references at ${mcp.home}/src-base</echo>
|
||||||
|
<delete dir="${mcp.home}/src-base" failonerror="false"/>
|
||||||
|
<echo>Creating new patch references at ${mcp.home}/src-base</echo>
|
||||||
|
<copy todir="${mcp.home}/src-base">
|
||||||
|
<fileset dir="${mcp.home}/src"/>
|
||||||
|
</copy>
|
||||||
|
<echo>Creating clean patch references at ${mcp.home}/src-work</echo>
|
||||||
|
<copy todir="${mcp.home}/src-work">
|
||||||
|
<fileset dir="${mcp.home}/src"/>
|
||||||
|
</copy>
|
||||||
|
<antcall target="patch"/>
|
||||||
|
<antcall target="writeversion"/>
|
||||||
|
<echo>Setup complete! You should now be able to open ${basedir}/eclipse as a workspace in eclipse and import/refresh the FML-Server and FML-Client projects</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in a new issue