forked from carla-simulator/carla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProtoc.bat
37 lines (26 loc) · 806 Bytes
/
Protoc.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
@echo off
set PROTOBUF_SRC_DIR=Proto
set PROTOBUF_CPP_OUT_DIR=CarlaServer/source/carla/server
set PROTOBUF_PY_OUT_DIR=../PythonClient/carla
set PROTO_BASENAME=carla_server
if "%1" == "--clean" (
rem Delete existing ones.
@rd /s /q "%PROTOBUF_CPP_OUT_DIR%\carla_server.pb.h" 2>nul
@rd /s /q "%PROTOBUF_CPP_OUT_DIR%\carla_server.pb.cc" 2>nul
@rd /s /q "%PROTOBUF_PY_OUT_DIR%\carla_server_pb2.py" 2>nul
goto end
)
set PROTOC=Build\protobuf-install\bin\protoc.exe
if exist %PROTOC% (
echo Compiling %PROTO_BASENAME%.proto...
%PROTOC% ^
-I=%PROTOBUF_SRC_DIR% ^
--cpp_out=%PROTOBUF_CPP_OUT_DIR% ^
--python_out=%PROTOBUF_PY_OUT_DIR% ^
%PROTOBUF_SRC_DIR%/%PROTO_BASENAME%.proto
echo done.
) else (
echo ERROR: Missing protobuf compiler: %PROTOC%
exit /b
)
:end