Commit 2953b2230149bba81a4faa872bf5151e75fb7a9a
1 parent
7b0dcd74
LiteLoader 1.6.4_02 - dev only - update to new build script
Showing
2 changed files
with
49 additions
and
54 deletions
ant/build_liteloader.xml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="tasks/ant-contrib.jar" /> |
5 | 5 | |
6 | 6 | <!-- Versions !!IMPORTANT --> |
7 | - <property name="version" value="1.6.4" /> | |
7 | + <property name="version" value="1.6.4_02" /> | |
8 | 8 | <property name="mcversion" value="1.6.4" /> |
9 | 9 | <property name="author" value="Mumfrey" /> |
10 | 10 | |
... | ... | @@ -18,10 +18,8 @@ |
18 | 18 | <property name="mcp.dir" location="../../.." /> |
19 | 19 | <property name="build" location="${mcp.dir}/build" /> |
20 | 20 | <property name="eclipse" location="${mcp.dir}/eclipse" /> |
21 | - <property name="src" location="${mcp.dir}/src/minecraft" /> | |
22 | 21 | <property name="temp" location="${mcp.dir}/temp" /> |
23 | 22 | <property name="md5.dir" location="${mcp.dir}/md5" /> |
24 | - <property name="mc.src" location="${mcp.dir}/src/mcp" /> | |
25 | 23 | <property name="libs" location="${mcp.dir}/lib" /> |
26 | 24 | |
27 | 25 | <property name="dist.dir" location="${build}/dist" /> |
... | ... | @@ -33,48 +31,34 @@ |
33 | 31 | <target name="findmcp"> |
34 | 32 | <echo level="info" message="Searching for clean MCP source..." /> |
35 | 33 | <condition property="mcpsrc.exists"> |
36 | - <available file="${mc.src}" type="dir"/> | |
34 | + <available file="${mcp.dir}/src/mcp" type="dir"/> | |
37 | 35 | </condition> |
38 | 36 | </target> |
39 | 37 | |
40 | 38 | <!-- Main target --> |
41 | - <target name="rebuild" depends="findmcp" description="Entry point"> | |
42 | - <antcall target="nobuild" /> | |
43 | - <antcall target="build" /> | |
39 | + <target name="rebuild" depends="findmcp, setdirsold, setdirsnew, build" description="Entry point" /> | |
40 | + | |
41 | + <target name="setdirsnew" description="Set the MCP source directories for the new layout" unless="mcpsrc.exists"> | |
42 | + <echo level="info" message="Setting MCP source directories for NEW configuration" /> | |
43 | + <property name="src" location="${build}/src"/> | |
44 | + <property name="mc.src" location="${mcp.dir}/src/minecraft" /> | |
45 | + <echo append="false" file="${temp}/build.cfg" message="[OUTPUT]
SrcClient = build/src" /> | |
44 | 46 | </target> |
45 | 47 | |
46 | - <target name="nobuild" description="Notify the user that they done goofed" unless="mcpsrc.exists"> | |
47 | - <echo level="info" message="--------------------------------------------------------------------------------" /> | |
48 | - <echo level="info" message=" " /> | |
49 | - <echo level="info" message=" #NOPE!" /> | |
50 | - <echo level="info" message=" " /> | |
51 | - <echo level="info" message=" LiteLoader build uses the MCP src/minecraft directory as the target for source" /> | |
52 | - <echo level="info" message=" aggregation so that MCP can be called without modifications. This means that" /> | |
53 | - <echo level="info" message=" before you start you MUST copy the decompiled sources to src/mcp so that the" /> | |
54 | - <echo level="info" message=" LiteLoader build script has a clean base to work from." /> | |
55 | - <echo level="info" message=" " /> | |
56 | - <echo level="info" message=" To rectify this problem and allow the loader to build:" /> | |
57 | - <echo level="info" message=" " /> | |
58 | - <echo level="info" message=" + Run the MCP decompile process so that clean sources end up in src/minecraft" /> | |
59 | - <echo level="info" message=" + RENAME the src/minecraft folder to src/mcp" /> | |
60 | - <echo level="info" message=" + Run this builder again, the builder will create a clean MD5 set for the" /> | |
61 | - <echo level="info" message=" clean sources" /> | |
62 | - <echo level="info" message=" " /> | |
63 | - <echo level="info" message=" If you have already performed the above steps, and it's still not working, then" /> | |
64 | - <echo level="info" message=" it's probably time to learn ant scripting and figure out why." /> | |
65 | - <echo level="info" message=" " /> | |
66 | - <echo level="info" message=" Never give up; never surrender!" /> | |
67 | - <echo level="info" message=" " /> | |
68 | - <echo level="info" message="--------------------------------------------------------------------------------" /> | |
48 | + <target name="setdirsold" description="Set the MCP source directories for the old layout" if="mcpsrc.exists"> | |
49 | + <echo level="warning" message="--------------------------------------------------------------------------------" /> | |
50 | + <echo level="warning" message=" " /> | |
51 | + <echo level="warning" message=" Setting MCP source directories for OLD configuration!" /> | |
52 | + <echo level="warning" message=" " /> | |
53 | + <echo level="warning" message=" Renaming the MCP 'src' directory is no longer required and support for this" /> | |
54 | + <echo level="warning" message=" be removed in a future version." /> | |
55 | + <echo level="warning" message=" " /> | |
56 | + <echo level="warning" message="--------------------------------------------------------------------------------" /> | |
57 | + <property name="src" location="${mcp.dir}/src/minecraft"/> | |
58 | + <property name="mc.src" location="${mcp.dir}/src/mcp" /> | |
69 | 59 | </target> |
70 | 60 | |
71 | - <target name="build" description="Perform all tasks for a build" if="mcpsrc.exists"> | |
72 | - <antcall target="init" /> | |
73 | - <antcall target="recompile" /> | |
74 | - <antcall target="reobfuscate" /> | |
75 | - <antcall target="savemd5" /> | |
76 | - <antcall target="stage" /> | |
77 | - <antcall target="zip" /> | |
61 | + <target name="build" description="Perform all tasks for a build" depends="init, recompile, reobfuscate, savemd5, stage, zip" > | |
78 | 62 | </target> |
79 | 63 | |
80 | 64 | <target name="clean"> |
... | ... | @@ -105,19 +89,26 @@ |
105 | 89 | </copy> |
106 | 90 | </target> |
107 | 91 | |
108 | - <target name="findmd5"> | |
109 | - <echo level="info" message="Searching for existing MD5 sets..." /> | |
92 | + <target name="findmd5dir"> | |
93 | + <echo level="info" message="Searching for existing MD5 directory..." /> | |
110 | 94 | <condition property="md5dir.exists"> |
111 | 95 | <available file="${md5.dir}" type="dir"/> |
112 | 96 | </condition> |
113 | 97 | </target> |
114 | 98 | |
115 | - <target name="seedmd5" depends="findmd5" unless="md5dir.exists"> | |
99 | + <target name="findmd5" depends="findmd5dir"> | |
100 | + <echo level="info" message="Searching for existing MD5 sets..." /> | |
101 | + <condition property="md5set.exists"> | |
102 | + <available file="${md5.dir}/client_${md5set}.md5" type="file"/> | |
103 | + </condition> | |
104 | + </target> | |
105 | + | |
106 | + <target name="seedmd5" depends="findmd5" unless="md5set.exists"> | |
116 | 107 | <echo level="info" message="MD5 sets not found, seeding..." /> |
117 | - <ant target="genmd5" antfile="seed_md5.xml" inheritall="false" /> | |
108 | + <ant target="genmd5" antfile="seed_md5.xml" inheritall="true" /> | |
118 | 109 | </target> |
119 | 110 | |
120 | - <target name="notifymd5ok" depends="findmd5" if="md5dir.exists"> | |
111 | + <target name="notifymd5ok" depends="findmd5" if="md5set.exists"> | |
121 | 112 | <echo level="info" message="MD5 sets already exist, skipping MD5 set seeding" /> |
122 | 113 | </target> |
123 | 114 | |
... | ... | @@ -168,6 +159,8 @@ |
168 | 159 | <exec executable="${python}" dir="${mcp.dir}"> |
169 | 160 | <arg value="runtime/recompile.py" /> |
170 | 161 | <arg value="--client" /> |
162 | + <arg value="--config" /> | |
163 | + <arg value="${temp}/build.cfg" /> | |
171 | 164 | <arg value="%*" /> |
172 | 165 | </exec> |
173 | 166 | </target> |
... | ... | @@ -192,7 +185,9 @@ |
192 | 185 | <echo level="info" message="Staging resources" /> |
193 | 186 | |
194 | 187 | <copy todir="${stage.dir}"> |
195 | - <fileset dir="${mcp.dir}/reobf/minecraft" excludes=".svn/**, *.txt" /> | |
188 | + <fileset dir="${mcp.dir}/reobf/minecraft" excludes=".svn/**, *.txt"> | |
189 | + <exclude name="/*.class" /> | |
190 | + </fileset> | |
196 | 191 | </copy> |
197 | 192 | |
198 | 193 | <foreach list="${upstream}" param="lib" target="contributeresources" /> |
... | ... | @@ -215,9 +210,18 @@ |
215 | 210 | <attribute name="Implementation-Title" value="${ant.project.name}" /> |
216 | 211 | <attribute name="Implementation-Version" value="${version}" /> |
217 | 212 | <attribute name="TweakClass" value="${tweakclass}" /> |
213 | + <attribute name="TweakName" value="LiteLoader" /> | |
214 | + <attribute name="TweakVersion" value="${version}" /> | |
215 | + <attribute name="TweakAuthor" value="${author}" /> | |
218 | 216 | </manifest> |
219 | 217 | <fileset dir="${stage.dir}" /> |
220 | 218 | </jar> |
221 | 219 | </target> |
222 | - | |
220 | + | |
221 | + <property environment="env" /> | |
222 | + | |
223 | + <target name="deploy" depends="rebuild" description="Deploy artifact to local minecraft installation in APPDATA"> | |
224 | + <mkdir dir="${env.APPDATA}/.minecraft/libraries/com/mumfrey/liteloader/1.7.2"/> | |
225 | + <copy todir="${env.APPDATA}/.minecraft/libraries/com/mumfrey/liteloader/1.7.2" file="${dist.dir}/${ant.project.name}-${mcversion}.${filetype}" failonerror="false" overwrite="true" /> | |
226 | + </target> | |
223 | 227 | </project> |
224 | 228 | \ No newline at end of file | ... | ... |
ant/seed_md5.xml
... | ... | @@ -9,15 +9,6 @@ |
9 | 9 | <!-- are missing. If you want to fire this script then delete the 'md5' folder --> |
10 | 10 | <!-- before running the LiteLoader build. --> |
11 | 11 | |
12 | - <property name="outmd5set" value="mcp" /> | |
13 | - <property name="mcp.dir" location="../../.." /> | |
14 | - <property name="src" location="${mcp.dir}/src/minecraft" /> | |
15 | - <property name="temp" location="${mcp.dir}/temp" /> | |
16 | - <property name="md5.dir" location="${mcp.dir}/md5" /> | |
17 | - <property name="mc.src" location="${mcp.dir}/src/mcp" /> | |
18 | - | |
19 | - <property name="python" location="${mcp.dir}/runtime/bin/python/python_mcp.exe" /> | |
20 | - | |
21 | 12 | <target name="genmd5" description="Seed the initial MCP md5 set"> |
22 | 13 | <echo level="info" message="MCP md5set was not found, making a clean compile" /> |
23 | 14 | <antcall target="clean" /> |
... | ... | @@ -67,6 +58,6 @@ |
67 | 58 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> |
68 | 59 | <echo level="info" message="Storing obfuscated MD5s" /> |
69 | 60 | |
70 | - <copy file="${temp}/client_reobf.md5" tofile="${md5.dir}/client_${outmd5set}.md5" overwrite="true" verbose="true" /> | |
61 | + <copy file="${temp}/client_reobf.md5" tofile="${md5.dir}/client_mcp.md5" overwrite="true" verbose="true" /> | |
71 | 62 | </target> |
72 | 63 | </project> |
73 | 64 | \ No newline at end of file | ... | ... |