I had a similar issue. For me the solution was to add quotes around the %~dp0
in the echo statements. It seems that the parens in, for example, C:\Program Files (x86)\Epic Games\4.10\Engine\Build\BatchFiles
interfere with the parens of the ELSE
block. The original script ran fine from the command line, but not when launched by Visual Studio 2015.
@echo off
REM %1 is the game name
REM %2 is the platform name
REM %3 is the configuration name
IF EXIST "%~dp0\Clean.bat" (
call "%~dp0\Clean.bat" %*
) ELSE (
ECHO Clean.bat not found in "%~dp0"
EXIT /B 999
)
IF EXIST "%~dp0\Build.bat" (
call "%~dp0\Build.bat" %*
) ELSE (
ECHO Build.bat not found in "%~dp0"
EXIT /B 999
)
See also:
https://github.com/EpicGames/UnrealEngine/pull/2210
P.S. Duplicate of: