forked from carla-simulator/carla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRebuild.bat
56 lines (44 loc) · 1.1 KB
/
Rebuild.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@echo off
setlocal
set LOCAL_PATH=%~dp0
set FILE_N=---%~n0%~x0:
set LIB_FOLDER=%LOCAL_PATH%Util\Build\
set CARLA_FOLDER=%LOCAL_PATH%Unreal\CarlaUE4\
if not exist "%LIB_FOLDER%" (
echo %FILE_N% Creating %LIB_FOLDER% folder...
mkdir %LIB_FOLDER%
)
echo %FILE_N% Deleting intermediate folders...
for %%G in (
"%CARLA_FOLDER%Binaries",
"%CARLA_FOLDER%Intermediate",
"%CARLA_FOLDER%Plugins\Carla\Binaries",
"%CARLA_FOLDER%Plugins\Carla\Intermediate"
) do (
if exist %%G (
echo %FILE_N% Deleting: %%G
rmdir /s/q %%G
)
)
echo.
echo %FILE_N% Building carlaserver...
make clean & make
if errorlevel 1 goto compiling_error
echo.
echo %FILE_N% Launching Unreal Editor...
start %CARLA_FOLDER%CarlaUE4.uproject
:success
goto eof
: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
:compiling_error
echo.
echo.
echo %FILE_N% Error while compiling carlaserver
goto eof
:eof
endlocal