Fix up some build stuff. This makes things a little bit prettier.

This commit is contained in:
Christian 2012-10-29 22:25:19 -04:00
parent 86d66ff0dc
commit 9210e63338
3 changed files with 14 additions and 20 deletions

View File

@ -2,7 +2,7 @@
<!-- ====================================================================== <!-- ======================================================================
mod_IronChest IronChest
Bigger chests Bigger chests
cpw cpw
@ -62,7 +62,7 @@
<antcall target="writeversion" /> <antcall target="writeversion" />
</target> </target>
<target name="clean"> <target name="clean" depends="buildenvsetup">
<antcall target="clean-source"/> <antcall target="clean-source"/>
<exec executable="${python.exe}" dir="${mcp.home}"> <exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${mcp.home}/runtime/updatemd5.py" /> <arg value="${mcp.home}/runtime/updatemd5.py" />
@ -70,20 +70,19 @@
</exec> </exec>
</target> </target>
<target name="buildandreobfmcp" depends="init"> <target name="recompile" depends="init">
<exec executable="${python.exe}" dir="${mcp.home}" failonerror="true"> <exec executable="${python.exe}" dir="${mcp.home}" failonerror="true">
<arg value="${mcp.home}/runtime/recompile.py" /> <arg value="${mcp.home}/runtime/recompile.py" />
</exec> </exec>
</target>
<target name="reobfuscate" depends="init">
<exec executable="${python.exe}" dir="${mcp.home}"> <exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${mcp.home}/runtime/reobfuscate.py" /> <arg value="${mcp.home}/runtime/reobfuscate.py" />
</exec> </exec>
</target> </target>
<target name="merge-client" depends="init,clean"> <target name="merge" depends="init">
<antcall target="merge-source"/>
</target>
<target name="merge-source">
<copy todir="${client.mcp.srcdir}" overwrite="true" verbose="true"> <copy todir="${client.mcp.srcdir}" overwrite="true" verbose="true">
<fileset dir="${client.src.dir}" includes="**/*.java" /> <fileset dir="${client.src.dir}" includes="**/*.java" />
</copy> </copy>
@ -92,7 +91,7 @@
</copy> </copy>
</target> </target>
<target name="build-client" depends="init,clean,merge-client,buildandreobfmcp"> <target name="build-universal" depends="init,clean,merge,recompile,reobfuscate">
<antcall target="writeversion" /> <antcall target="writeversion" />
<antcall target="extract-built-jar"/> <antcall target="extract-built-jar"/>
</target> </target>
@ -120,7 +119,7 @@
</jar> </jar>
</target> </target>
<target name="build" depends="merge-client,build-client" /> <target name="build" depends="build-universal" />
<target name="buildandclean" depends="build"> <target name="buildandclean" depends="build">
<antcall target="clean" /> <antcall target="clean" />
@ -136,11 +135,5 @@
<present present="both" targetdir="${common.src.dir}" /> <present present="both" targetdir="${common.src.dir}" />
</fileset> </fileset>
</delete> </delete>
</target>
<target name="deploy" depends="init,build-client">
<property name="jarname" value="${modname}-client-${version}" />
<move file="${deploy.dir}/${jarname}.zip" tofile="${deploy.dir}/${jarname}.zip.${timestamp}" failonerror="false" verbose="true" />
<copy file="${basedir}/${jarname}.zip" todir="${deploy.dir}" verbose="true" />
</target> </target>
</project> </project>

View File

@ -13,7 +13,8 @@ public class Version {
private static String minor; private static String minor;
private static String rev; private static String rev;
private static String build; private static String build;
private static String mcversion; @SuppressWarnings("unused")
private static String mcversion;
static void init(Properties properties) { static void init(Properties properties) {
if (properties != null) { if (properties != null) {
@ -24,7 +25,7 @@ public class Version {
mcversion = properties.getProperty("IronChest.build.mcversion"); mcversion = properties.getProperty("IronChest.build.mcversion");
} }
} }
public static String fullVersionString() { public static String fullVersionString() {
return String.format("%s.%s.%s build %s", major,minor,rev, build); return String.format("%s.%s.%s build %s", major,minor,rev, build);
} }

View File

@ -5,7 +5,7 @@
"description": "New chests with larger sizes, with in-place upgrade items. "description": "New chests with larger sizes, with in-place upgrade items.
The feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest", The feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest",
"version": "@VERSION@", "version": "@VERSION@",
"mcversion": "1.3.2", "mcversion": "1.4.2",
"url": "http://www.minecraftforum.net/topic/981855-", "url": "http://www.minecraftforum.net/topic/981855-",
"updateUrl": "", "updateUrl": "",
"authors": [ "authors": [
@ -19,4 +19,4 @@
"dependencies": [ "dependencies": [
] ]
} }
] ]