seed_md5.xml
2.2 KB
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
<?xml version="1.0" encoding="UTF-8" ?>
<project name="mcp" basedir="." default="genmd5">
<!-- ========================================================================== -->
<!-- DO NOT RUN THIS SCRIPT DIRECTLY -->
<!-- ========================================================================== -->
<!-- This script is called by the LiteLoader build script if the initial MD5s -->
<!-- are missing. If you want to fire this script then delete the 'md5' folder -->
<!-- before running the LiteLoader build. -->
<target name="genmd5" description="Seed the initial MCP md5 set">
<echo level="info" message="MCP md5set was not found, making a clean compile" />
<antcall target="clean" />
<antcall target="init" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<antcall target="savemd5" />
</target>
<target name="clean">
<echo level="info" message="Cleaning output directories" />
<delete dir="${src}" />
<delete dir="${mcp.dir}/reobf" />
</target>
<target name="init" description="Initialize environment">
<echo level="info" message="Initialising environment" />
<mkdir dir="${md5.dir}" />
<copy todir="${src}" verbose="false" overwrite="true">
<fileset dir="${mc.src}" />
</copy>
</target>
<target name="recompile" description="MCP recompile">
<echo level="info" message="Compiling MCP sources" />
<exec executable="${python}" dir="${mcp.dir}">
<arg value="runtime/recompile.py" />
<arg value="--client" />
<arg value="%*" />
</exec>
</target>
<target name="reobfuscate" description="MCP reobfuscate">
<echo level="info" message="Obfuscating classes" />
<exec executable="${python}" dir="${mcp.dir}">
<arg value="runtime/reobfuscate.py" />
<arg value="--client" />
<arg value="%*" />
</exec>
</target>
<target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set">
<echo level="info" message="Storing obfuscated MD5s" />
<copy file="${temp}/client_reobf.md5" tofile="${md5.dir}/client_mcp.md5" overwrite="true" verbose="true" />
</target>
</project>