From 620764f31582e2f09d353e169fcc8b9f8311d191 Mon Sep 17 00:00:00 2001 From: Christian Weeks Date: Fri, 30 Mar 2012 16:40:54 -0400 Subject: [PATCH] More build stuff, adding in readme etc copied from forge --- fml/build.xml | 13 +++++----- fml/install/README.txt | 22 ++++++++++++++++ fml/install/install.cmd | 57 +++++++++++++++++++++++++++++++++++++++++ fml/install/install.sh | 54 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 140 insertions(+), 6 deletions(-) create mode 100755 fml/install/README.txt create mode 100755 fml/install/install.cmd create mode 100644 fml/install/install.sh diff --git a/fml/build.xml b/fml/build.xml index b665331c3..bb0fc2493 100644 --- a/fml/build.xml +++ b/fml/build.xml @@ -44,7 +44,7 @@ - + @@ -134,11 +134,12 @@ - - - - - + + + + + + diff --git a/fml/install/README.txt b/fml/install/README.txt new file mode 100755 index 000000000..20e451878 --- /dev/null +++ b/fml/install/README.txt @@ -0,0 +1,22 @@ +*** HOW TO INSTALL *** + +Extract the download archive directly into your MCP-directiory. +It should create a folder "forge" within that directory, containing all +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. + +Forge also includes a snapshot of the MCP mapings, this may not be the current +version of the mapings. But you must use the provided mapings in order for the +patch files to work together. + +The install scripts should take care of everything for you, so you should not need +to run ANY MCP script before installing forge. + diff --git a/fml/install/install.cmd b/fml/install/install.cmd new file mode 100755 index 000000000..9960d9074 --- /dev/null +++ b/fml/install/install.cmd @@ -0,0 +1,57 @@ +echo off + +echo Forge Mod Loader Windows Setup Program +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 fml\conf\* conf + +if exist ".\src" ( + runtime\bin\python\python_mcp runtime\cleanup.py +) +if exist ".\src" ( + echo Please make sure to backup your modified files, and say yes when it asks you to do cleanup. + exit 1 +) +runtime\bin\python\python_mcp runtime\decompile.py + +pushd src >nul + + if exist ..\jars\bin\minecraft.jar ( + for /f "delims=" %%a in ('dir /a -d /b /S ..\fml\patches\minecraft') do ( + pushd "%%a" 2>nul + if errorlevel 1 ( + ..\runtime\bin\python\python_mcp ..\fml\lfcr.py "%%a" "%%a" + ..\runtime\bin\applydiff.exe -uf -p2 -i "%%a" + ) else popd + ) + xcopy /Y /E ..\fml\src\minecraft\* minecraft + ) + + if exist ..\jars\minecraft_server.jar ( + for /f "delims=" %%a in ('dir /a -d /b /S ..\fml\patches\minecraft_server') do ( + pushd "%%a" 2>nul + if errorlevel 1 ( + ..\runtime\bin\python\python_mcp ..\fml\lfcr.py "%%a" "%%a" + ..\runtime\bin\applydiff.exe -uf -p2 -i "%%a" + ) else popd + ) + xcopy /Y /E ..\fml\src\server\* minecraft_server + ) +popd >nul + +runtime\bin\python\python_mcp runtime\updatemcp.py -f +runtime\bin\python\python_mcp runtime\updatenames.py -f +runtime\bin\python\python_mcp runtime\updatemd5.py -f +pause diff --git a/fml/install/install.sh b/fml/install/install.sh new file mode 100644 index 000000000..5012eda5e --- /dev/null +++ b/fml/install/install.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +echo "Forge Mod Loader 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 +mkdir conf +cp -r fml/conf/* conf + +./cleanup.sh +if [ -d "src" ] +then + echo "Failed to cleanup the MCP folder, please backup your modified files and run this script again and say yes when prompted." + exit 1 +fi +./decompile.sh + +pushd src > /dev/null + if [ -f ../jars/bin/minecraft.jar ]; + then + for i in `find ../fml/patches/minecraft/ -type f` + do + patch -p2 -i $i + done + cp -r ../fml/src/minecraft/* minecraft + fi + + + if [ -f ../jars/minecraft_server.jar ]; + then + for i in `find ../fml/patches/minecraft_server/ -type f` + do + patch -p2 -i $i + done + cp -r ../fml/src/minecraft_server/* minecraft_server + fi +popd > /dev/null + +./updatemcp.sh -f +./updatenames.sh -f +./updatemd5.sh -f