From e3359fdbd3e1fb3b51c7007b45eb17b6bba7d771 Mon Sep 17 00:00:00 2001 From: LexManos Date: Sat, 17 Mar 2012 19:49:00 -0700 Subject: [PATCH] Reworked the workspace scripts so the build should fail on compile errors. This build should fail as a test. --- forge/build.bat | 42 +++++++++++++++++++++++++++++++----------- forge/package.sh | 45 ++++++++++++--------------------------------- forge/release.bat | 21 +++++++++++---------- forge/setup.bat | 15 +++++++++------ 4 files changed, 63 insertions(+), 60 deletions(-) diff --git a/forge/build.bat b/forge/build.bat index dcc9c80ad..f0163db66 100755 --- a/forge/build.bat +++ b/forge/build.bat @@ -1,18 +1,38 @@ -@cd .. +@echo off +echo =================================== Build Start ================================= +cd .. -@rmdir /S /Q src -@mkdir src -xcopy /Q /Y /E src_work\* src\ +rem rmdir /S /Q src +rem mkdir src + +echo src_work -^> src +rem xcopy /Q /Y /E src_work\* src\ +echo. + +echo forge_client -^> minecraft xcopy /Y /E forge\forge_client\src\net\* src\minecraft\net +echo. + +echo forge_server -^> minecraft_server xcopy /Y /E forge\forge_server\src\net\* src\minecraft_server\net +echo. + +echo forge_common -^> minecraft xcopy /Y /E forge\forge_common\net\* src\minecraft\net +echo. + +echo forge_common -^> minecraft_server xcopy /Y /E forge\forge_common\net\* src\minecraft_server\net - -@cd forge -@cmd /C inject_version.bat ../src/minecraft/net/minecraft/src/forge/ForgeHooks.java -@cmd /C inject_version.bat ../src/minecraft_server/net/minecraft/src/forge/ForgeHooks.java -@cd .. - -@echo | call recompile.bat +echo. cd forge +cmd /C inject_version.bat ../src/minecraft/net/minecraft/src/forge/ForgeHooks.java +cmd /C inject_version.bat ../src/minecraft_server/net/minecraft/src/forge/ForgeHooks.java +cd .. + +runtime\bin\python\python_mcp runtime\recompile.py + +set ret=%ERRORLEVEL% +cd forge +echo =================================== Build Finished %ret% ================================= +if %ret% NEQ 0 exit /b %ret% diff --git a/forge/package.sh b/forge/package.sh index 14bc0553f..599ba565f 100755 --- a/forge/package.sh +++ b/forge/package.sh @@ -3,36 +3,24 @@ 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 - + + echo "=================================== MinecraftForge$qual-$version.zip Start =================================" + cp "$build_dir/minecraftforge_credits.txt" . - - echo "Making minecraftforge$qual-$version.zip" zip -r "$dir/minecraftforge$qual-$version.zip" . + + echo "=================================== MinecraftForge$qual-$version.zip Finished =================================" } cd ../reobf -remove_svn . +if [ ! -d "minecraft" -o ! -d "minecraft_server" ]; then + echo "Reobfusication failed, output directories do no exist." + exit 1 +fi rm -rf "$dir" mkdir "$dir" @@ -49,6 +37,7 @@ rm -rf reobf cd "$build_dir" +echo "=================================== MinecraftForge-src-$version.zip Start =================================" mkdir forge cd forge mkdir src @@ -69,22 +58,12 @@ cp ../install/install.sh . cp ../download_fernflower.py . 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 + +echo "=================================== MinecraftForge-src-$version.zip Finished =================================" diff --git a/forge/release.bat b/forge/release.bat index 63ffe94ea..02391130b 100755 --- a/forge/release.bat +++ b/forge/release.bat @@ -1,15 +1,16 @@ -@cmd /C build.bat +@echo off -if %ERRORLEVEL% NEQ 0 exit 1 +call build.bat +if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% -@cd .. +echo =================================== Release Start ================================= -@echo | cmd /C reobfuscate.bat +cd .. +runtime\bin\python\python_mcp runtime\reobfuscate.py +cd forge -@set PATH=E:\cygwin\bin;%PATH% +set PATH=E:\cygwin\bin;%PATH% +sh package.sh -@cd forge - -@sh package.sh - -pause +echo =================================== Release Finished %ERRORLEVEL% ================================= +if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% \ No newline at end of file diff --git a/forge/setup.bat b/forge/setup.bat index 71848aba0..e64728115 100755 --- a/forge/setup.bat +++ b/forge/setup.bat @@ -1,4 +1,5 @@ -echo off +@echo off +echo =================================== Setup Start ================================= pushd .. >nul if "%1"=="-skipdecompile" ( @@ -14,12 +15,12 @@ pushd .. >nul exit 1 ) rmdir /S /Q src - @echo | cmd /C decompile.bat -r + echo | cmd /C decompile.bat -r ) .\runtime\bin\python\python_mcp forge\clean_src.py src - @echo | cmd /C updatemd5.bat -f + echo | cmd /C updatemd5.bat -f rmdir /S /Q src_base rmdir /S /Q src_work @@ -37,7 +38,6 @@ pushd .. >nul echo Applying patches for /f %%i in ('find ../forge/patches -type f') do ( set file=%%i - rem Have to do this to filter out .svn entries if /I "!file:~-6!" EQU ".patch" ( ..\runtime\bin\python\python_mcp ..\forge\lfcr.py %%i ..\forge\temp.patch ..\runtime\bin\applydiff.exe -uf -p2 -i ..\forge\temp.patch @@ -46,5 +46,8 @@ pushd .. >nul ) popd >nul popd >nul -echo finished -pause \ No newline at end of file +echo =================================== Setup Finished ================================= + +if NOT "%1"=="-skipdecompile" ( + pause +) \ No newline at end of file