Keep Windows build script open on failure
This commit is contained in:
@@ -3,17 +3,41 @@ setlocal
|
||||
|
||||
set "PROJECT_DIR=%~dp0.."
|
||||
set "PROJECT_FILE=%PROJECT_DIR%\AgrarianGame.uproject"
|
||||
set "LOG_DIR=%PROJECT_DIR%\Saved\BuildLogs"
|
||||
set "LOG_FILE=%LOG_DIR%\BuildEditor-Windows.log"
|
||||
set "UE_ROOT=C:\Program Files\Epic Games\UE_5.7"
|
||||
set "BUILD_BAT=%UE_ROOT%\Engine\Build\BatchFiles\Build.bat"
|
||||
|
||||
if not exist "%LOG_DIR%" mkdir "%LOG_DIR%"
|
||||
|
||||
if not exist "%BUILD_BAT%" (
|
||||
echo Unreal Engine 5.7 was not found at:
|
||||
echo %UE_ROOT%
|
||||
echo.
|
||||
echo Edit UE_ROOT in this script if your engine is installed somewhere else.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Building AgrarianGameEditor with UnrealBuildTool...
|
||||
call "%BUILD_BAT%" AgrarianGameEditor Win64 Development -Project="%PROJECT_FILE%" -WaitMutex -architecture=x64
|
||||
exit /b %ERRORLEVEL%
|
||||
echo Log: %LOG_FILE%
|
||||
call "%BUILD_BAT%" AgrarianGameEditor Win64 Development -Project="%PROJECT_FILE%" -WaitMutex -architecture=x64 > "%LOG_FILE%" 2>&1
|
||||
set "BUILD_EXIT_CODE=%ERRORLEVEL%"
|
||||
|
||||
type "%LOG_FILE%"
|
||||
|
||||
if not "%BUILD_EXIT_CODE%"=="0" (
|
||||
echo.
|
||||
echo Build failed with exit code %BUILD_EXIT_CODE%.
|
||||
echo Log file: %LOG_FILE%
|
||||
echo.
|
||||
pause
|
||||
exit /b %BUILD_EXIT_CODE%
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Build completed successfully.
|
||||
echo Log file: %LOG_FILE%
|
||||
echo.
|
||||
pause
|
||||
exit /b 0
|
||||
|
||||
Reference in New Issue
Block a user