New parameter for setup script to skip the initial decompile. Used in the build system to speed things up.
This commit is contained in:
parent
e3b3920661
commit
02088ea278
2 changed files with 100 additions and 96 deletions
184
forge/package.sh
184
forge/package.sh
|
@ -1,91 +1,93 @@
|
|||
read major minor revision build <version.txt
|
||||
version=$major.$minor.$revision.$build
|
||||
build_dir=`pwd`
|
||||
dir=`pwd`/../forge-$version
|
||||
|
||||
function remove_svn () {
|
||||
(
|
||||
cd "$1"
|
||||
|
||||
if [ -d .svn ]; then
|
||||
rm -rf .svn
|
||||
fi
|
||||
|
||||
for j in `ls`
|
||||
do
|
||||
if [ -d $j ]; then
|
||||
remove_svn $j
|
||||
fi
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
function package_all () {
|
||||
qual=$1
|
||||
|
||||
cp $build_dir/minecraftforge_credits.txt .
|
||||
|
||||
zip -r "$dir/minecraftforge$qual-$version.zip" \
|
||||
minecraftforge_credits.txt \
|
||||
*.class \
|
||||
forge
|
||||
}
|
||||
|
||||
cd ../reobf
|
||||
|
||||
remove_svn .
|
||||
|
||||
rm -rf "$dir"
|
||||
mkdir "$dir"
|
||||
|
||||
cd minecraft
|
||||
package_all "-client"
|
||||
|
||||
cd ../minecraft_server
|
||||
package_all "-server"
|
||||
|
||||
cd ../..
|
||||
|
||||
rm -rf reobf
|
||||
|
||||
cd $build_dir
|
||||
|
||||
mkdir forge
|
||||
cd forge
|
||||
mkdir src
|
||||
mkdir src/minecraft
|
||||
mkdir src/minecraft_server
|
||||
mkdir patches
|
||||
mkdir conf
|
||||
cp -r ../forge_client/src/* src/minecraft
|
||||
cp -r ../forge_server/src/* src/minecraft_server
|
||||
cp -r ../forge_common/* src/minecraft
|
||||
cp -r ../forge_common/* src/minecraft_server
|
||||
cp -r ../patches/* patches
|
||||
cp -r ../conf/* conf
|
||||
cp ../lfcr.py .
|
||||
cp ../install/install.cmd .
|
||||
cp ../install/install.sh .
|
||||
cp ../modLoaderMP.patch .
|
||||
cp ../MLProp.java .
|
||||
cp ../install/README.txt .
|
||||
cp ../minecraftforge_credits.txt .
|
||||
cp -r ../doc .
|
||||
|
||||
cd ..
|
||||
sh inject_version.sh forge/src/minecraft/net/minecraft/src/forge/ForgeHooks.java
|
||||
sh inject_version.sh forge/src/minecraft_server/net/minecraft/src/forge/ForgeHooks.java
|
||||
cd forge
|
||||
|
||||
cd src
|
||||
remove_svn .
|
||||
cd ../patches
|
||||
remove_svn .
|
||||
cd ../conf
|
||||
remove_svn .
|
||||
cd ..
|
||||
|
||||
cd ..
|
||||
|
||||
zip -r "$dir/minecraftforge-src-$version.zip" forge
|
||||
rm -rf forge
|
||||
read major minor revision build <version.txt
|
||||
version=$major.$minor.$revision.$build
|
||||
build_dir=`pwd`
|
||||
dir=`pwd`/../forge-$version
|
||||
|
||||
function remove_svn () {
|
||||
(
|
||||
cd "$1"
|
||||
|
||||
if [ -d .svn ]; then
|
||||
rm -rf .svn
|
||||
fi
|
||||
|
||||
for j in `ls`
|
||||
do
|
||||
if [ -d $j ]; then
|
||||
remove_svn $j
|
||||
fi
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
function package_all () {
|
||||
qual=$1
|
||||
|
||||
cp "$build_dir/minecraftforge_credits.txt" .
|
||||
|
||||
echo "Making minecraftforge$qual-$version.zip"
|
||||
|
||||
zip -r "$dir/minecraftforge$qual-$version.zip" \
|
||||
minecraftforge_credits.txt \
|
||||
*.class \
|
||||
forge
|
||||
}
|
||||
|
||||
cd ../reobf
|
||||
|
||||
remove_svn .
|
||||
|
||||
rm -rf "$dir"
|
||||
mkdir "$dir"
|
||||
|
||||
cd minecraft
|
||||
package_all "-client"
|
||||
|
||||
cd ../minecraft_server
|
||||
package_all "-server"
|
||||
|
||||
cd ../..
|
||||
|
||||
rm -rf reobf
|
||||
|
||||
cd "$build_dir"
|
||||
|
||||
mkdir forge
|
||||
cd forge
|
||||
mkdir src
|
||||
mkdir src/minecraft
|
||||
mkdir src/minecraft_server
|
||||
mkdir patches
|
||||
mkdir conf
|
||||
cp -r ../forge_client/src/* src/minecraft
|
||||
cp -r ../forge_server/src/* src/minecraft_server
|
||||
cp -r ../forge_common/* src/minecraft
|
||||
cp -r ../forge_common/* src/minecraft_server
|
||||
cp -r ../patches/* patches
|
||||
cp -r ../conf/* conf
|
||||
cp ../lfcr.py .
|
||||
cp ../install/install.cmd .
|
||||
cp ../install/install.sh .
|
||||
cp ../modLoaderMP.patch .
|
||||
cp ../MLProp.java .
|
||||
cp ../install/README.txt .
|
||||
cp ../minecraftforge_credits.txt .
|
||||
cp -r ../doc .
|
||||
|
||||
cd ..
|
||||
sh inject_version.sh forge/src/minecraft/net/minecraft/src/forge/ForgeHooks.java
|
||||
sh inject_version.sh forge/src/minecraft_server/net/minecraft/src/forge/ForgeHooks.java
|
||||
cd forge
|
||||
|
||||
cd src
|
||||
remove_svn .
|
||||
cd ../patches
|
||||
remove_svn .
|
||||
cd ../conf
|
||||
remove_svn .
|
||||
cd ..
|
||||
|
||||
cd ..
|
||||
|
||||
zip -r "$dir/minecraftforge-src-$version.zip" forge
|
||||
rm -rf forge
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
echo off
|
||||
pushd .. >nul
|
||||
|
||||
rmdir /S /Q src
|
||||
if "%1"=="-skipdecompile" (
|
||||
@echo | cmd /C updatenames.bat
|
||||
) ELSE (
|
||||
rmdir /S /Q src
|
||||
@echo | cmd /C decompile.bat
|
||||
)
|
||||
rmdir /S /Q src_base
|
||||
rmdir /S /Q src_work
|
||||
|
||||
@echo | cmd /C decompile.bat
|
||||
|
||||
pushd src >nul
|
||||
del minecraft\net\minecraft\src\MLProp.java
|
||||
copy ..\forge\MLProp.java minecraft\net\minecraft\src\MLProp.java
|
||||
|
@ -43,5 +46,4 @@ pushd .. >nul
|
|||
popd >nul
|
||||
popd >nul
|
||||
echo finished
|
||||
pause
|
||||
|
||||
pause
|
Loading…
Reference in a new issue