Added build script

This commit is contained in:
Calclavia 2013-08-01 20:20:14 -04:00
parent 663d697a25
commit de2881ef84
3 changed files with 104 additions and 0 deletions

7
build.properties Normal file
View file

@ -0,0 +1,7 @@
dir.development=./
dir.mcp=${dir.development}forge/mcp
version.minecraft=1.6.2
version.mod.major=0
version.mod.minor=0
version.mod.revis=1
version.universalelectricity=2.0.0

90
build.xml Normal file
View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Potential Expansion" default="build">
<property file="build.properties" />
<property environment="env" />
<property name="file.main" value="Potential_Expansion.jar" />
<property name="file.api" value="Potential_Expansion_API.zip" />
<property name="file.mainfile" value="Potential_Expansion_v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.jar" />
<property name="file.apifile" value="Potential_Expansion_API_v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.zip" />
<target name="build">
<copy todir="${dir.development}">
<fileset dir="../Minecraft Forge Latest/" />
</copy>
<copy todir="${dir.mcp}/src/minecraft">
<fileset dir="${dir.development}src">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}Modding-Library/src/">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<mkdir dir="DevContents" />
<mkdir dir="UeContents" />
<mkdir dir="BcContents" />
<mkdir dir="output" />
<replace dir="${dir.mcp}/src/minecraft" token="@MAJOR@" value="${version.mod.major}" />
<replace dir="${dir.mcp}/src/minecraft" token="@MINOR@" value="${version.mod.minor}" />
<replace dir="${dir.mcp}/src/minecraft" token="@REVIS@" value="${version.mod.revis}" />
<replace dir="${dir.mcp}/src/minecraft" token="@BUILD@" value="${env.BUILD_NUMBER}" />
<exec dir="${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="recompile.bat" />
</exec>
<exec dir="${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="reobfuscate_srg.bat" />
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
<copy todir="JarContents">
<fileset dir="${dir.mcp}/reobf/minecraft" excludes=".git/**" />
<fileset dir="${dir.development}resources">
<exclude name=".git/**"/>
<exclude name="**/*.java"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}Modding-Library/resources/">
<exclude name=".git/**"/>
<exclude name="**/*.java"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<!--
<copy todir="APIContents">
<fileset dir="${dir.development}src/powerexpansion/api" excludes=".git/**" />
</copy>-->
<jar destfile="output/${file.mainfile}">
<fileset dir="JarContents" />
</jar><!--
<zip destfile="output/${file.apifile}">
<fileset dir="APIContents" />
</zip>-->
<copy todir="output" file="build.properties" />
<!-- OUTPUT LATEST JAR AND ZIP FILES -->
<jar destfile="${file.main}">
<fileset dir="JarContents" />
</jar><!--
<zip destfile="${file.api}">
<fileset dir="APIContents" />
</zip>-->
</target>
</project>

View file

@ -1,6 +1,8 @@
package resonantinduction;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.ModMetadata;
/**
* @author Calclavia
@ -18,4 +20,9 @@ public class ResonantInduction
public static final String BUILD_VERSION = "@BUILD@";
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVISION_VERSION;
@Instance(ID)
public static ResonantInduction INSTNACE;
@Mod.Metadata(ID)
public static ModMetadata metadata;
}