forked from tcooc/AdditionalPipesBC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
67 lines (58 loc) · 2.27 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<project name="AdditionalPipes" basedir="." default="full">
<property environment="env" />
<property name="src.dir" value="additionalpipes" />
<property name="bc.dir" value="BuildCraft" />
<property name="build.dir" value="${bc.dir}/build/ap" />
<property name="mcp.dir" value="${bc.dir}/build/forge/mcp" />
<property name="jar.dir" value="${bc.dir}/bin/ap" />
<property name="resources.dir" value="resources" />
<!-- build BuildCraft -->
<target name="buildcraft">
<ant antfile="BuildCraft/build.xml" useNativeBasedir="true" inheritAll="false" />
</target>
<target name="clean">
<delete dir="${jar.dir}" />
<delete dir="${build.dir}" />
<delete dir="${mcp.dir}/src/minecraft/buildcraft" />
</target>
<target name="copy-src">
<ant antfile="BuildCraft/build.xml" useNativeBasedir="true" inheritAll="false" target="copy-src" />
<copy todir="${mcp.dir}/src/minecraft/buildcraft/additionalpipes">
<fileset dir="${src.dir}">
<!--exclude name="**/*.png" /-->
</fileset>
<filterset>
<filter token="AP_VERSION" value="${env.AP_VERSION}" />
</filterset>
</copy>
</target>
<target name="compile" depends="copy-src">
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
<arg line="/c recompile.bat" />
</exec>
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
<arg value="recompile.sh" />
</exec>
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate_srg.bat" />
</exec>
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
<arg value="reobfuscate_srg.sh" />
</exec>
</target>
<target name="package" depends="clean, compile">
<mkdir dir="${build.dir}/buildcraft/additionalpipes" />
<copy todir="${build.dir}/buildcraft/additionalpipes">
<fileset dir="${mcp.dir}/reobf/minecraft/buildcraft/additionalpipes" />
</copy>
<copy todir="${build.dir}/buildcraft/additionalpipes/lang">
<fileset dir="${src.dir}/lang" />
</copy>
<copy todir="${build.dir}">
<fileset dir="${resources.dir}" />
</copy>
<replace file="${build.dir}/mcmod.info" token="@AP_VERSION@" value="${env.AP_VERSION}" />
<jar destfile="${jar.dir}/${ant.project.name}${env.AP_VERSION}-BC${env.BC_VERSION}.jar" basedir="${build.dir}" />
</target>
<target name="full" depends="buildcraft, package"></target>
</project>