Updated scripts so that we use Fernflower now. Added a small python script to download fernflower for the user. And the scripts exit out if it fails.
This commit is contained in:
parent
cdbf0b21e7
commit
a7c0026022
10 changed files with 104 additions and 22 deletions
39
.gitignore
vendored
Normal file
39
.gitignore
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/bin/
|
||||
/conf/
|
||||
/docs/
|
||||
/eclipse/
|
||||
/jars/
|
||||
/lib/
|
||||
/logs/
|
||||
/reobf/
|
||||
/runtime/
|
||||
/src/
|
||||
/temp/
|
||||
/CHANGELOG
|
||||
/LICENSE
|
||||
/cleanup.bat
|
||||
/cleanup.sh
|
||||
/decompile.bat
|
||||
/decompile.sh
|
||||
/getmodsource.bat
|
||||
/getmodsource.sh
|
||||
/recompile.bat
|
||||
/recompile.sh
|
||||
/reobfuscate.bat
|
||||
/reobfuscate.sh
|
||||
/startclient.bat
|
||||
/startclient.sh
|
||||
/startserver.bat
|
||||
/startserver.sh
|
||||
/updatemcp.bat
|
||||
/updatemcp.sh
|
||||
/updatemd5.bat
|
||||
/updatemd5.sh
|
||||
/updatenames.bat
|
||||
/updatenames.sh
|
||||
/src_base/
|
||||
/src_work/
|
||||
/getchangedsrc.bat
|
||||
/getchangedsrc.sh
|
||||
/reformat.bat
|
||||
/reformat.sh
|
1
forge/.gitignore
vendored
Normal file
1
forge/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/*.zip
|
|
@ -8,4 +8,5 @@ public @interface MLProp {
|
|||
String info() default "";
|
||||
double min() default Double.NEGATIVE_INFINITY;
|
||||
double max() default Double.POSITIVE_INFINITY;
|
||||
public int reobf() default 0;
|
||||
}
|
10
forge/download_fernflower.py
Normal file
10
forge/download_fernflower.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
import urllib
|
||||
import zipfile
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
urllib.urlretrieve("http://goo.gl/PnJHp", './fernflower.zip')
|
||||
zf = zipfile.ZipFile('fernflower.zip')
|
||||
zf.extract('fernflower.jar', '../runtime/bin')
|
||||
except:
|
||||
print "Downloading Fernflower failed download manually from http://goo.gl/PnJHp"
|
|
@ -7,6 +7,9 @@ extracted files.
|
|||
You should use freshly downloaded jars, solely including ModLoader &
|
||||
ModLoaderMP. Anything else can eventually cause conflicts.
|
||||
|
||||
You also need to install the FernFlower decompiler, you can download it at
|
||||
http://goo.gl/PnJHp. Extract fernflower.jar into your MCP's runtime/bin folder.
|
||||
|
||||
Now just start the install.cmd/.sh, MCForge will install itself into the proper
|
||||
locations and copy all needed files, as well as modifying the needed baseclasses.
|
||||
|
||||
|
|
|
@ -5,12 +5,20 @@ echo:
|
|||
|
||||
@set PATH=%PATH%;%SystemDir%\system32;%SystemRoot%\System32
|
||||
|
||||
if not exist "..\runtime\bin\fernflower.jar" (
|
||||
..\runtime\bin\python\python_mcp download_fernflower.py
|
||||
)
|
||||
if not exist "..\runtime\bin\fernflower.jar" (
|
||||
echo Failed to download fernflower, install it manually and re-run setup.
|
||||
exit 1
|
||||
)
|
||||
|
||||
pushd .. >nul
|
||||
|
||||
xcopy /Y /E /I forge\conf\* conf
|
||||
|
||||
runtime\bin\python\python_mcp runtime\cleanup.py
|
||||
runtime\bin\python\python_mcp runtime\decompile.py --jad
|
||||
runtime\bin\python\python_mcp runtime\cleanup.py
|
||||
runtime\bin\python\python_mcp runtime\decompile.py
|
||||
|
||||
pushd src >nul
|
||||
|
||||
|
@ -31,9 +39,6 @@ pushd src >nul
|
|||
if exist ..\jars\minecraft_server.jar (
|
||||
del minecraft_server\net\minecraft\src\MLProp.java
|
||||
copy ..\forge\MLProp.java minecraft_server\net\minecraft\src\MLProp.java
|
||||
|
||||
..\runtime\bin\python\python_mcp ..\forge\lfcr.py ../forge/modLoaderMP.patch ../forge/modLoaderMP.patch
|
||||
..\runtime\bin\applydiff.exe -uf -p2 -i ../forge/modLoaderMP.patch
|
||||
|
||||
for /f "delims=" %%a in ('dir /a -d /b /S ..\forge\patches\minecraft_server') do (
|
||||
pushd "%%a" 2>nul
|
||||
|
@ -46,9 +51,7 @@ pushd src >nul
|
|||
)
|
||||
popd >nul
|
||||
|
||||
|
||||
rem Removed until MCP's Update Names is fixed
|
||||
rem cmd /C updatemcp.bat
|
||||
rem cmd /C updatenames.bat
|
||||
cmd /C updatemcp.bat -f
|
||||
cmd /C updatenames.bat -f
|
||||
runtime\bin\python\python_mcp runtime\updatemd5.py
|
||||
pause
|
|
@ -3,6 +3,17 @@
|
|||
echo "MinecraftForge Linux Setup Program"
|
||||
echo
|
||||
|
||||
if [ ! -f ../runtime/bin/fernflower.jar]
|
||||
then
|
||||
python download_fernflower.py
|
||||
fi
|
||||
|
||||
if [ ! -f ../runtime/bin/fernflower.jar]
|
||||
then
|
||||
echo "Failed to download fernflower, install it manually and re-run setup."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd .. > /dev/null
|
||||
|
||||
rm -rf conf
|
||||
|
@ -10,12 +21,9 @@ mkdir conf
|
|||
cp -r forge/conf/* conf
|
||||
|
||||
./cleanup.sh
|
||||
./decompile.sh --jad
|
||||
./decompile.sh
|
||||
|
||||
pushd src > /dev/null
|
||||
#find . -name *.java -exec sed -i 's/\r//g' \{\} \;
|
||||
#find ../forge/ -name *.patch -exec sed -i 's/\r//g' \{\} \;
|
||||
|
||||
if [ -f ../jars/bin/minecraft.jar ];
|
||||
then
|
||||
cp ../forge/MLProp.java minecraft/net/minecraft/src/MLProp.java
|
||||
|
@ -42,8 +50,6 @@ pushd src > /dev/null
|
|||
fi
|
||||
popd > /dev/null
|
||||
|
||||
|
||||
# Removed until MCP's UpdateNames Is fixed
|
||||
#./updatemcp.sh
|
||||
#./updatenames.sh
|
||||
./updatemcp.sh
|
||||
./updatenames.sh
|
||||
./updatemd5.sh
|
|
@ -65,7 +65,7 @@ cp -r ../conf/* conf
|
|||
cp ../lfcr.py .
|
||||
cp ../install/install.cmd .
|
||||
cp ../install/install.sh .
|
||||
cp ../modLoaderMP.patch .
|
||||
cp ../download_fernflower.py .
|
||||
cp ../MLProp.java .
|
||||
cp ../install/README.txt .
|
||||
cp ../minecraftforge_credits.txt .
|
||||
|
|
|
@ -2,11 +2,22 @@ echo off
|
|||
pushd .. >nul
|
||||
|
||||
if "%1"=="-skipdecompile" (
|
||||
@echo | cmd /C updatenames.bat
|
||||
@echo | cmd /C updatenames.bat -f
|
||||
) ELSE (
|
||||
if not exist "runtime\bin\fernflower.jar" (
|
||||
pushd forge
|
||||
..\runtime\bin\python\python_mcp download_fernflower.py
|
||||
popd
|
||||
)
|
||||
if not exist "runtime\bin\fernflower.jar" (
|
||||
echo Failed to download fernflower, install it manually and re-run setup.
|
||||
exit 1
|
||||
)
|
||||
rmdir /S /Q src
|
||||
@echo | cmd /C decompile.bat
|
||||
)
|
||||
|
||||
|
||||
rmdir /S /Q src_base
|
||||
rmdir /S /Q src_work
|
||||
|
||||
|
@ -15,9 +26,6 @@ pushd .. >nul
|
|||
copy ..\forge\MLProp.java minecraft\net\minecraft\src\MLProp.java
|
||||
del minecraft_server\net\minecraft\src\MLProp.java
|
||||
copy ..\forge\MLProp.java minecraft_server\net\minecraft\src\MLProp.java
|
||||
..\runtime\bin\python\python_mcp ..\forge\lfcr.py ..\forge\modLoaderMP.patch ..\forge\modLoaderMP-win.patch
|
||||
..\runtime\bin\applydiff.exe -uf -p2 < ..\forge\modLoaderMP-win.patch
|
||||
del ..\forge\modLoaderMP-win.patch
|
||||
popd >nul
|
||||
|
||||
@echo | cmd /C updatemd5.bat
|
||||
|
|
|
@ -17,6 +17,17 @@ if [ -d src ] ; then
|
|||
if [ "$var" != "y" ]; then exit ; fi
|
||||
fi
|
||||
|
||||
if [ ! -f ../runtime/bin/fernflower.jar]
|
||||
then
|
||||
python download_fernflower.py
|
||||
fi
|
||||
|
||||
if [ ! -f ../runtime/bin/fernflower.jar]
|
||||
then
|
||||
echo "Failed to download fernflower, install it manually and re-run setup."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf src src_work src_forge
|
||||
|
||||
if [ ! -d src_base ] ; then
|
||||
|
|
Loading…
Reference in a new issue