forked from pahimar/Equivalent-Exchange-3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
125 lines (107 loc) · 6.08 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0" ?>
<project name="Equivalent Exchange 3">
<property file="build.properties" />
<target name="clean">
<delete file="${dir.development}\mcp\src\minecraft\mod_EE3.info" />
<delete file="${dir.development}\mcp\src\minecraft\net\minecraft\src\mod_EE3.java" />
<delete dir="${dir.development}\mcp\src\minecraft\ee3" />
<delete dir="${dir.development}\mcp\src\minecraft\codechicken" />
<delete file="${dir.development}\mcp\src\minecraft_server\mod_EE3.info" />
<delete file="${dir.development}\mcp\src\minecraft_server\net\minecraft\src\mod_EE3.java" />
<delete file="${dir.development}\mcp\src\minecraft_server\net\minecraft\src\EnumRarity.java" />
<delete dir="${dir.development}\mcp\src\minecraft_server\ee3" />
</target>
<target name="integrate-nei">
<copy todir="${dir.development}\mcp\src\minecraft" overwrite="true">
<fileset dir="${dir.development}\source\CodeChickenCore\Client\" />
<fileset dir="${dir.development}\source\CodeChickenCore\Common\" />
</copy>
<copy todir="${dir.development}\mcp\src\minecraft_server" overwrite="true">
<fileset dir="${dir.development}\source\CodeChickenCore\Server\" />
<fileset dir="${dir.development}\source\CodeChickenCore\Common\" />
</copy>
<copy todir="${dir.development}\mcp\src\minecraft" overwrite="true">
<fileset dir="${dir.development}\source\NEI\Client\" />
<fileset dir="${dir.development}\source\NEI\Common\" />
</copy>
<copy todir="${dir.development}\mcp\src\minecraft_server" overwrite="true">
<fileset dir="${dir.development}\source\NEI\Server\" />
<fileset dir="${dir.development}\source\NEI\Common\" />
</copy>
</target>
<target name="build">
<copy todir="${dir.development}\mcp\src\minecraft">
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\ee3_client\" />
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\ee3_common\" />
</copy>
<copy todir="${dir.development}\mcp\src\minecraft_server">
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\ee3_common\" />
</copy>
</target>
<target name="recompile">
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 7">
<arg line="/c recompile.bat" />
</exec>
<exec dir="${dir.development}\mcp" executable="bash" os="Linux">
<arg line="recompile.sh" />
</exec>
</target>
<target name="reobfuscate">
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 7">
<arg line="/c reobfuscate.bat" />
</exec>
<exec dir="${dir.development}\mcp" executable="bash" os="Linux">
<arg line="reobfuscate.sh" />
</exec>
</target>
<target name="release-beta">
<!-- Prep for the release -->
<antcall target="clean" />
<antcall target="build" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<!-- Update the mod_*.info file for release -->
<copy file="${dir.development}\source\Equivalent-Exchange-3\ee3_common\mod_EE3.info" todir="${dir.development}\releases\" />
<move file="${dir.development}\releases\mod_EE3.info" tofile="${dir.development}\releases\mcmod.info" />
<!-- Build the jar -->
<jar destfile="${dir.development}\releases\ee3-client-v${release.mod.version}.jar">
<fileset dir="${dir.development}\releases\" includes="mcmod.info" />
<fileset dir="${dir.development}\mcp\reobf\minecraft" />
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\resources" />
</jar>
<jar destfile="${dir.development}\releases\ee3-server-v${release.mod.version}.jar" basedir="${dir.development}\mcp\reobf\minecraft_server" />
<!-- Put a copy in my Beta DB share -->
<mkdir dir="${dir.beta}\${release.minecraft.version}\${release.mod.version}" />
<move file="${dir.development}\releases\ee3-client-v${release.mod.version}.jar" todir="${dir.beta}\${release.minecraft.version}\${release.mod.version}" />
<move file="${dir.development}\releases\ee3-server-v${release.mod.version}.jar" todir="${dir.beta}\${release.minecraft.version}\${release.mod.version}" />
<!-- Clean up the MCP source now that we are done -->
<antcall target="clean" />
</target>
<target name="release-final">
<!-- Prep for the release -->
<antcall target="clean" />
<antcall target="build" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<!-- Update the mod_*.info file for release -->
<copy file="${dir.development}\source\Equivalent-Exchange-3\ee3_common\mod_EE3.info" todir="${dir.development}\releases\" />
<move file="${dir.development}\releases\mod_EE3.info" tofile="${dir.development}\releases\mcmod.info" />
<!-- Build the jar -->
<jar destfile="${dir.development}\releases\ee3-client-v${release.mod.version}.jar">
<fileset dir="${dir.development}\releases\" includes="mcmod.info" />
<fileset dir="${dir.development}\mcp\reobf\minecraft" />
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\resources" />
</jar>
<jar destfile="${dir.development}\releases\ee3-server-v${release.mod.version}.jar" basedir="${dir.development}\mcp\reobf\minecraft_server" />
<!-- Put a copy in Sengir's DB share -->
<mkdir dir="${dir.share}\${release.minecraft.version}\${release.mod.version}" />
<copy file="${dir.development}\releases\ee3-client-v${release.mod.version}.jar" todir="${dir.share}\${release.minecraft.version}\${release.mod.version}" />
<copy file="${dir.development}\releases\ee3-server-v${release.mod.version}.jar" todir="${dir.share}\${release.minecraft.version}\${release.mod.version}" />
<!-- Put a copy in my public DB share -->
<mkdir dir="${dir.release}\${release.minecraft.version}\${release.mod.version}" />
<copy file="${dir.development}\releases\ee3-client-v${release.mod.version}.jar" todir="${dir.release}\${release.minecraft.version}\${release.mod.version}" />
<copy file="${dir.development}\releases\ee3-server-v${release.mod.version}.jar" todir="${dir.release}\${release.minecraft.version}\${release.mod.version}" />
<!-- Clean up the MCP source now that we are done -->
<antcall target="clean" />
</target>
</project>