The install scripts will now only patch the client/server if they are there.

This allows for people to only worry about getting one side setup correctly if they don't care about the other.
This commit is contained in:
LexManos 2011-12-11 07:37:54 +00:00
parent 9bf4f67d9d
commit e79b5d1937
2 changed files with 49 additions and 20 deletions

View file

@ -15,20 +15,35 @@ cmd /C decompile.bat
if exist runtime\bin\fernflower.jar-backup move runtime\bin\fernflower.jar-backup runtime\bin\fernflower.jar if exist runtime\bin\fernflower.jar-backup move runtime\bin\fernflower.jar-backup runtime\bin\fernflower.jar
pushd src >nul pushd src >nul
del minecraft\net\minecraft\src\MLProp.java
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.patch if exist ..\jars\bin\minecraft.jar (
..\runtime\bin\applydiff.exe -uf -p2 -i ../forge/modLoaderMP.patch del minecraft\net\minecraft\src\MLProp.java
copy ..\forge\MLProp.java minecraft\net\minecraft\src\MLProp.java
for /f "delims=" %%a in ('dir /a -d /b /S ..\forge\patches\minecraft') do (
pushd "%%a" 2>nul
if errorlevel 1 (
..\runtime\bin\python\python_mcp ..\forge\lfcr.py "%%a" "%%a"
..\runtime\bin\applydiff.exe -uf -p2 -i "%%a"
) else popd
)
)
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
for /f "delims=" %%a in ('dir /a -d /b /S ..\forge\patches') do ( ..\runtime\bin\python\python_mcp ..\forge\lfcr.py ../forge/modLoaderMP.patch ../forge/modLoaderMP.patch
pushd "%%a" 2>nul ..\runtime\bin\applydiff.exe -uf -p2 -i ../forge/modLoaderMP.patch
if errorlevel 1 (
..\runtime\bin\python\python_mcp ..\forge\lfcr.py "%%a" "%%a" for /f "delims=" %%a in ('dir /a -d /b /S ..\forge\patches\minecraft_server') do (
..\runtime\bin\applydiff.exe -uf -p2 -i "%%a" pushd "%%a" 2>nul
) else popd if errorlevel 1 (
..\runtime\bin\python\python_mcp ..\forge\lfcr.py "%%a" "%%a"
..\runtime\bin\applydiff.exe -uf -p2 -i "%%a"
) else popd
)
) )
popd >nul popd >nul

View file

@ -25,16 +25,30 @@ fi
pushd src > /dev/null pushd src > /dev/null
find . -name *.java -exec sed -i 's/\r//g' \{\} \; find . -name *.java -exec sed -i 's/\r//g' \{\} \;
cp ../forge/MLProp.java minecraft/net/minecraft/src/MLProp.java
cp ../forge/MLProp.java minecraft_server/net/minecraft/src/MLProp.java
find ../forge/ -name *.patch -exec sed -i 's/\r//g' \{\} \; find ../forge/ -name *.patch -exec sed -i 's/\r//g' \{\} \;
patch -p2 -i ../forge/modLoaderMP.patch
if [ -f ../jars/bin/minecraft.jar ];
then
cp ../forge/MLProp.java minecraft/net/minecraft/src/MLProp.java
for i in `find ../forge/patches/ -type f` for i in `find ../forge/patches/minecraft/ -type f`
do do
patch -p2 -i $i patch -p2 -i $i
done done
fi
if [ -f ../jars/minecraft_server.jar ];
then
cp ../forge/MLProp.java minecraft_server/net/minecraft/src/MLProp.java
patch -p2 -i ../forge/modLoaderMP.patch
for i in `find ../forge/patches/minecraft_server/ -type f`
do
patch -p2 -i $i
done
fi
popd > /dev/null popd > /dev/null
cp -r forge/src/* src cp -r forge/src/* src