2017-10-25 01:46:58 +08:00
|
|
|
@echo off
|
|
|
|
|
2018-05-18 00:42:54 +08:00
|
|
|
setlocal
|
2017-10-25 01:46:58 +08:00
|
|
|
|
2018-05-18 00:42:54 +08:00
|
|
|
set LOCAL_PATH=%~dp0
|
2018-05-22 22:50:32 +08:00
|
|
|
set FILE_N=---%~n0%~x0:
|
2017-10-25 01:46:58 +08:00
|
|
|
|
2018-05-18 00:42:54 +08:00
|
|
|
set LIB_FOLDER=%LOCAL_PATH%Util\Build\
|
|
|
|
set CARLA_FOLDER=%LOCAL_PATH%Unreal\CarlaUE4\
|
2017-10-25 23:26:31 +08:00
|
|
|
|
2018-05-18 00:42:54 +08:00
|
|
|
if not exist "%LIB_FOLDER%" (
|
2018-05-22 22:50:32 +08:00
|
|
|
echo %FILE_N% Creating %LIB_FOLDER% folder...
|
2018-05-18 00:42:54 +08:00
|
|
|
mkdir %LIB_FOLDER%
|
|
|
|
)
|
2018-03-21 00:16:38 +08:00
|
|
|
|
2018-05-22 22:50:32 +08:00
|
|
|
echo %FILE_N% Deleting intermediate folders...
|
2018-05-18 00:42:54 +08:00
|
|
|
for %%G in (
|
|
|
|
"%CARLA_FOLDER%Binaries",
|
|
|
|
"%CARLA_FOLDER%Intermediate",
|
|
|
|
"%CARLA_FOLDER%Plugins\Carla\Binaries",
|
|
|
|
"%CARLA_FOLDER%Plugins\Carla\Intermediate"
|
|
|
|
) do (
|
|
|
|
if exist %%G (
|
2018-05-22 22:50:32 +08:00
|
|
|
echo %FILE_N% Deleting: %%G
|
2018-05-18 00:42:54 +08:00
|
|
|
rmdir /s/q %%G
|
|
|
|
)
|
|
|
|
)
|
2018-03-21 00:16:38 +08:00
|
|
|
|
2018-05-18 00:42:54 +08:00
|
|
|
echo.
|
2018-05-22 22:50:32 +08:00
|
|
|
echo %FILE_N% Building carlaserver...
|
2018-05-18 00:42:54 +08:00
|
|
|
make clean & make
|
|
|
|
|
2018-05-22 22:50:32 +08:00
|
|
|
if errorlevel 1 goto compiling_error
|
|
|
|
|
2018-05-18 00:42:54 +08:00
|
|
|
echo.
|
2018-05-22 22:50:32 +08:00
|
|
|
echo %FILE_N% Launch editor...
|
2018-05-18 00:42:54 +08:00
|
|
|
start %CARLA_FOLDER%CarlaUE4.uproject
|
|
|
|
|
2018-05-22 22:50:32 +08:00
|
|
|
:success
|
|
|
|
goto eof
|
|
|
|
|
2018-05-23 22:01:17 +08:00
|
|
|
:error_git
|
|
|
|
echo %FILE_N% [GIT ERROR] An error ocurred while executing the git.
|
|
|
|
echo %FILE_N% [GIT ERROR] Possible causes:
|
|
|
|
echo %FILE_N% - Make sure "git" is installed.
|
|
|
|
echo %FILE_N% - Make sure it is available on your Windows "path".
|
|
|
|
goto bad_exit
|
|
|
|
|
2018-05-22 22:50:32 +08:00
|
|
|
:compiling_error
|
|
|
|
echo.
|
|
|
|
echo.
|
|
|
|
echo %FILE_N% Error while compiling carlaserver
|
|
|
|
goto eof
|
|
|
|
|
|
|
|
:eof
|
|
|
|
endlocal
|