2011-08-05 00:32:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo "MinecraftForge Linux Setup Program"
|
|
|
|
echo
|
|
|
|
|
|
|
|
pushd .. > /dev/null
|
|
|
|
|
|
|
|
if [ -d src ] ; then
|
|
|
|
echo "!!! WARNING !!!"
|
|
|
|
echo
|
|
|
|
echo "This setup will erase your src directory. Make sure to back up"
|
|
|
|
echo "any changes before continuing."
|
|
|
|
echo
|
|
|
|
|
|
|
|
read -p "Continue (y/n)? " var
|
|
|
|
|
|
|
|
if [ "$var" != "y" ]; then exit ; fi
|
|
|
|
fi
|
|
|
|
|
2012-03-06 04:01:04 +00:00
|
|
|
if [ ! -f ./runtime/bin/fernflower.jar ]
|
2012-03-04 01:56:15 +00:00
|
|
|
then
|
2012-03-06 04:01:04 +00:00
|
|
|
pushd forge
|
|
|
|
python download_fernflower.py
|
|
|
|
popd
|
2012-03-04 01:56:15 +00:00
|
|
|
fi
|
|
|
|
|
2012-03-06 04:01:04 +00:00
|
|
|
if [ ! -f ./runtime/bin/fernflower.jar ]
|
2012-03-04 01:56:15 +00:00
|
|
|
then
|
2012-03-06 04:01:04 +00:00
|
|
|
echo "Failed to download fernflower, install it manually and re-run setup."
|
|
|
|
exit 1
|
2012-03-04 01:56:15 +00:00
|
|
|
fi
|
|
|
|
|
2011-08-05 00:32:56 +00:00
|
|
|
rm -rf src src_work src_forge
|
|
|
|
|
|
|
|
if [ ! -d src_base ] ; then
|
|
|
|
./decompile.sh
|
2012-03-12 23:55:59 +00:00
|
|
|
python forge/clean_src.py src
|
2011-08-05 00:32:56 +00:00
|
|
|
mv src src_base
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -a src_base src_work
|
|
|
|
pushd src_work > /dev/null
|
2011-10-10 23:47:30 +00:00
|
|
|
for i in `find ../forge/patches/ -type f -name \*.patch`
|
2011-10-09 04:21:29 +00:00
|
|
|
do
|
2012-03-12 23:55:59 +00:00
|
|
|
patch -p2 -i $i
|
2011-10-09 04:21:29 +00:00
|
|
|
done
|
2011-08-05 00:32:56 +00:00
|
|
|
popd > /dev/null
|
|
|
|
|
2012-03-12 23:55:59 +00:00
|
|
|
echo "!!! WARNING !!!"
|
|
|
|
echo
|
|
|
|
echo "This is an extra step for Eloraam, only say yes if you are her"
|
|
|
|
echo
|
|
|
|
|
|
|
|
read -p "Continue (y/n)? " var
|
|
|
|
|
|
|
|
if [ "$var" != "y" ]; then exit ; fi
|
|
|
|
|
2011-08-05 00:32:56 +00:00
|
|
|
cp -a src_work src_forge
|
|
|
|
|
|
|
|
cp -a forge/forge_client/src/net/* src_forge/minecraft/net/
|
|
|
|
cp -a forge/forge_common/net/* src_forge/minecraft/net/
|
|
|
|
cp -a forge/forge_common/net/* src_forge/minecraft_server/net/
|
2012-02-21 08:53:33 +00:00
|
|
|
cp -a forge/forge_server/src/net/* src_forge/minecraft_server/net/
|
|
|
|
|
|
|
|
pushd forge > /dev/null
|
|
|
|
./inject_version.sh $OLDPWD/src_forge/minecraft/net/minecraft/src/forge/ForgeHooks.java
|
|
|
|
./inject_version.sh $OLDPWD/src_forge/minecraft_server/net/minecraft/src/forge/ForgeHooks.java
|
|
|
|
popd > /dev/null
|
2011-08-05 00:32:56 +00:00
|
|
|
|
|
|
|
cp -a src_forge src
|
|
|
|
|
|
|
|
./updatemd5.sh
|
|
|
|
|