Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Added build scripts
Browse files Browse the repository at this point in the history
Totally snagged this off of the EE3 and modified it.
  • Loading branch information
renevo committed Jul 11, 2013
1 parent e10b9ef commit c174894
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Tools for the code
- [GIT](http://git-scm.com/downloads)


*NOTE: You should run this command in GIT to prevent bad commits*
*NOTE: You should run this command in GIT to prevent eclipse workspace commits*

<pre><code>
git update-index --assume-unchanged eclipse\.metadata\.plugins\org.eclipse.core.resources\.root\7.tree
Expand Down Expand Up @@ -50,3 +50,17 @@ Run setup.cmd *(Requires powershell at the moment, someone is more than welcome
- 6. Run /mcp/forge/install.cmd
- 7. Wait for days
- 8. Open Eclipse to /eclipse/ folder


***

Building the code
===================

####Ants####

- 1. Download `Apache Ant` (found [here](http://ant.apache.org/))
- 2. Run ant on the `/` directory.
- 3. Outputs will be in the `bin` directory


3 changes: 3 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Wed, 10 Jul 2013 19:02:52 -0700
release.minecraft.version=1.5.2
release.number=0
67 changes: 67 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" ?>
<!-- Totally using the EE3 build script as a base. Thanks pahimar! https://github.com/pahimar -->
<project name="BurpTech" default="build">

<property file="build.properties" prefix="build"/>

<target name="clean">
<delete file="mcp\src\minecraft\mcmod.info" />
<delete dir="mcp\src\minecraft\burptech" />
<delete dir="mcp\reobf\minecraft" />
</target>

<target name="increment_build_number">
<propertyfile file="build.properties">
<entry key="release.number" type="int" operation="+" default="1"/>
</propertyfile>
</target>

<target name="prep">
<copy todir="mcp\src\minecraft">
<fileset dir="src\common\" />
</copy>
</target>

<target name="replace_tokens">
<replace dir="mcp\src\minecraft" token="@VERSION@" value="${build.release.minecraft.version}.${build.release.number}" />
</target>

<target name="recompile">
<exec dir="mcp" executable="cmd" osfamily="windows">
<arg line="/c recompile.bat" />
</exec>
<exec dir="mcp" executable="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
</target>

<target name="reobfuscate">
<exec dir="mcp" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate_srg.bat" />
</exec>
<exec dir="mcp" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
</target>

<target name="build">
<!-- Prep for the build -->
<antcall target="clean" />
<antcall target="increment_build_number" />
<antcall target="prep" />
<antcall target="replace_tokens" />
<antcall target="recompile" />
<antcall target="reobfuscate" />

<!-- Build the jar -->
<mkdir dir="bin\${build.release.minecraft.version}\" />
<jar destfile="bin\${build.release.minecraft.version}\burptech-${build.release.minecraft.version}.${build.release.number}.jar">
<fileset dir="mcp\src\minecraft\" includes="mcmod.info" />
<fileset dir="mcp\reobf\minecraft" />
<fileset dir="src\resources" excludes="**/xcf/**" />
</jar>

<!-- Clean up the MCP source now that we are done -->
<antcall target="clean" />
</target>
</project>
2 changes: 2 additions & 0 deletions setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ $rootPath = $rootLocation.path

write-host "Cleaning Environment"

## TODO: Add the Git commands here to ignore /elipse/ file changes

### CLEAN ###
if (Test-Path .\forgeinstall.log)
{
Expand Down

0 comments on commit c174894

Please sign in to comment.