2012-03-18 02:49:00 +00:00
|
|
|
@echo off
|
|
|
|
echo =================================== Setup Start =================================
|
2011-10-10 00:09:48 +00:00
|
|
|
pushd .. >nul
|
2011-07-17 12:16:26 +00:00
|
|
|
|
2012-02-03 10:46:49 +00:00
|
|
|
if "%1"=="-skipdecompile" (
|
2012-03-04 01:56:15 +00:00
|
|
|
@echo | cmd /C updatenames.bat -f
|
2012-02-03 10:46:49 +00:00
|
|
|
) ELSE (
|
2012-03-04 01:56:15 +00:00
|
|
|
if not exist "runtime\bin\fernflower.jar" (
|
|
|
|
pushd forge
|
|
|
|
..\runtime\bin\python\python_mcp download_fernflower.py
|
|
|
|
popd
|
|
|
|
)
|
|
|
|
if not exist "runtime\bin\fernflower.jar" (
|
|
|
|
echo Failed to download fernflower, install it manually and re-run setup.
|
|
|
|
exit 1
|
|
|
|
)
|
2012-02-03 10:46:49 +00:00
|
|
|
rmdir /S /Q src
|
2012-03-18 02:49:00 +00:00
|
|
|
echo | cmd /C decompile.bat -r
|
2012-02-03 10:46:49 +00:00
|
|
|
)
|
2011-10-10 00:09:48 +00:00
|
|
|
|
2012-03-18 02:49:00 +00:00
|
|
|
echo | cmd /C updatemd5.bat -f
|
2011-10-10 00:09:48 +00:00
|
|
|
|
2012-03-12 23:55:59 +00:00
|
|
|
rmdir /S /Q src_base
|
|
|
|
rmdir /S /Q src_work
|
2011-10-10 00:09:48 +00:00
|
|
|
mkdir src_base
|
|
|
|
mkdir src_work
|
|
|
|
|
|
|
|
xcopy /Y /E /Q src\* src_base
|
|
|
|
xcopy /Y /E /Q src\* src_work
|
|
|
|
|
|
|
|
pushd src_work >nul
|
|
|
|
@setlocal enabledelayedexpansion
|
|
|
|
@echo off
|
|
|
|
|
|
|
|
set PATH=..\forge\bin;%PATH%
|
|
|
|
echo Applying patches
|
|
|
|
for /f %%i in ('find ../forge/patches -type f') do (
|
|
|
|
set file=%%i
|
|
|
|
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
|
2011-10-10 23:47:30 +00:00
|
|
|
del ..\forge\temp.patch >nul 1>nul
|
2011-10-10 00:09:48 +00:00
|
|
|
)
|
|
|
|
)
|
|
|
|
popd >nul
|
|
|
|
popd >nul
|
2012-03-18 02:49:00 +00:00
|
|
|
echo =================================== Setup Finished =================================
|
|
|
|
|
|
|
|
if NOT "%1"=="-skipdecompile" (
|
|
|
|
pause
|
|
|
|
)
|