Fixed PythonAPI rebuild

This commit is contained in:
Marc Garcia Puig 2019-02-12 12:27:28 +01:00
parent d9c733bad3
commit b94ce9eec5
3 changed files with 30 additions and 10 deletions

View File

@ -72,11 +72,26 @@ set LIBCARLA_SERVER_INSTALL_PATH=%ROOT_PATH%Unreal\CarlaUE4\Plugins\Carla\CarlaD
set LIBCARLA_CLIENT_INSTALL_PATH=%ROOT_PATH%PythonAPI\dependencies
if %REMOVE_INTERMEDIATE% == true (
echo %FILE_N% Cleaning "%LIBCARLA_SERVER_INSTALL_PATH%"
if exist "%LIBCARLA_SERVER_INSTALL_PATH%" rmdir /S /Q "%LIBCARLA_SERVER_INSTALL_PATH%"
rem Remove directories
for %%G in (
"%LIBCARLA_SERVER_INSTALL_PATH:/=\%",
"%LIBCARLA_CLIENT_INSTALL_PATH:/=\%",
) do (
if exist %%G (
echo %FILE_N% Cleaning %%G
rmdir /s/q %%G
)
)
echo %FILE_N% Cleaning "%LIBCARLA_CLIENT_INSTALL_PATH%"
if exist "%LIBCARLA_CLIENT_INSTALL_PATH%" rmdir /S /Q "%LIBCARLA_CLIENT_INSTALL_PATH%"
rem Remove files
for %%G in (
"%ROOT_PATH:/=\%LibCarla\source\carla\Version.h"
) do (
if exist %%G (
echo %FILE_N% Cleaning %%G
del %%G
)
)
)
if not exist "%LIBCARLA_VSPROJECT_PATH%" mkdir "%LIBCARLA_VSPROJECT_PATH%"

View File

@ -25,7 +25,8 @@ set BUILD_FOR_PYTHON3=false
if not "%1"=="" (
if "%1"=="--rebuild" (
set REMOVE_INTERMEDIATE=true
set BUILD_FOR_PYTHON2=true
rem We don't provide support for py2 right now
set BUILD_FOR_PYTHON2=false
set BUILD_FOR_PYTHON3=true
)
@ -59,8 +60,6 @@ if not "%1"=="" (
)
set PYTHON_LIB_PATH=%ROOT_PATH%PythonAPI\
set PYTHON_LIB_BUILD=%PYTHON_LIB_PATH%build\
set PYTHON_LIB_DEPENDENCIES=%PYTHON_LIB_PATH%dependencies\
if %REMOVE_INTERMEDIATE% == false (
if %BUILD_FOR_PYTHON3% == false (
@ -72,17 +71,22 @@ if %REMOVE_INTERMEDIATE% == false (
)
if %REMOVE_INTERMEDIATE% == true (
rem Remove directories
for %%G in (
"%PYTHON_LIB_BUILD:/=\%",
"%PYTHON_LIB_DEPENDENCIES:/=\%",
"%PYTHON_LIB_PATH:/=\%build",
"%PYTHON_LIB_PATH:/=\%dist",
"%PYTHON_LIB_PATH:/=\%source\carla.egg-info"
) do (
if exist %%G (
echo %FILE_N% Cleaning %%G
rmdir /s/q %%G
)
)
goto good_exit
if %BUILD_FOR_PYTHON3% == false (
if %BUILD_FOR_PYTHON2% == false (
goto good_exit
)
)
)
cd "%PYTHON_LIB_PATH%"

View File

@ -29,6 +29,7 @@ clean:
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildLibCarla.bat" --clean
rebuild: setup
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat" --clean
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildLibCarla.bat" --rebuild
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildPythonAPI.bat" --rebuild