-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
73 lines (61 loc) · 2.39 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
<!-- nallar's BuildCraft ant build script edited for mcstudent -->
<project name="mcstudent" default="main">
<!-- Properties -->
<property name="mods.dir" value="/home/jsprague/projects/minecraft_mods" />
<property name="project.dir" value="${mods.dir}/mcstudent" />
<property name="git.dir" value="${project.dir}/git/mcstudent" />
<property name="dist.dir" value="${project.dir}/dist" />
<property name="forge.dir" value="${project.dir}/forge" />
<property name="mcp.dir" value="${forge.dir}/mcp" />
<property name="mcpsrc.dir" value="${mcp.dir}/src/minecraft" />
<property name="projectclasses.dir" value="${mcp.dir}/reobf/minecraft" />
<property name="mc.version" value="1.6.2" />
<property name="mod.version" value="Beta-0.5" />
<property name="mod.name" value="Minecraft-Student" />
<property name="minecraft.dir" value="/home/jsprague/.minecraft" />
<property name="dist.file" value="${mod.name}-${mod.version}-${mc.version}.zip" />
<!-- Targets -->
<target name="props">
<echo message="${mcp.dir}" />
</target>
<!-- Clear project.directory -->
<target name="clean">
<delete dir="${dist.dir}" />
</target>
<!-- Set full version -->
<target name="initialize-version">
<echo message="Starting build for ${dist.file}}" />
</target>
<target name="compile" depends="initialize-version">
<!-- Recompile -->
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
<arg value="recompile.sh" />
</exec>
<!-- Reobfuscate -->
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
<arg value="reobfuscate.sh" />
</exec>
</target>
<target name="copy">
<copy todir="${dist.dir}/com/caramelcode">
<fileset dir="${projectclasses.dir}/com/caramelcode" />
</copy>
<copy todir="${dist.dir}/org/supercsv">
<fileset dir="${projectclasses.dir}/org/supercsv" />
</copy>
<copy todir="${dist.dir}/assets">
<fileset dir="${git.dir}/assets" />
</copy>
<copy file="${git.dir}/mcmod.info" todir="${dist.dir}"/>
<copy file="${git.dir}/README.md" todir="${dist.dir}"/>
</target>
<!-- Package the compiled files -->
<target name="package" depends="clean,compile,copy">
<zip destfile="${dist.dir}/${dist.file}" basedir="${dist.dir}" />
</target>
<!-- Default target to run -->
<target name="main" depends="package" />
<target name="deploy" depends="package">
<copy file="${dist.dir}/${dist.file}" todir="${minecraft.dir}/mods"/>
</target>
</project>