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,7 +4,7 @@ | ||
| 4 | <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="tasks/ant-contrib.jar" /> | 4 | <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="tasks/ant-contrib.jar" /> |
| 5 | 5 | ||
| 6 | <!-- Versions !!IMPORTANT --> | 6 | <!-- Versions !!IMPORTANT --> |
| 7 | - <property name="version" value="1.6.4" /> | 7 | + <property name="version" value="1.6.4_02" /> |
| 8 | <property name="mcversion" value="1.6.4" /> | 8 | <property name="mcversion" value="1.6.4" /> |
| 9 | <property name="author" value="Mumfrey" /> | 9 | <property name="author" value="Mumfrey" /> |
| 10 | 10 | ||
| @@ -18,10 +18,8 @@ | @@ -18,10 +18,8 @@ | ||
| 18 | <property name="mcp.dir" location="../../.." /> | 18 | <property name="mcp.dir" location="../../.." /> |
| 19 | <property name="build" location="${mcp.dir}/build" /> | 19 | <property name="build" location="${mcp.dir}/build" /> |
| 20 | <property name="eclipse" location="${mcp.dir}/eclipse" /> | 20 | <property name="eclipse" location="${mcp.dir}/eclipse" /> |
| 21 | - <property name="src" location="${mcp.dir}/src/minecraft" /> | ||
| 22 | <property name="temp" location="${mcp.dir}/temp" /> | 21 | <property name="temp" location="${mcp.dir}/temp" /> |
| 23 | <property name="md5.dir" location="${mcp.dir}/md5" /> | 22 | <property name="md5.dir" location="${mcp.dir}/md5" /> |
| 24 | - <property name="mc.src" location="${mcp.dir}/src/mcp" /> | ||
| 25 | <property name="libs" location="${mcp.dir}/lib" /> | 23 | <property name="libs" location="${mcp.dir}/lib" /> |
| 26 | 24 | ||
| 27 | <property name="dist.dir" location="${build}/dist" /> | 25 | <property name="dist.dir" location="${build}/dist" /> |
| @@ -33,48 +31,34 @@ | @@ -33,48 +31,34 @@ | ||
| 33 | <target name="findmcp"> | 31 | <target name="findmcp"> |
| 34 | <echo level="info" message="Searching for clean MCP source..." /> | 32 | <echo level="info" message="Searching for clean MCP source..." /> |
| 35 | <condition property="mcpsrc.exists"> | 33 | <condition property="mcpsrc.exists"> |
| 36 | - <available file="${mc.src}" type="dir"/> | 34 | + <available file="${mcp.dir}/src/mcp" type="dir"/> |
| 37 | </condition> | 35 | </condition> |
| 38 | </target> | 36 | </target> |
| 39 | 37 | ||
| 40 | <!-- Main target --> | 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 | </target> | 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 | </target> | 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 | </target> | 62 | </target> |
| 79 | 63 | ||
| 80 | <target name="clean"> | 64 | <target name="clean"> |
| @@ -105,19 +89,26 @@ | @@ -105,19 +89,26 @@ | ||
| 105 | </copy> | 89 | </copy> |
| 106 | </target> | 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 | <condition property="md5dir.exists"> | 94 | <condition property="md5dir.exists"> |
| 111 | <available file="${md5.dir}" type="dir"/> | 95 | <available file="${md5.dir}" type="dir"/> |
| 112 | </condition> | 96 | </condition> |
| 113 | </target> | 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 | <echo level="info" message="MD5 sets not found, seeding..." /> | 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 | </target> | 109 | </target> |
| 119 | 110 | ||
| 120 | - <target name="notifymd5ok" depends="findmd5" if="md5dir.exists"> | 111 | + <target name="notifymd5ok" depends="findmd5" if="md5set.exists"> |
| 121 | <echo level="info" message="MD5 sets already exist, skipping MD5 set seeding" /> | 112 | <echo level="info" message="MD5 sets already exist, skipping MD5 set seeding" /> |
| 122 | </target> | 113 | </target> |
| 123 | 114 | ||
| @@ -168,6 +159,8 @@ | @@ -168,6 +159,8 @@ | ||
| 168 | <exec executable="${python}" dir="${mcp.dir}"> | 159 | <exec executable="${python}" dir="${mcp.dir}"> |
| 169 | <arg value="runtime/recompile.py" /> | 160 | <arg value="runtime/recompile.py" /> |
| 170 | <arg value="--client" /> | 161 | <arg value="--client" /> |
| 162 | + <arg value="--config" /> | ||
| 163 | + <arg value="${temp}/build.cfg" /> | ||
| 171 | <arg value="%*" /> | 164 | <arg value="%*" /> |
| 172 | </exec> | 165 | </exec> |
| 173 | </target> | 166 | </target> |
| @@ -192,7 +185,9 @@ | @@ -192,7 +185,9 @@ | ||
| 192 | <echo level="info" message="Staging resources" /> | 185 | <echo level="info" message="Staging resources" /> |
| 193 | 186 | ||
| 194 | <copy todir="${stage.dir}"> | 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 | </copy> | 191 | </copy> |
| 197 | 192 | ||
| 198 | <foreach list="${upstream}" param="lib" target="contributeresources" /> | 193 | <foreach list="${upstream}" param="lib" target="contributeresources" /> |
| @@ -215,9 +210,18 @@ | @@ -215,9 +210,18 @@ | ||
| 215 | <attribute name="Implementation-Title" value="${ant.project.name}" /> | 210 | <attribute name="Implementation-Title" value="${ant.project.name}" /> |
| 216 | <attribute name="Implementation-Version" value="${version}" /> | 211 | <attribute name="Implementation-Version" value="${version}" /> |
| 217 | <attribute name="TweakClass" value="${tweakclass}" /> | 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 | </manifest> | 216 | </manifest> |
| 219 | <fileset dir="${stage.dir}" /> | 217 | <fileset dir="${stage.dir}" /> |
| 220 | </jar> | 218 | </jar> |
| 221 | </target> | 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 | </project> | 227 | </project> |
| 224 | \ No newline at end of file | 228 | \ No newline at end of file |
ant/seed_md5.xml
| @@ -9,15 +9,6 @@ | @@ -9,15 +9,6 @@ | ||
| 9 | <!-- are missing. If you want to fire this script then delete the 'md5' folder --> | 9 | <!-- are missing. If you want to fire this script then delete the 'md5' folder --> |
| 10 | <!-- before running the LiteLoader build. --> | 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 | <target name="genmd5" description="Seed the initial MCP md5 set"> | 12 | <target name="genmd5" description="Seed the initial MCP md5 set"> |
| 22 | <echo level="info" message="MCP md5set was not found, making a clean compile" /> | 13 | <echo level="info" message="MCP md5set was not found, making a clean compile" /> |
| 23 | <antcall target="clean" /> | 14 | <antcall target="clean" /> |
| @@ -67,6 +58,6 @@ | @@ -67,6 +58,6 @@ | ||
| 67 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> | 58 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> |
| 68 | <echo level="info" message="Storing obfuscated MD5s" /> | 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 | </target> | 62 | </target> |
| 72 | </project> | 63 | </project> |
| 73 | \ No newline at end of file | 64 | \ No newline at end of file |