Commit 3db66fd390ff32abd027a5db2518c2a0ac70eff2
1 parent
5ef9d5d7
add linux support to build scripts
Showing
2 changed files
with
41 additions
and
8 deletions
ant/build_liteloader.xml
| ... | ... | @@ -26,8 +26,9 @@ |
| 26 | 26 | <property name="stage.dir" location="${build}/stage/${ant.project.name}/${version}" /> |
| 27 | 27 | <property name="filetype" value="jar" /> |
| 28 | 28 | |
| 29 | - <property name="python" location="${mcp.dir}/runtime/bin/python/python_mcp.exe" /> | |
| 30 | - | |
| 29 | + <property name="python_windows" location="${mcp.dir}/runtime/bin/python/python_mcp.exe" /> | |
| 30 | + <property name="python_linux" location="/usr/bin/python" /> | |
| 31 | + | |
| 31 | 32 | <target name="findmcp"> |
| 32 | 33 | <echo level="info" message="Searching for clean MCP source..." /> |
| 33 | 34 | <condition property="mcpsrc.exists"> |
| ... | ... | @@ -173,7 +174,15 @@ |
| 173 | 174 | <target name="recompile" description="MCP recompile"> |
| 174 | 175 | <echo level="info" message="Compiling projects" /> |
| 175 | 176 | |
| 176 | - <exec executable="${python}" dir="${mcp.dir}"> | |
| 177 | + <exec executable="${python_windows}" dir="${mcp.dir}" osfamily="windows"> | |
| 178 | + <arg value="runtime/recompile.py" /> | |
| 179 | + <arg value="--client" /> | |
| 180 | + <arg value="--config" /> | |
| 181 | + <arg value="${temp}/build.cfg" /> | |
| 182 | + <arg value="%*" /> | |
| 183 | + </exec> | |
| 184 | + | |
| 185 | + <exec executable="${python_linux}" dir="${mcp.dir}" osfamily="unix"> | |
| 177 | 186 | <arg value="runtime/recompile.py" /> |
| 178 | 187 | <arg value="--client" /> |
| 179 | 188 | <arg value="--config" /> |
| ... | ... | @@ -185,11 +194,19 @@ |
| 185 | 194 | <target name="reobfuscate" description="MCP reobfuscate"> |
| 186 | 195 | <echo level="info" message="Obfuscating classes" /> |
| 187 | 196 | |
| 188 | - <exec executable="${python}" dir="${mcp.dir}"> | |
| 197 | + <exec executable="${python_windows}" dir="${mcp.dir}" osfamily="windows"> | |
| 189 | 198 | <arg value="runtime/reobfuscate.py" /> |
| 190 | 199 | <arg value="--client" /> |
| 191 | 200 | <arg value="%*" /> |
| 192 | 201 | </exec> |
| 202 | + | |
| 203 | + <exec executable="${python_linux}" dir="${mcp.dir}" osfamily="unix"> | |
| 204 | + <arg value="runtime/reobfuscate.py" /> | |
| 205 | + <arg value="--client" /> | |
| 206 | + <arg value="%*" /> | |
| 207 | + </exec> | |
| 208 | + | |
| 209 | + | |
| 193 | 210 | </target> |
| 194 | 211 | |
| 195 | 212 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> |
| ... | ... | @@ -201,9 +218,11 @@ |
| 201 | 218 | <target name="stage" description="Stage resources into staging directory"> |
| 202 | 219 | <echo level="info" message="Staging resources" /> |
| 203 | 220 | |
| 204 | - <copy todir="${stage.dir}"> | |
| 221 | + <copy todir="${stage.dir}" overwrite="true"> | |
| 205 | 222 | <fileset dir="${mcp.dir}/reobf/minecraft" excludes=".svn/**, *.txt"> |
| 206 | - <exclude name="/*.class" /> | |
| 223 | + <exclude name="?.class" /> | |
| 224 | + <exclude name="??.class" /> | |
| 225 | + <exclude name="???.class" /> | |
| 207 | 226 | <exclude name="/com/mumfrey/liteloader/core/gen/**" /> |
| 208 | 227 | </fileset> |
| 209 | 228 | </copy> | ... | ... |
ant/seed_md5.xml
| ... | ... | @@ -38,21 +38,35 @@ |
| 38 | 38 | <target name="recompile" description="MCP recompile"> |
| 39 | 39 | <echo level="info" message="Compiling MCP sources" /> |
| 40 | 40 | |
| 41 | - <exec executable="${python}" dir="${mcp.dir}"> | |
| 41 | + <exec executable="${python_windows}" dir="${mcp.dir}" osfamily="windows"> | |
| 42 | 42 | <arg value="runtime/recompile.py" /> |
| 43 | 43 | <arg value="--client" /> |
| 44 | 44 | <arg value="%*" /> |
| 45 | 45 | </exec> |
| 46 | + | |
| 47 | + <exec executable="${python_linux}" dir="${mcp.dir}" osfamily="unix"> | |
| 48 | + <arg value="runtime/recompile.py" /> | |
| 49 | + <arg value="--client" /> | |
| 50 | + <arg value="%*" /> | |
| 51 | + </exec> | |
| 52 | + | |
| 46 | 53 | </target> |
| 47 | 54 | |
| 48 | 55 | <target name="reobfuscate" description="MCP reobfuscate"> |
| 49 | 56 | <echo level="info" message="Obfuscating classes" /> |
| 50 | 57 | |
| 51 | - <exec executable="${python}" dir="${mcp.dir}"> | |
| 58 | + <exec executable="${python_windows}" dir="${mcp.dir}" osfamily="windows"> | |
| 52 | 59 | <arg value="runtime/reobfuscate.py" /> |
| 53 | 60 | <arg value="--client" /> |
| 54 | 61 | <arg value="%*" /> |
| 55 | 62 | </exec> |
| 63 | + | |
| 64 | + <exec executable="${python_linux}" dir="${mcp.dir}" osfamily="unix"> | |
| 65 | + <arg value="runtime/reobfuscate.py" /> | |
| 66 | + <arg value="--client" /> | |
| 67 | + <arg value="%*" /> | |
| 68 | + </exec> | |
| 69 | + | |
| 56 | 70 | </target> |
| 57 | 71 | |
| 58 | 72 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> | ... | ... |