Improve user errors

Stop build if any error was found
Enable multiprocess compilation
Add BuildPythonAPI.bat to makefile
Add BOOST_ALL_NO_LIB as workaround for https://github.com/boostorg/python/issues/193
This commit is contained in:
iFuSiiOnzZ 2018-07-31 16:35:02 +02:00
parent c983966c2a
commit 6e6a69dd92
9 changed files with 216 additions and 105 deletions

View File

@ -36,7 +36,7 @@ def get_libcarla_extensions():
libraries += ["boost_python"]
elif os.name == "nt":
pwd = os.path.dirname(os.path.realpath(__file__))
pylib = "libboost_python%d%d-vc141-mt-x64-1_68.lib" % (sys.version_info.major, sys.version_info.minor)
pylib = "libboost_python%d%d-vc141-mt-x64-1_67.lib" % (sys.version_info.major, sys.version_info.minor)
extra_link_args = [
'shlwapi.lib',
@ -44,7 +44,7 @@ def get_libcarla_extensions():
os.path.join(pwd, 'dependencies/lib', pylib)]
# https://docs.microsoft.com/es-es/cpp/porting/modifying-winver-and-win32-winnt
extra_compile_args = ['/DPYTHON3X', '/DBOOST_PYTHON_STATIC_LIB','/DBOOST_ERROR_CODE_HEADER_ONLY', '/D_WIN32_WINNT=0x0501' ]
extra_compile_args = ['/DPYTHON3X', '/DBOOST_ALL_NO_LIB', '/DBOOST_PYTHON_STATIC_LIB','/DBOOST_ERROR_CODE_HEADER_ONLY', '/D_WIN32_WINNT=0x0501' ]
extra_link_args += []
else:
raise NotImplementedError

View File

@ -3,13 +3,13 @@
setlocal
set LOCAL_PATH=%~dp0
set FILE_N=%~n0%~x0
set "FILE_N=-[%~n0]:"
rem ============================================================================
rem -- Parse arguments ---------------------------------------------------------
rem ============================================================================
set "FILE_N= -[%~n0]:"
set DOC_STRING=Build LibCarla.
set "USAGE_STRING=Usage: %FILE_N% [-h^|--help] [--build] [--rebuild] [--launch] [--clean] [--hard-clean]"
@ -76,10 +76,17 @@ set CARLA_FOLDER=%ROOT_PATH%Unreal\CarlaUE4\
pushd "%CARLA_FOLDER%"
if %REMOVE_INTERMEDIATE% == true (
echo %FILE_N% cleaning carla folder
echo.
echo %FILE_N% cleaning "%CARLA_FOLDER%Binaries"
if exist "%CARLA_FOLDER%Binaries" rmdir /S /Q "%CARLA_FOLDER%Binaries"
echo %FILE_N% cleaning "%CARLA_FOLDER%Intermediate"
if exist "%CARLA_FOLDER%Intermediate" rmdir /S /Q "%CARLA_FOLDER%Intermediate"
echo %FILE_N% cleaning "%CARLA_FOLDER%Plugins\Carla\Binaries"
if exist "%CARLA_FOLDER%Plugins\Carla\Binaries" rmdir /S /Q "%CARLA_FOLDER%Plugins\Carla\Binaries"
echo %FILE_N% cleaning "%CARLA_FOLDER%Plugins\Carla\Intermediate"
if exist "%CARLA_FOLDER%Plugins\Carla\Intermediate" rmdir /S /Q "%CARLA_FOLDER%Plugins\Carla\Intermediate"
)
@ -97,4 +104,6 @@ if %LAUNCH_UE4_EDITOR% == true (
call "%CARLA_FOLDER%CarlaUE4.uproject"
)
goto :eof
rem ============================================================================
rem -- Messages and Errors -----------------------------------------------------
rem ============================================================================

View File

@ -1,9 +1,11 @@
@echo off
setlocal
rem BAT script that creates the client and the server of LibCarla (carla.org).
rem Run it through a cmd with the x64 Visual C++ Toolset enabled.
set LOCAL_PATH=%~dp0
set "FILE_N= -[%~n0]:"
set "FILE_N=-[%~n0]:"
rem ============================================================================
rem -- Parse arguments ---------------------------------------------------------
@ -69,9 +71,13 @@ 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 build folder
if exist "%INSTALLATION_DIR%" rmdir /S /Q "%INSTALLATION_DIR%"
echo.
echo %FILE_N% Cleaning "%LIBCARLA_SERVER_INSTALL_PATH%"
if exist "%LIBCARLA_SERVER_INSTALL_PATH%" rmdir /S /Q "%LIBCARLA_SERVER_INSTALL_PATH%"
echo %FILE_N% Cleaning "%LIBCARLA_CLIENT_INSTALL_PATH%"
if exist "%LIBCARLA_CLIENT_INSTALL_PATH%" rmdir /S /Q "%LIBCARLA_CLIENT_INSTALL_PATH%"
)
if not exist "%LIBCARLA_VSPROJECT_PATH%" mkdir "%LIBCARLA_VSPROJECT_PATH%"
@ -80,13 +86,58 @@ cd "%LIBCARLA_VSPROJECT_PATH%"
rem Build libcarla server
rem
if %BUILD_SERVER% == true if not exist "%LIBCARLA_SERVER_INSTALL_PATH%" (
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Server -DCMAKE_CXX_FLAGS_RELEASE=/MD -DCMAKE_INSTALL_PREFIX=%LIBCARLA_SERVER_INSTALL_PATH% %ROOT_PATH%
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Server -DCMAKE_CXX_FLAGS_RELEASE="/MD /MP" -DCMAKE_INSTALL_PREFIX=%LIBCARLA_SERVER_INSTALL_PATH% %ROOT_PATH%
if %errorlevel% neq 0 goto error_cmake
cmake --build . --config Release --target install
if %errorlevel% neq 0 goto error_install
)
rem Build libcarla client
rem
if %BUILD_CLIENT% == true if not exist "%LIBCARLA_CLIENT_INSTALL_PATH%" (
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Client -DCMAKE_CXX_FLAGS_RELEASE=/MD -DCMAKE_INSTALL_PREFIX=%LIBCARLA_CLIENT_INSTALL_PATH% %ROOT_PATH%
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Client -DCMAKE_CXX_FLAGS_RELEASE="/MD /MP" -DCMAKE_INSTALL_PREFIX=%LIBCARLA_CLIENT_INSTALL_PATH% %ROOT_PATH%
if %errorlevel% neq 0 goto error_cmake
cmake --build . --config Release --target install
if %errorlevel% neq 0 goto error_install
)
goto success
rem ============================================================================
rem -- Messages and Errors -----------------------------------------------------
rem ============================================================================
:success
echo.
if %BUILD_SERVER% == true echo %FILE_N% LibCarla client has been successfully installed in "%LIBCARLA_SERVER_INSTALL_PATH%"!
if %BUILD_CLIENT% == true echo %FILE_N% LibCarla client has been successfully installed in "%LIBCARLA_CLIENT_INSTALL_PATH%"!
goto good_exit
:error_cmake
echo.
echo %FILE_N% [CMAKE ERROR] An error ocurred while executing the cmake.
echo %FILE_N% [CMAKE ERROR] Possible causes:
echo %FILE_N% - Make sure "CMake" is installed.
echo %FILE_N% - Make sure it is available on your Windows "path".
echo %FILE_N% - CMake 3.9.0 or higher is required.
goto bad_exit
:error_install
echo.
echo %FILE_N% [Visual Studio 15 2017 Win64 ERROR] An error ocurred while installing using Visual Studio 15 2017 Win64.
echo %FILE_N% [Visual Studio 15 2017 Win64 ERROR] Possible causes:
echo %FILE_N% - Make sure you have Visual Studio installed.
echo %FILE_N% - Make sure you have the "x64 Visual C++ Toolset" in your path.
echo %FILE_N% For example using the "Visual Studio x64 Native Tools Command Prompt",
echo %FILE_N% or the "vcvarsall.bat".
goto bad_exit
:good_exit
endlocal
exit /b 0
:bad_exit
endlocal
exit /b %errorlevel%

View File

@ -1,9 +1,15 @@
@echo off
setlocal
rem BAT script that creates the client python api of LibCarla (carla.org).
rem Run it through a cmd with the x64 Visual C++ Toolset enabled.
set LOCAL_PATH=%~dp0
set "FILE_N= -[%~n0]:"
set "FILE_N=-[%~n0]:"
rem ============================================================================
rem -- Parse arguments ---------------------------------------------------------
rem ============================================================================
set DOC_STRING=Build and package CARLA Python API.
set "USAGE_STRING=Usage: %FILE_N% [-h^|--help] [--rebuild] [--clean]"
@ -62,21 +68,69 @@ if %REMOVE_INTERMEDIATE% == false (
)
)
if %REMOVE_INTERMEDIATE% == true (
echo.
echo %FILE_N% Cleaning "%PYTHON_LIB_BUILD%"
if exist "%PYTHON_LIB_BUILD%" rmdir /S /Q "%PYTHON_LIB_BUILD%"
echo %FILE_N% Cleaning "%PYTHON_LIB_DEPENDENCIES%"
if exist "%PYTHON_LIB_DEPENDENCIES%" rmdir /S /Q "%PYTHON_LIB_DEPENDENCIES%"
echo %FILE_N% Cleaning "%PYTHON_LIB_PATH%\dist"
if exist "%PYTHON_LIB_PATH%\dist" rmdir /S /Q "%PYTHON_LIB_PATH%\dist"
)
cd "%PYTHON_LIB_PATH%"
if %REMOVE_INTERMEDIATE% == true (
echo %FILE_N% cleaning build folder
if exist "%PYTHON_LIB_BUILD%" rmdir /S /Q "%PYTHON_LIB_BUILD%"
if exist "%PYTHON_LIB_DEPENDENCIES%" rmdir /S /Q "%PYTHON_LIB_DEPENDENCIES%"
)
rem ============================================================================
rem -- Check for py ------------------------------------------------------------
rem ============================================================================
where py 1>nul
if %errorlevel% neq 0 goto error_py
rem Build for Python 2
rem
if %BUILD_FOR_PYTHON2%==true (
echo Building Python API for Python 2.
call py -2 setup.py bdist_egg
goto py2_not_supported
)
rem Build for Python 2
rem
if %BUILD_FOR_PYTHON3%==true (
echo Building Python API for Python 3.
call py -3 setup.py bdist_egg
)
goto success
rem ============================================================================
rem -- Messages and Errors -----------------------------------------------------
rem ============================================================================
:success
echo.
if %BUILD_FOR_PYTHON3%==true echo %FILE_N% Carla lib for python has been successfully installed in "%PYTHON_LIB_PATH%\dist"!
goto good_exit
:py2_not_supported
echo.
echo %FILE_N% Python 2 is not currently suported in Windows.
goto bad_exit
:error_py
echo.
echo %FILE_N% [PY ERROR] An error ocurred while executing the py.
echo %FILE_N% [PY ERROR] Possible causes:
echo %FILE_N% - Make sure "py" is installed.
echo %FILE_N% - Make sure it is available on your Windows "py".
goto bad_exit
:good_exit
endlocal
exit /b 0
:bad_exit
endlocal
exit /b %errorlevel%

View File

@ -1,12 +1,19 @@
@echo off
setlocal
rem BAT script that downloads and generates
rem rpclib, gtest and boost libraries for CARLA (carla.org).
rem Run it through a cmd with the x64 Visual C++ Toolset enabled.
set LOCAL_PATH=%~dp0
set "FILE_N=-[%~n0]:"
rem ============================================================================
rem -- Check for compiler ------------------------------------------------------
rem ============================================================================
where cl
if errorlevel 1 goto error_cl
if %errorlevel% neq 0 goto error_cl
rem TODO: check for x64 and not x86 or x64_x86
@ -14,9 +21,6 @@ rem ============================================================================
rem -- Parse arguments ---------------------------------------------------------
rem ============================================================================
set LOCAL_PATH=%~dp0
set "FILE_N=-[%~n0]:"
set INSTALLERS_DIR=%ROOT_PATH%Util\InstallersWin\
set VERSION_FILE=%ROOT_PATH%Util\ContentVersions.txt
set CONTENT_DIR=%ROOT_PATH%Unreal\CarlaUE4\Content
@ -171,41 +175,37 @@ rem ============================================================================
:success
echo.
echo %FILE_N%
echo ###########
echo # SUCCESS #
echo ###########
echo ###########
echo # SUCCESS #
echo ###########
echo.
echo IMPORTANT!
echo IMPORTANT!
echo.
echo All the CARLA library dependences should be installed now.
echo (You can remove all "*-src" folders in %INSTALLATION_DIR% directory)
echo All the CARLA library dependences should be installed now.
echo (You can remove all "*-src" folders in %INSTALLATION_DIR% directory)
echo.
echo You only need the ASSET PACK with all the meshes and textures.
echo You only need the ASSET PACK with all the meshes and textures.
echo.
echo This script provides the assets for CARLA %ASSETS_VERSION%
echo You can download the assets from here:
echo This script provides the assets for CARLA %ASSETS_VERSION%
echo You can download the assets from here:
echo.
echo %URL%
echo %URL%
echo.
echo If you want another version, search it in %VERSION_FILE%.
echo.
echo Unzip it in the "%CONTENT_DIR%" folder.
echo After that, please run the "Rebuild.bat".
goto eof
echo Unzip it in the "%CONTENT_DIR%" folder.
echo If you want another version, search it in %VERSION_FILE%.
goto good_exit
:help
echo Download and compiles all the necessary libraries to build CARLA.
echo.
echo Commands:
echo -h, --help -^> Shows this dialog.
echo -j ^<N^> -^> N is the integer number of async jobs while compiling (default=1).
echo --boost-toolset [T] -^> Toolset corresponding to your compiler ^(default=^*^):
echo -h, --help -^> Shows this dialog.
echo -j ^<N^> -^> N is the integer number of async jobs while compiling (default=1).
echo --boost-toolset [T] -^> Toolset corresponding to your compiler ^(default=^*^):
echo Visual Studio 2013 -^> msvc-12.0
echo Visual Studio 2015 -^> msvc-14.0
echo Visual Studio 2017 -^> msvc-14.1 *
goto eof
goto good_exit
:error_cl
echo.
@ -218,20 +218,21 @@ rem ============================================================================
:failed
echo.
echo %FILE_N%
echo Ok, and error ocurred, don't panic!
echo We have different platforms where you can find some help :)
echo Ok, and error ocurred, don't panic!
echo We have different platforms where you can find some help :)
echo.
echo - Make sure you have read the documentation:
echo http://carla.readthedocs.io/en/latest/how_to_build_on_windows/
echo - Make sure you have read the documentation:
echo http://carla.readthedocs.io/en/latest/how_to_build_on_windows/
echo.
echo - If the problem persists, you can ask on our Github's "Building on Windows" issue:
echo https://github.com/carla-simulator/carla/issues/21
echo - If the problem persists, you can ask on our Github's "Building on Windows" issue:
echo https://github.com/carla-simulator/carla/issues/21
echo.
echo - Or just use our Discord channel!
echo We'll be glad to help you there :)
echo https://discord.gg/42KJdRj
goto :eof
:eof
echo - Or just use our Discord channel!
echo We'll be glad to help you there :)
echo https://discord.gg/42KJdRj
endlocal
exit /b %errorlevel%
:good_exit
endlocal
exit /b 0

View File

@ -18,14 +18,17 @@ package: CarlaUE4Editor PythonAPI
@echo "Not implemented!"
docs:
@echo "Not implemented!"
@doxygen
@echo "Documentation index at ./Doxygen/html/index.html"
clean:
@${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat --clean
@${CARLA_BUILD_TOOLS_FOLDER}/BuildPythonAPI.bat --clean
@${CARLA_BUILD_TOOLS_FOLDER}/BuildLibCarla.bat --clean
rebuild: setup
@${CARLA_BUILD_TOOLS_FOLDER}/BuildLibCarla.bat --rebuild
@${CARLA_BUILD_TOOLS_FOLDER}/BuildPythonAPI.bat --rebuild
@${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat --rebuild
hard-clean: clean
@ -49,7 +52,7 @@ LibCarla: setup
@${CARLA_BUILD_TOOLS_FOLDER}\BuildLibCarla.bat --server --client
setup:
@${CARLA_BUILD_TOOLS_FOLDER}\Setup.bat -j 8 --boost-toolset msvc-14.1
@${CARLA_BUILD_TOOLS_FOLDER}\Setup.bat --boost-toolset msvc-14.1
pretty:
@echo "Not implemented!"

View File

@ -1,11 +1,10 @@
@echo off
setlocal
rem BAT script that downloads and installs a ready to use
rem boost build for CARLA (carla.org).
rem Just put it in `Util/Build` and run it.
setlocal
set LOCAL_PATH=%~dp0
set "FILE_N= -[%~n0]:"
@ -27,9 +26,14 @@ if not "%1"=="" (
goto :arg-parse
)
rem If not set set the build dir to the current dir
if [%BUILD_DIR%] == [] set BUILD_DIR=.
rem If not definned use Visual Studio 2017 as tool set
if [%B_TOOLSET%] == [] set B_TOOLSET=msvc-14.1
if [%NUMBER_OF_ASYNC_JOBS%] == [] set NUMBER_OF_ASYNC_JOBS=1
rem If is not set set the number of parallel jobs to the number of CPU threads
if [%NUMBER_OF_ASYNC_JOBS%] == [] set NUMBER_OF_ASYNC_JOBS=%NUMBER_OF_PROCESSORS%
set B_VERSION=boost-1.67.0
set B_SRC=boost-src
@ -46,11 +50,8 @@ if not exist "%B_SRC_DIR%" (
echo %FILE_N% Cloning Boost - version "%B_VERSION%"...
echo.
rem call git clone --depth=1 -b %B_VERSION% --recurse-submodules -j8 https://github.com/boostorg/boost.git %B_SRC_DIR%
rem clone master as there is bug in 1.67 related to python boost (https://github.com/boostorg/python/issues/193)
call git clone --depth=1 --recurse-submodules -j8 https://github.com/boostorg/boost.git %B_SRC_DIR%
if errorlevel 1 goto error_git
call git clone --depth=1 -b %B_VERSION% --recurse-submodules -j%NUMBER_OF_ASYNC_JOBS% https://github.com/boostorg/boost.git %B_SRC_DIR%
if %errorlevel% neq 0 goto error_git
) else (
echo %FILE_N% Not cloning boost because already exists a folder called "%B_SRC%".
)
@ -61,13 +62,13 @@ if not exist "b2.exe" (
call bootstrap.bat
)
if errorlevel 1 goto error_bootstrap
if %errorlevel% neq 0 goto error_bootstrap
echo %FILE_N% Packing headers...
b2 headers link=static
echo %FILE_N% Building...
b2 -j8^
b2 -j%NUMBER_OF_ASYNC_JOBS%^
headers^
--layout=versioned^
--build-dir=./build^
@ -82,18 +83,15 @@ b2 -j8^
--libdir="%B_LIB_DIR%"^
--includedir="%B_INSTALL_DIR%"^
install
if errorlevel 1 goto error_install
if %errorlevel% neq 0 goto error_install
for /d %%i in ("%B_INSTALL_DIR%\boost-*") do rename "%%i" include
cd "%BUILD_DIR%"
rem Remove the downloaded protobuf source because is no more needed
rem if you want to keep the source just delete the following command.
rem @rd /s /q %B_SRC_DIR%
goto success
rem ============================================================================
rem -- Messages and Errors -----------------------------------------------------
rem ============================================================================
:success
echo.
echo %FILE_N% Boost has been successfully installed in "%B_INSTALL_DIR%"!
@ -126,10 +124,10 @@ goto success
echo %FILE_N% Exiting...
endlocal
set install_boost=done
goto:EOF
exit /b 0
:bad_exit
if exist "%B_INSTALL_DIR%" rd /s /q "%B_INSTALL_DIR%"
echo %FILE_N% Exiting with error...
endlocal
goto:EOF
exit /b %errorlevel%

View File

@ -1,11 +1,10 @@
@echo off
setlocal
rem BAT script that downloads and installs a ready to use
rem Google Test build for CARLA (carla.org).
rem Run it through a cmd with the x64 Visual C++ Toolset enabled.
setlocal
set LOCAL_PATH=%~dp0
set "FILE_N= -[%~n0]:"
@ -43,8 +42,7 @@ if not exist "%GT_SRC_DIR%" (
echo.
call git clone --depth=1 -b %GT_VERSION% https://github.com/google/googletest.git %GT_SRC_DIR%
if errorlevel 1 goto error_git
echo.
if %errorlevel% neq 0 goto error_git
) else (
echo %FILE_N% Not cloning Google Test because already exists a folder called "%GT_SRC%".
)
@ -55,21 +53,20 @@ if not exist "%GT_BUILD_DIR%" (
)
cd "%GT_BUILD_DIR%"
echo %FILE_N% Generating build...
cmake .. -G "Visual Studio 15 2017 Win64"^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_CXX_FLAGS_RELEASE=/MD^
-DCMAKE_CXX_FLAGS_RELEASE="/MD /MP"^
-DCMAKE_INSTALL_PREFIX=%GT_INSTALL_DIR%^
-DCMAKE_CXX_FLAGS=/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING^
%GT_SRC_DIR%
if errorlevel 1 goto error_cmake
if %errorlevel% neq 0 goto error_cmake
echo %FILE_N% Building...
cmake --build . --config Release --target install
if errorlevel 1 goto error_install
if errorlevel neq 0 goto error_install
rem Remove the downloaded Google Test source because is no more needed
if %DEL_SRC% == true (
@ -110,8 +107,8 @@ rem ============================================================================
:error_install
echo.
echo %FILE_N% [NMAKE ERROR] An error ocurred while installing using NMake.
echo %FILE_N% [NMAKE ERROR] Possible causes:
echo %FILE_N% [Visual Studio 15 2017 Win64 ERROR] An error ocurred while installing using Visual Studio 15 2017 Win64.
echo %FILE_N% [Visual Studio 15 2017 Win64 ERROR] Possible causes:
echo %FILE_N% - Make sure you have Visual Studio installed.
echo %FILE_N% - Make sure you have the "x64 Visual C++ Toolset" in your path.
echo %FILE_N% For example using the "Visual Studio x64 Native Tools Command Prompt",
@ -122,10 +119,10 @@ rem ============================================================================
echo %FILE_N% Exiting...
endlocal
set install_gtest=done
goto:EOF
exit /b 0
:bad_exit
if exist "%GT_INSTALL_DIR%" rd /s /q "%GT_INSTALL_DIR%"
echo %FILE_N% Exiting with error...
endlocal
goto:EOF
exit /b %errorlevel%

View File

@ -1,11 +1,10 @@
@echo off
setlocal
rem BAT script that downloads and installs a ready to use
rem rpclib build for CARLA (carla.org).
rem Run it through a cmd with the x64 Visual C++ Toolset enabled.
setlocal
set LOCAL_PATH=%~dp0
set "FILE_N= -[%~n0]:"
@ -43,8 +42,7 @@ if not exist "%RPC_SRC_DIR%" (
echo.
call git clone --depth=1 -b %RPC_VERSION% https://github.com/rpclib/rpclib.git %RPC_SRC_DIR%
if errorlevel 1 goto error_git
echo.
if %errorlevel% neq 0 goto error_git
) else (
echo %FILE_N% Not cloning rpclib because already exists a folder called "%RPC_SRC%".
)
@ -60,15 +58,15 @@ echo %FILE_N% Generating build...
cmake .. -G "Visual Studio 15 2017 Win64"^
-DCMAKE_BUILD_TYPE=Release^
-RPCLIB_BUILD_EXAMPLES=OFF^
-DCMAKE_CXX_FLAGS_RELEASE=/MD^
-DCMAKE_CXX_FLAGS_RELEASE="/MD /MP"^
-DCMAKE_INSTALL_PREFIX=%RPC_INSTALL_DIR%^
%RPC_SRC_DIR%
if errorlevel 1 goto error_cmake
if %errorlevel% neq 0 goto error_cmake
echo %FILE_N% Building...
cmake --build . --config Release --target install
if errorlevel 1 goto error_install
if %errorlevel% neq 0 goto error_install
rem Remove the downloaded rpclib source because is no more needed
if %DEL_SRC% == true (
@ -110,8 +108,8 @@ rem ============================================================================
:error_install
echo.
echo %FILE_N% [NMAKE ERROR] An error ocurred while installing using NMake.
echo %FILE_N% [NMAKE ERROR] Possible causes:
echo %FILE_N% [Visual Studio 15 2017 Win64 ERROR] An error ocurred while installing using Visual Studio 15 2017 Win64.
echo %FILE_N% [Visual Studio 15 2017 Win64 ERROR] Possible causes:
echo %FILE_N% - Make sure you have Visual Studio installed.
echo %FILE_N% - Make sure you have the "x64 Visual C++ Toolset" in your path.
echo %FILE_N% For example using the "Visual Studio x64 Native Tools Command Prompt",
@ -122,10 +120,10 @@ rem ============================================================================
echo %FILE_N% Exiting...
endlocal
set install_rpclib=done
goto:EOF
exit /b 0
:bad_exit
if exist "%RPC_INSTALL_DIR%" rd /s /q "%RPC_INSTALL_DIR%"
echo %FILE_N% Exiting with error...
endlocal
goto:EOF
exit /b %errorlevel%