Posted January 16, 201312 yr I wrote this tutorial on making an ANT build script for Forge/MCP: This tutorial is about creating an ANT build script to easily produce .zip's of your mod. Step 1: Install ANT. On Mac/Linux, it should be already installed, but on Windows, you need to download it from http://ant.apache.org/bindownload.cgi. Step 2: Create a file build.xml in your Forge workspace (/forge, not /forge/mcp). If you have your code in a Github repository elsewhere in the hierarchy, put it there, I will tell you how to make it work later. Step 3: Fill build.xml with these contents, and edit anywhere that has {STUFF}. <?xml version="1.0" encoding="UTF-8" ?> <project name="{NAME}" basedir="{Root direcotry, use ../'s to move up to the Forge workspace if you use a Github repository that is elsewhere.}" default="build"> <target name="build"> <delete dir="build" /> <delete dir="mcp/reobf" /> <mkdir dir="build" /> <exec executable="recompile.bat" dir="mcp" resolveexecutable="true" osfamily="windows"></exec> <exec executable="reobfuscate.bat" dir="mcp" resolveexecutable="true" osfamily="windows"></exec> <exec executable="recompile.sh" dir="mcp" resolveexecutable="true" osfamily="unix"></exec> <exec executable="reobfuscate.sh" dir="mcp" resolveexecutable="true" osfamily="unix"></exec> <copy todir="build"> <fileset dir="mcp/reobf/minecraft" excludes=".git/**" /> <fileset dir="mcp/src/minecraft/{PATH TO PACKAGE}"> <exclude name=".git/**"/> <exclude name="**/*.java"/> <exclude name="**/*.xml"/> </fileset> </copy> <zip destfile="build/{NAME OF ZIP}.zip"> <fileset dir="build" /> </zip> </target> </project> Step 4: To run this script, run the command 'ant' in the directory it is located.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.