Tidy up some of the installation media

This commit is contained in:
Christian Weeks 2012-04-04 09:48:36 -04:00
parent b2555e4a50
commit 371d69f89c
7 changed files with 93 additions and 52 deletions

View File

@ -59,7 +59,7 @@
<property name="server.src.dir" location="${basedir}/server" />
<property name="patch.src.dir" location="${basedir}/patches" />
</target>
<target name="clean">
<exec executable="${python.exe}" dir="${mcp.home}">
<arg value="${mcp.home}/runtime/cleanup.py"/>
@ -130,20 +130,45 @@
<mkdir dir="${basedir}/target" />
<zip destfile="${basedir}/target/${jarname}.zip">
<fileset dir="${output}" includes="**/*.class" />
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt" />
<mappedresources>
<fileset dir="${basedir}/install" excludes="install.*" />
<filterchain>
<replacetokens>
<token key="MAJOR" value="${version.major}" />
<token key="MINOR" value="${version.minor}" />
<token key="REV" value="${version.rev}" />
<token key="BUILD" value="${version.build}" />
<token key="MCVERSION" value="${version.minecraft}" />
</replacetokens>
</filterchain>
</mappedresources>
</zip>
</target>
<target name="build-source-pack">
<property name="jarname" value="${modname}-src-${version}" />
<zip destfile="${basedir}/target/${jarname}.zip">
<zipfileset dir="${basedir}/install" includes="*" prefix="fml"/>
<zipfileset dir="${basedir}" includes="LICENSE" prefix="fml"/>
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt" prefix="fml"/>
<zipfileset dir="${common.src.dir}" includes="**/*.java" prefix="fml/src/minecraft_server"/>
<zipfileset dir="${server.src.dir}" includes="**/*.java" prefix="fml/src/minecraft_server"/>
<zipfileset dir="${patch.src.dir}" includes="**/*.patch" prefix="fml/patches"/>
<mappedresources>
<fileset dir="${basedir}/install" includes="*" />
<filterchain>
<replacetokens>
<token key="MAJOR" value="${version.major}" />
<token key="MINOR" value="${version.minor}" />
<token key="REV" value="${version.rev}" />
<token key="BUILD" value="${version.build}" />
<token key="MCVERSION" value="${version.minecraft}" />
</replacetokens>
</filterchain>
<globmapper handledirsep="true" from="*" to="fml/" />
</mappedresources>
</zip>
</target>
<target name="build" depends="init,clean,merge-server,patch,build-server,build-source-pack" />
<target name="patch" depends="init">
@ -152,7 +177,7 @@
<arg value="${patch.src.dir}"/>
<arg value="${mcp.srcdir}"/>
</exec>
</target>
</project>

View File

@ -0,0 +1,17 @@
This is Forge Mod Loader.
You can find the source code at all times at https://github.com/cpw/FML
This minecraft mod is a clean open source implementation of a mod loader for
minecraft servers.
The code is authored by cpw.
It implements API defined by the client side ModLoader, authored by Risugami.
http://www.minecraftforum.net/topic/75440-
It also contains suggestions and hints from LexManos, author of MinecraftForge.
http://www.mod-buildcraft.com/forums/forum/minecraft-forge/
Finally, it contains an implementation of topological sort based on that
published at http://keithschwarz.com/interesting/code/?dir=topological-sort

View File

@ -1,22 +1,38 @@
*** HOW TO INSTALL ***
This is Forge Mod Loader, or FML for short, by cpw.
Extract the download archive directly into your MCP-directiory.
It should create a folder "forge" within that directory, containing all
extracted files.
It is a clean reimplementation of a mod loading system for server side use,
incorporating API implementations of client side ModLoader by Risugami.
You should use freshly downloaded jars, solely including ModLoader &
ModLoaderMP. Anything else can eventually cause conflicts.
It can be installed on its own, or as part of Minecraft Forge.
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.
If you have downloaded the server zip file you can install it as follows:
Installation
============
To install this on it's own into a minecraft server, simply copy the contents
of the fml server zip file into the minecraft_server.jar file.
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 Installation
==================
This code also ships as a part of Minecraft Forge. You do not need to install it
separately from your Minecraft Forge installation.
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.
If you have downloaded the source code pack, you can install it as follows:
The install scripts should take care of everything for you, so you should not need
to run ANY MCP script before installing forge.
Standalone source installation
==============================
To install this source code for development purposes, extract this zip file
into an mcp installation containing vanilla jars only. It should create a new
folder "fml" inside that installation.
Once extracted, run the install.sh or install.bat script provided from the fml
directory. It should decompile and patch your MCP source code for the server.
Forge source installation
=========================
MinecraftForge should ship with this code and install it as part of the forge
installation process, no further action should be required on your part.
For reference this is version @MAJOR@.@MINOR@.@REV@.@BUILD@ of FML
for Minecraft version @MCVERSION@.

View File

@ -15,8 +15,6 @@ if not exist "..\runtime\bin\fernflower.jar" (
pushd .. >nul
xcopy /Y /E /I fml\conf\* conf
if exist ".\src" (
runtime\bin\python\python_mcp runtime\cleanup.py
)
@ -24,30 +22,19 @@ 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
runtime\bin\python\python_mcp runtime\decompile.py -d -n -r
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"
..\runtime\bin\applydiff.exe -uf -p1 -i "%%a"
) else popd
)
xcopy /Y /E ..\fml\src\server\* minecraft_server
xcopy /Y /E ..\fml\src\* minecraft_server
)
popd >nul

View File

@ -16,34 +16,22 @@ 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
./decompile.sh -d -n -r
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
patch -p1 -i $i
done
cp -r ../fml/src/minecraft_server/* minecraft_server
fi

8
fml/install/lfcr.py Executable file
View File

@ -0,0 +1,8 @@
#! /usr/bin/env python
import sys, re, os
data = open(sys.argv[1], "rb").read()
newdata = re.sub("\r?\n", "\r\n", data)
f = open(sys.argv[2], "wb")
f.write(newdata)
f.close()