Fix recipe problem, set up bukkit autobuilding. Fails at the minute for a bukkit mcp update
This commit is contained in:
parent
00d0701166
commit
af36bb2bc0
|
@ -4,3 +4,5 @@ bin/
|
||||||
/target
|
/target
|
||||||
/build.properties
|
/build.properties
|
||||||
/build
|
/build
|
||||||
|
/ironchestversion.properties
|
||||||
|
/tmpbukkit
|
||||||
|
|
|
@ -29,9 +29,10 @@
|
||||||
<target name="writeversion" depends="buildenvsetup">
|
<target name="writeversion" depends="buildenvsetup">
|
||||||
<exec executable="${python.exe}" dir="${basedir}" failonerror="true">
|
<exec executable="${python.exe}" dir="${basedir}" failonerror="true">
|
||||||
<arg value="${basedir}/getversion.py" />
|
<arg value="${basedir}/getversion.py" />
|
||||||
|
<arg value="${mcp.home}" />
|
||||||
</exec>
|
</exec>
|
||||||
<propertyfile file="ironchestversion.properties">
|
<propertyfile file="ironchestversion.properties">
|
||||||
<entry key="ironchest.build.number" type="int" value="${version.build}"/>
|
<entry key="ironchest.build.build.number" type="int" value="${version.build}"/>
|
||||||
</propertyfile>
|
</propertyfile>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -51,10 +52,10 @@
|
||||||
<condition property="python.exe" value="${mcp.home}/runtime/bin/python/python_mcp" else="python">
|
<condition property="python.exe" value="${mcp.home}/runtime/bin/python/python_mcp" else="python">
|
||||||
<os family="Windows" />
|
<os family="Windows" />
|
||||||
</condition>
|
</condition>
|
||||||
<condition property="bukkitporting.dir" value="${env.WORKSPACE}/bukkitportingtools" else="${mcdev.home}/bukkitportingtools">
|
<condition property="bukkitporting.dir" value="${env.WORKSPACE}/bukkitportingtools" else="${dev.home}/bukkitportingtools">
|
||||||
<isset property="env.WORKSPACE" />
|
<isset property="env.WORKSPACE" />
|
||||||
</condition>
|
</condition>
|
||||||
<property name="bukkit.tmpdir" location="${basedir}/build/bukkit" />
|
<property name="bukkit.tmpdir" location="${basedir}/tmpbukkit" />
|
||||||
<property name="bukkit.mcp.srcdir" location="${bukkit.tmpdir}/src" />
|
<property name="bukkit.mcp.srcdir" location="${bukkit.tmpdir}/src" />
|
||||||
<property name="mcp.obfoutput" location="${mcp.home}/reobf" />
|
<property name="mcp.obfoutput" location="${mcp.home}/reobf" />
|
||||||
<property name="client.mcp.obfoutput" location="${mcp.obfoutput}/minecraft" />
|
<property name="client.mcp.obfoutput" location="${mcp.obfoutput}/minecraft" />
|
||||||
|
@ -65,14 +66,9 @@
|
||||||
<property name="common.src.dir" location="${basedir}/common" />
|
<property name="common.src.dir" location="${basedir}/common" />
|
||||||
<property name="client.src.dir" location="${basedir}/client" />
|
<property name="client.src.dir" location="${basedir}/client" />
|
||||||
<property name="server.src.dir" location="${basedir}/server" />
|
<property name="server.src.dir" location="${basedir}/server" />
|
||||||
<property name="deploy.dir" location="${user.home}/.minecraft/mods" />
|
|
||||||
<property name="bukkit.src.dir" location="${server.src.dir}" />
|
<property name="bukkit.src.dir" location="${server.src.dir}" />
|
||||||
|
<property name="deploy.dir" location="${user.home}/.minecraft/mods" />
|
||||||
<property name="resource.dir" location="${basedir}/resources" />
|
<property name="resource.dir" location="${basedir}/resources" />
|
||||||
<property name="bukkitporting.srgtools" location="${bukkitporting.dir}/bin/SrgTools.jar" />
|
|
||||||
<property name="bukkitporting.asm" location="${bukkitporting.dir}/bin/asm-all-3.3.1.jar" />
|
|
||||||
<property name="bukkitporting.translatedjar" location="${bukkitporting.dir}/jar/generated/craftbukkit-1.2.5-R1.1-MCPC-SNAPSHOT-73.MCP.jar" />
|
|
||||||
<property name="bukkitporting.srg" location="${bukkitporting.dir}/mappings/generated/server_mcp_bukkit_1.2.5.srg" />
|
|
||||||
<property name="bukkit.mcp.jar" location="${bukkitporting.translatedjar}" />
|
|
||||||
<condition property="version.build" value="${env.BUILD_NUMBER}" else="1">
|
<condition property="version.build" value="${env.BUILD_NUMBER}" else="1">
|
||||||
<isset property="env.BUILD_NUMBER" />
|
<isset property="env.BUILD_NUMBER" />
|
||||||
</condition>
|
</condition>
|
||||||
|
@ -172,7 +168,7 @@
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="build" depends="merge-client,merge-server,build-client,build-server" />
|
<target name="build" depends="merge-client,merge-server,build-client,build-server,build-bukkit" />
|
||||||
|
|
||||||
<target name="buildandclean" depends="build">
|
<target name="buildandclean" depends="build">
|
||||||
<antcall target="clean" />
|
<antcall target="clean" />
|
||||||
|
@ -192,44 +188,27 @@
|
||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile-bukkit" depends="init">
|
<target name="merge-bukkit" depends="init">
|
||||||
<mkdir dir="${bukkit.tmpdir}" />
|
<mkdir dir="${bukkit.tmpdir}"/>
|
||||||
|
<mkdir dir="${bukkit.mcp.srcdir}"/>
|
||||||
<antcall target="merge-source">
|
<antcall target="merge-source">
|
||||||
<param name="side" value="bukkit" />
|
<param name="side" value="bukkit" />
|
||||||
</antcall>
|
</antcall>
|
||||||
<mkdir dir="${bukkit.tmpdir}/compiled" />
|
|
||||||
<javac target="1.6" source="1.6" destdir="${bukkit.tmpdir}/compiled">
|
|
||||||
<src path="${bukkit.mcp.srcdir}" />
|
|
||||||
<classpath path="${bukkit.mcp.jar}" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="jar-bukkit" depends="init,compile-bukkit">
|
<target name="build-bukkit" depends="init,merge-bukkit">
|
||||||
<jar destfile="${bukkit.tmpdir}/${modname}-bukkit-tmp.jar" basedir="${bukkit.tmpdir}/compiled" />
|
<property name="jarname" value="${basedir}/target/${modname}-bukkit-${version}.jar" />
|
||||||
</target>
|
<path id="bukkit.compile.ref"/>
|
||||||
|
|
||||||
<target name="translate-bukkit" depends="init,jar-bukkit">
|
|
||||||
<mkdir dir="${basedir}/target" />
|
<mkdir dir="${basedir}/target" />
|
||||||
<java classname="nl.hardijzer.fw.applysrg.ApplySrg" failonerror="true" fork="true">
|
<ant dir="${bukkitporting.dir}" target="convert-mcp-to-bukkit">
|
||||||
<classpath>
|
<reference refid="bukkit.compile.ref" />
|
||||||
<pathelement location="${bukkitporting.asm}" />
|
<property name="modname" value="ironchest"/>
|
||||||
<pathelement location="${bukkitporting.srgtools}" />
|
<property name="bukkit.output.jar" value="${jarname}"/>
|
||||||
</classpath>
|
<property name="bukkit.mcp.srcdir" value="${bukkit.mcp.srcdir}"/>
|
||||||
<arg value="--srg" />
|
</ant>
|
||||||
<arg value="${bukkitporting.srg}" />
|
<delete dir="${bukkit.tmpdir}"/>
|
||||||
<arg value="--inheritance" />
|
|
||||||
<arg value="${bukkit.mcp.jar}" />
|
|
||||||
<arg value="--inheritance" />
|
|
||||||
<arg value="${bukkit.tmpdir}/${modname}-bukkit-tmp.jar" />
|
|
||||||
<arg value="--in" />
|
|
||||||
<arg value="${bukkit.tmpdir}/${modname}-bukkit-tmp.jar" />
|
|
||||||
<arg value="--out" />
|
|
||||||
<arg value="${basedir}/target/${modname}-bukkit-${version}.jar" />
|
|
||||||
</java>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="build-bukkit" depends="init,translate-bukkit"/>
|
|
||||||
|
|
||||||
<target name="deploy" depends="init,build-client">
|
<target name="deploy" depends="init,build-client">
|
||||||
<property name="jarname" value="${modname}-client-${version}" />
|
<property name="jarname" value="${modname}-client-${version}" />
|
||||||
<move file="${deploy.dir}/${jarname}.zip" tofile="${deploy.dir}/${jarname}.zip.${timestamp}" failonerror="false" verbose="true" />
|
<move file="${deploy.dir}/${jarname}.zip" tofile="${deploy.dir}/${jarname}.zip.${timestamp}" failonerror="false" verbose="true" />
|
||||||
|
|
|
@ -52,7 +52,7 @@ public enum ChestChangerType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemChestChanger buildItem(Configuration cfg, int id) {
|
public ItemChestChanger buildItem(Configuration cfg, int id) {
|
||||||
int itemId = Integer.parseInt(cfg.getOrCreateIntProperty(itemName, Configuration.CATEGORY_ITEM, id).value);
|
int itemId = cfg.getOrCreateIntProperty(itemName, Configuration.CATEGORY_ITEM, id).getInt(id);
|
||||||
item = new ItemChestChanger(itemId, this);
|
item = new ItemChestChanger(itemId, this);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ public enum IronChestType {
|
||||||
GOLD(81, 9, true, "Gold Chest", "goldchest.png", 1, Arrays.asList("ingotGold"), TileEntityGoldChest.class, "mmmmPmmmm", "mGmG4GmGm"),
|
GOLD(81, 9, true, "Gold Chest", "goldchest.png", 1, Arrays.asList("ingotGold"), TileEntityGoldChest.class, "mmmmPmmmm", "mGmG4GmGm"),
|
||||||
DIAMOND(108, 12, true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"),
|
DIAMOND(108, 12, true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"),
|
||||||
COPPER(45, 9, false, "Copper Chest", "copperchest.png", 3, Arrays.asList("ingotCopper"), TileEntityCopperChest.class, "mmmmCmmmm"),
|
COPPER(45, 9, false, "Copper Chest", "copperchest.png", 3, Arrays.asList("ingotCopper"), TileEntityCopperChest.class, "mmmmCmmmm"),
|
||||||
SILVER(72, 9, false, "Silver Chest", "silverchest.png", 4, Arrays.asList("ingotSilver"), TileEntitySilverChest.class, "mmmm0mmmm", "mGmG3GmGm"),
|
SILVER(72, 9, false, "Silver Chest", "silverchest.png", 4, Arrays.asList("ingotSilver"), TileEntitySilverChest.class, "mmmm3mmmm", "mGmG0GmGm"),
|
||||||
CRYSTAL(108, 12, true, "Crystal Chest", "crystalchest.png", 5, Arrays.asList("blockGlass"), TileEntityCrystalChest.class, "GGGGPGGGG"),
|
CRYSTAL(108, 12, true, "Crystal Chest", "crystalchest.png", 5, Arrays.asList("blockGlass"), TileEntityCrystalChest.class, "GGGGPGGGG"),
|
||||||
WOOD(0,0,false,"","",-1,Arrays.asList("blockPlanks"),null);
|
WOOD(0,0,false,"","",-1,Arrays.asList("blockPlanks"),null);
|
||||||
int size;
|
int size;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest;
|
package cpw.mods.ironchest;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
|
||||||
import cpw.mods.fml.common.ReflectionHelper;
|
import cpw.mods.fml.common.ReflectionHelper;
|
||||||
import net.minecraft.src.EntityPlayer;
|
import net.minecraft.src.EntityPlayer;
|
||||||
import net.minecraft.src.Item;
|
import net.minecraft.src.Item;
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class mod_IronChest extends NetworkMod {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load() {
|
public void load() {
|
||||||
MinecraftForge.versionDetect("IronChest", 3, 3, 7);
|
MinecraftForge.versionDetect("IronChest", 3, 3, 8);
|
||||||
ModContainer fml=ModLoaderModContainer.findContainerFor(this);
|
ModContainer fml=ModLoaderModContainer.findContainerFor(this);
|
||||||
if (fml.getMetadata()!=null) {
|
if (fml.getMetadata()!=null) {
|
||||||
fml.getMetadata().version=Version.fullVersionString();
|
fml.getMetadata().version=Version.fullVersionString();
|
||||||
|
@ -47,9 +47,9 @@ public class mod_IronChest extends NetworkMod {
|
||||||
Configuration cfg = new Configuration(cfgFile);
|
Configuration cfg = new Configuration(cfgFile);
|
||||||
try {
|
try {
|
||||||
cfg.load();
|
cfg.load();
|
||||||
int bId = cfg.getOrCreateBlockIdProperty("ironChests", 502).getInt(502);
|
int bId = cfg.getOrCreateBlockIdProperty("ironChests", 181).getInt(181);
|
||||||
ironChestBlock = new BlockIronChest(bId);
|
ironChestBlock = new BlockIronChest(bId);
|
||||||
ChestChangerType.buildItems(cfg, 19501);
|
ChestChangerType.buildItems(cfg, 29501);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ModLoader.getLogger().severe("IronChest was unable to load it's configuration successfully");
|
ModLoader.getLogger().severe("IronChest was unable to load it's configuration successfully");
|
||||||
e.printStackTrace(System.err);
|
e.printStackTrace(System.err);
|
||||||
|
|
|
@ -5,6 +5,15 @@ import fnmatch
|
||||||
import re
|
import re
|
||||||
import subprocess, shlex
|
import subprocess, shlex
|
||||||
|
|
||||||
|
mcp_home = sys.argv[1]
|
||||||
|
mcp_dir = os.path.abspath(mcp_home)
|
||||||
|
|
||||||
|
print(mcp_dir)
|
||||||
|
sys.path.append(mcp_dir)
|
||||||
|
|
||||||
|
from runtime.commands import Commands
|
||||||
|
Commands._version_config = os.path.join(mcp_dir,Commands._version_config)
|
||||||
|
|
||||||
def cmdsplit(args):
|
def cmdsplit(args):
|
||||||
if os.sep == '\\':
|
if os.sep == '\\':
|
||||||
args = args.replace('\\', '\\\\')
|
args = args.replace('\\', '\\\\')
|
||||||
|
@ -35,12 +44,19 @@ def main():
|
||||||
print("Git not found")
|
print("Git not found")
|
||||||
vers="v1.0-0-deadbeef"
|
vers="v1.0-0-deadbeef"
|
||||||
(major,minor,rev,githash)=re.match("v(\d+).(\d+)-(\d+)-(.*)",vers).groups()
|
(major,minor,rev,githash)=re.match("v(\d+).(\d+)-(\d+)-(.*)",vers).groups()
|
||||||
|
|
||||||
|
(mcpversion,mcclientversion,mcserverversion) = re.match("[.\w]+ \(data: ([.\w]+), client: ([.\w.]+), server: ([.\w.]+)\)",Commands.fullversion()).groups()
|
||||||
|
|
||||||
with open("ironchestversion.properties","w") as f:
|
with open("ironchestversion.properties","w") as f:
|
||||||
f.write("%s=%s\n" %("ironchest.build.major.number",major))
|
f.write("%s=%s\n" %("ironchest.build.major.number",major))
|
||||||
f.write("%s=%s\n" %("ironchest.build.minor.number",minor))
|
f.write("%s=%s\n" %("ironchest.build.minor.number",minor))
|
||||||
f.write("%s=%s\n" %("ironchest.build.revision.number",rev))
|
f.write("%s=%s\n" %("ironchest.build.revision.number",rev))
|
||||||
f.write("%s=%s\n" %("ironchest.build.githash",githash))
|
f.write("%s=%s\n" %("ironchest.build.githash",githash))
|
||||||
f.write("%s=%s\n" %("ironchest.build.mcversion","1.2.5"))
|
f.write("%s=%s\n" %("ironchest.build.mcpversion",mcpversion))
|
||||||
|
f.write("%s=%s\n" %("ironchest.build.mcclientversion",mcclientversion))
|
||||||
|
f.write("%s=%s\n" %("ironchest.build.mcserverversion",mcserverversion))
|
||||||
|
|
||||||
|
print("Version information: IronChest %s.%s.%s using MCP %s for c:%s, s:%s" % (major, minor, rev, mcpversion, mcclientversion, mcserverversion))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue