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,8 +26,9 @@ | ||
26 | <property name="stage.dir" location="${build}/stage/${ant.project.name}/${version}" /> | 26 | <property name="stage.dir" location="${build}/stage/${ant.project.name}/${version}" /> |
27 | <property name="filetype" value="jar" /> | 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 | <target name="findmcp"> | 32 | <target name="findmcp"> |
32 | <echo level="info" message="Searching for clean MCP source..." /> | 33 | <echo level="info" message="Searching for clean MCP source..." /> |
33 | <condition property="mcpsrc.exists"> | 34 | <condition property="mcpsrc.exists"> |
@@ -173,7 +174,15 @@ | @@ -173,7 +174,15 @@ | ||
173 | <target name="recompile" description="MCP recompile"> | 174 | <target name="recompile" description="MCP recompile"> |
174 | <echo level="info" message="Compiling projects" /> | 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 | <arg value="runtime/recompile.py" /> | 186 | <arg value="runtime/recompile.py" /> |
178 | <arg value="--client" /> | 187 | <arg value="--client" /> |
179 | <arg value="--config" /> | 188 | <arg value="--config" /> |
@@ -185,11 +194,19 @@ | @@ -185,11 +194,19 @@ | ||
185 | <target name="reobfuscate" description="MCP reobfuscate"> | 194 | <target name="reobfuscate" description="MCP reobfuscate"> |
186 | <echo level="info" message="Obfuscating classes" /> | 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 | <arg value="runtime/reobfuscate.py" /> | 198 | <arg value="runtime/reobfuscate.py" /> |
190 | <arg value="--client" /> | 199 | <arg value="--client" /> |
191 | <arg value="%*" /> | 200 | <arg value="%*" /> |
192 | </exec> | 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 | </target> | 210 | </target> |
194 | 211 | ||
195 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> | 212 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> |
@@ -201,9 +218,11 @@ | @@ -201,9 +218,11 @@ | ||
201 | <target name="stage" description="Stage resources into staging directory"> | 218 | <target name="stage" description="Stage resources into staging directory"> |
202 | <echo level="info" message="Staging resources" /> | 219 | <echo level="info" message="Staging resources" /> |
203 | 220 | ||
204 | - <copy todir="${stage.dir}"> | 221 | + <copy todir="${stage.dir}" overwrite="true"> |
205 | <fileset dir="${mcp.dir}/reobf/minecraft" excludes=".svn/**, *.txt"> | 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 | <exclude name="/com/mumfrey/liteloader/core/gen/**" /> | 226 | <exclude name="/com/mumfrey/liteloader/core/gen/**" /> |
208 | </fileset> | 227 | </fileset> |
209 | </copy> | 228 | </copy> |
ant/seed_md5.xml
@@ -38,21 +38,35 @@ | @@ -38,21 +38,35 @@ | ||
38 | <target name="recompile" description="MCP recompile"> | 38 | <target name="recompile" description="MCP recompile"> |
39 | <echo level="info" message="Compiling MCP sources" /> | 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 | <arg value="runtime/recompile.py" /> | 42 | <arg value="runtime/recompile.py" /> |
43 | <arg value="--client" /> | 43 | <arg value="--client" /> |
44 | <arg value="%*" /> | 44 | <arg value="%*" /> |
45 | </exec> | 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 | </target> | 53 | </target> |
47 | 54 | ||
48 | <target name="reobfuscate" description="MCP reobfuscate"> | 55 | <target name="reobfuscate" description="MCP reobfuscate"> |
49 | <echo level="info" message="Obfuscating classes" /> | 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 | <arg value="runtime/reobfuscate.py" /> | 59 | <arg value="runtime/reobfuscate.py" /> |
53 | <arg value="--client" /> | 60 | <arg value="--client" /> |
54 | <arg value="%*" /> | 61 | <arg value="%*" /> |
55 | </exec> | 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 | </target> | 70 | </target> |
57 | 71 | ||
58 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> | 72 | <target name="savemd5" description="Put post-obfuscation MD5 to stored md5 set" if="outmd5set"> |