From 45f1dae560629efc915283f3fb5200d5b9ad3351 Mon Sep 17 00:00:00 2001 From: iFuSiiOnzZ Date: Fri, 24 Aug 2018 10:43:22 +0200 Subject: [PATCH] Build and launch Carla editor --- Util/BuildTools/BuildCarlaUE4.bat | 21 +++++++++++++++++++-- Util/BuildTools/Windows.mk | 5 +---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Util/BuildTools/BuildCarlaUE4.bat b/Util/BuildTools/BuildCarlaUE4.bat index c0bd7a5a0..08b84a17d 100644 --- a/Util/BuildTools/BuildCarlaUE4.bat +++ b/Util/BuildTools/BuildCarlaUE4.bat @@ -13,6 +13,8 @@ set DOC_STRING=Build LibCarla. set "USAGE_STRING=Usage: %FILE_N% [-h^|--help] [--build] [--rebuild] [--launch] [--clean]" set BUILD_CARLAUE4=false +set BUILD_CARLAUE4_EDITOR=false + set LAUNCH_UE4_EDITOR=false set REMOVE_INTERMEDIATE=false @@ -27,6 +29,10 @@ if not "%1"=="" ( set BUILD_CARLAUE4=true ) + if "%1"=="--build-editor" ( + set BUILD_CARLAUE4_EDITOR=true + ) + if "%1"=="--launch" ( set LAUNCH_UE4_EDITOR=true ) @@ -54,8 +60,10 @@ if not "%1"=="" ( if %REMOVE_INTERMEDIATE% == false ( if %LAUNCH_UE4_EDITOR% == false ( if %BUILD_CARLAUE4% == false ( - echo Nothing selected to be done. - goto :eof + if %BUILD_CARLAUE4_EDITOR% == false ( + echo Nothing selected to be done. + goto :eof + ) ) ) ) @@ -97,6 +105,15 @@ if %BUILD_CARLAUE4% == true ( start "" "%CARLA_FOLDER%Binaries\Win64\CarlaUE4.exe" ) +if %BUILD_CARLAUE4_EDITOR% == true ( + echo %FILE_N% Builing and starting Carla... + + call MsBuild.exe "%CARLA_FOLDER%CarlaUE4.sln" /m /p:configuration="Development Editor" /p:platform=Win64 + if errorlevel 1 goto error_build + + call "%CARLA_FOLDER%CarlaUE4.uproject" +) + if %LAUNCH_UE4_EDITOR% == true ( echo %FILE_N% Launching Unreal Editor... call "%CARLA_FOLDER%CarlaUE4.uproject" diff --git a/Util/BuildTools/Windows.mk b/Util/BuildTools/Windows.mk index 6e55d20a2..c867970ba 100644 --- a/Util/BuildTools/Windows.mk +++ b/Util/BuildTools/Windows.mk @@ -34,9 +34,6 @@ rebuild: setup @${CARLA_BUILD_TOOLS_FOLDER}/BuildPythonAPI.bat --rebuild @${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat --rebuild -hard-clean: clean - @echo "Not implemented!" - check: PythonAPI @echo "Not implemented!" @@ -44,7 +41,7 @@ benchmark: LibCarla @echo "Not implemented!" CarlaUE4Editor: LibCarla - @${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat --build + @${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat --build-editor .PHONY: PythonAPI PythonAPI: LibCarla