2013-09-13 04:48:55 +02:00
|
|
|
<?xml version="1.0" ?>
|
2013-09-02 00:40:54 +02:00
|
|
|
<project name="Equivalent Exchange 3" default="build">
|
2013-09-13 04:48:55 +02:00
|
|
|
|
|
|
|
<!-- Public property files-->
|
|
|
|
<property file="build.properties" prefix="build" />
|
2013-09-18 02:32:02 +02:00
|
|
|
<property file="environment.properties" prefix="environment" />
|
2013-09-13 04:48:55 +02:00
|
|
|
|
|
|
|
<!-- Private property files
|
|
|
|
private.properties only contains the following properties;
|
|
|
|
fingerprint_signature
|
|
|
|
keystore_location
|
|
|
|
keystore_user_alias
|
|
|
|
keystore_user_password
|
|
|
|
These properties are used to properly sign the compiled jar in the 'release' target
|
|
|
|
For the majority of you this is not a concern and you will not need values for these - just use the 'build' target
|
|
|
|
-->
|
|
|
|
<property file="private.properties" prefix="private" />
|
|
|
|
|
|
|
|
<!-- Minecraft Forge -->
|
|
|
|
<property name="minecraftforge_src_archive" value="minecraftforge-src-${build.minecraft_version}-${build.forge_version}.zip" />
|
|
|
|
<property name="minecraftforge_src_archive_location" value="http://files.minecraftforge.net/minecraftforge/${minecraftforge_src_archive}" />
|
|
|
|
|
|
|
|
<target name="forge-clean">
|
2013-09-18 02:32:02 +02:00
|
|
|
<delete dir="${environment.base_location}/forge" />
|
2013-09-13 04:48:55 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="forge-download">
|
2013-09-18 02:32:02 +02:00
|
|
|
<mkdir dir="${environment.base_location}/temp" />
|
|
|
|
<get src="${minecraftforge_src_archive_location}" dest="${environment.base_location}/temp/" verbose="true" usetimestamp="true" />
|
2013-09-13 04:48:55 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="forge-uncompress" depends="forge-download, forge-clean">
|
2013-09-18 02:32:02 +02:00
|
|
|
<unzip src="${environment.base_location}/temp/${minecraftforge_src_archive}" dest="${environment.base_location}" />
|
|
|
|
<delete dir="${environment.base_location}/temp" />
|
2013-09-13 04:48:55 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="forge-install" depends="forge-uncompress">
|
2013-09-18 02:32:02 +02:00
|
|
|
<exec dir="${environment.base_location}/forge/" executable="cmd.exe" osfamily="windows" failonerror="true">
|
2013-09-13 04:48:55 +02:00
|
|
|
<arg value="/c" />
|
2013-09-18 02:32:02 +02:00
|
|
|
<arg value="${environment.base_location}\forge\install.cmd" />
|
2013-09-13 04:48:55 +02:00
|
|
|
</exec>
|
2013-09-18 02:32:02 +02:00
|
|
|
<exec dir="${environment.base_location}/forge/" executable="bash" osfamily="unix" failonerror="true">
|
2013-09-14 21:12:08 +02:00
|
|
|
<arg line="install.sh" />
|
2013-09-13 04:48:55 +02:00
|
|
|
</exec>
|
|
|
|
</target>
|
2013-09-17 01:59:40 +02:00
|
|
|
|
|
|
|
<target name="forge-clean-install" depends="forge-clean, forge-install" />
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="clean">
|
2013-09-18 02:32:02 +02:00
|
|
|
<delete dir="${environment.base_location}/temp" />
|
|
|
|
<delete file="${environment.mcp_location}/src/minecraft/mcmod.info" />
|
|
|
|
<delete file="${environment.mcp_location}/src/minecraft/pack.mcmeta" />
|
|
|
|
<delete dir="${environment.mcp_location}/src/minecraft/com/pahimar" />
|
|
|
|
<delete dir="${environment.mcp_location}/reobf/minecraft" />
|
2013-09-02 00:40:54 +02:00
|
|
|
</target>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="increment_build_number">
|
2013-09-18 02:32:02 +02:00
|
|
|
<propertyfile file="build.properties">
|
2013-09-13 04:48:55 +02:00
|
|
|
<entry key="build_number" type="int" operation="+" default="1" />
|
2013-09-02 00:40:54 +02:00
|
|
|
</propertyfile>
|
|
|
|
</target>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="prep">
|
2013-09-18 02:32:02 +02:00
|
|
|
<copy todir="${environment.mcp_location}/src/minecraft">
|
|
|
|
<fileset dir="${environment.source_location}/common/" />
|
2013-09-02 00:40:54 +02:00
|
|
|
</copy>
|
|
|
|
</target>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="replace_tokens">
|
2013-09-18 02:32:02 +02:00
|
|
|
<replace dir="${environment.mcp_location}/src/minecraft/com/pahimar" token="@VERSION@" value="${build.mod_version}" />
|
|
|
|
<replace dir="${environment.mcp_location}/src/minecraft/com/pahimar" token="@FINGERPRINT@" value="${private.fingerprint_signature}" />
|
|
|
|
<replace dir="${environment.mcp_location}/src/minecraft/com/pahimar" token="@BUILD_NUMBER@" value="${build.build_number}" />
|
2013-09-02 00:40:54 +02:00
|
|
|
</target>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="recompile">
|
2013-09-18 02:32:02 +02:00
|
|
|
<exec dir="${environment.mcp_location}" executable="cmd" osfamily="windows">
|
2013-09-02 00:40:54 +02:00
|
|
|
<arg line="/c recompile.bat" />
|
|
|
|
</exec>
|
2013-09-18 02:32:02 +02:00
|
|
|
<exec dir="${environment.mcp_location}" executable="bash" osfamily="unix">
|
2013-09-02 00:40:54 +02:00
|
|
|
<arg line="recompile.sh" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="reobfuscate">
|
2013-09-18 02:32:02 +02:00
|
|
|
<exec dir="${environment.mcp_location}" executable="cmd" osfamily="windows">
|
2013-09-02 00:40:54 +02:00
|
|
|
<arg line="/c reobfuscate_srg.bat" />
|
|
|
|
</exec>
|
2013-09-18 02:32:02 +02:00
|
|
|
<exec dir="${environment.mcp_location}" executable="bash" osfamily="unix">
|
2013-09-02 00:40:54 +02:00
|
|
|
<arg line="reobfuscate_srg.sh" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="sign_jar">
|
2013-09-18 02:32:02 +02:00
|
|
|
<signjar jar="${environment.release_location}/MC ${build.minecraft_version}/${build.mod_version}/ee3-universal-${build.mod_version}-${build.build_number}.jar" keystore="${private.keystore_location}" alias="${private.keystore_user_alias}" storepass="${private.keystore_user_password}" />
|
2013-09-02 00:40:54 +02:00
|
|
|
</target>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="build">
|
|
|
|
<!-- Prep for the build -->
|
|
|
|
<antcall target="clean" />
|
|
|
|
<antcall target="increment_build_number" />
|
|
|
|
<antcall target="prep" />
|
2013-09-13 04:48:55 +02:00
|
|
|
<antcall target="recompile" />
|
2013-09-02 00:40:54 +02:00
|
|
|
<antcall target="reobfuscate" />
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<!-- Build the jar -->
|
2013-09-18 02:32:02 +02:00
|
|
|
<mkdir dir="${environment.release_location}/MC ${build.minecraft_version}/${build.mod_version}" />
|
|
|
|
<jar destfile="${environment.release_location}/MC ${build.minecraft_version}/${build.mod_version}/ee3-universal-${build.mod_version}-${build.build_number}.jar">
|
|
|
|
<fileset dir="${environment.mcp_location}/src/minecraft/" includes="mcmod.info" />
|
|
|
|
<fileset dir="${environment.mcp_location}/src/minecraft/" includes="pack.mcmeta" />
|
|
|
|
<fileset dir="${environment.mcp_location}/reobf/minecraft" />
|
|
|
|
<fileset dir="${environment.source_location}/resources" excludes="**/xcf/**" />
|
2013-09-02 00:40:54 +02:00
|
|
|
</jar>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<!-- Clean up the MCP source now that we are done -->
|
|
|
|
<antcall target="clean" />
|
|
|
|
</target>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<target name="release">
|
|
|
|
<!-- Prep for the build -->
|
|
|
|
<antcall target="clean" />
|
|
|
|
<antcall target="increment_build_number" />
|
|
|
|
<antcall target="prep" />
|
|
|
|
<antcall target="replace_tokens" />
|
2013-09-13 04:48:55 +02:00
|
|
|
<antcall target="recompile" />
|
2013-09-02 00:40:54 +02:00
|
|
|
<antcall target="reobfuscate" />
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<!-- Build the jar -->
|
2013-09-18 02:32:02 +02:00
|
|
|
<mkdir dir="${environment.release_location}/MC ${build.minecraft_version}/${build.mod_version}" />
|
|
|
|
<jar destfile="${environment.release_location}/MC ${build.minecraft_version}/${build.mod_version}/ee3-universal-${build.mod_version}-${build.build_number}.jar">
|
|
|
|
<fileset dir="${environment.mcp_location}/src/minecraft/" includes="mcmod.info" />
|
|
|
|
<fileset dir="${environment.mcp_location}/src/minecraft/" includes="pack.mcmeta" />
|
|
|
|
<fileset dir="${environment.mcp_location}/reobf/minecraft" />
|
|
|
|
<fileset dir="${environment.source_location}/resources" excludes="**/xcf/**" />
|
2013-09-02 00:40:54 +02:00
|
|
|
</jar>
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<!-- Sign the finished jar -->
|
|
|
|
<antcall target="sign_jar" />
|
2013-09-13 04:48:55 +02:00
|
|
|
|
2013-09-02 00:40:54 +02:00
|
|
|
<!-- Clean up the MCP source now that we are done -->
|
|
|
|
<antcall target="clean" />
|
|
|
|
</target>
|
|
|
|
</project>
|