diff --git a/build.cmd b/build.cmd index ef65e935b..43a28c7e4 100644 --- a/build.cmd +++ b/build.cmd @@ -46,9 +46,8 @@ if ERRORLEVEL 1 ( ) REM //---------- get rpclib ---------- -set RPC_VERSION=c4fb37acbe67ec99e47e5187acd2a7450bde0cec IF NOT EXIST external\rpclib mkdir external\rpclib -IF NOT EXIST external\rpclib\rpclib-%RPC_VERSION% ( +IF NOT EXIST external\rpclib\rpclib-2.2.1 ( REM //leave some blank lines because powershell shows download banner at top of console ECHO( ECHO( @@ -57,7 +56,7 @@ IF NOT EXIST external\rpclib\rpclib-%RPC_VERSION% ( ECHO Downloading rpclib ECHO ***************************************************************************************** @echo on - powershell -command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr https://github.com/qchateau/rpclib/archive/%RPC_VERSION%.zip -OutFile external\rpclib.zip }" + powershell -command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr https://github.com/madratman/rpclib/archive/v2.2.1.zip -OutFile external\rpclib.zip }" @echo off REM //remove any previous versions @@ -68,7 +67,7 @@ IF NOT EXIST external\rpclib\rpclib-%RPC_VERSION% ( REM //Don't fail the build if the high-poly car is unable to be downloaded REM //Instead, just notify users that the gokart will be used. - IF NOT EXIST external\rpclib\rpclib-%RPC_VERSION% ( + IF NOT EXIST external\rpclib\rpclib-2.2.1 ( ECHO Unable to download high-polycount SUV. Your AirSim build will use the default vehicle. goto :buildfailed ) @@ -76,8 +75,8 @@ IF NOT EXIST external\rpclib\rpclib-%RPC_VERSION% ( REM //---------- Build rpclib ------------ ECHO Starting cmake to build rpclib... -IF NOT EXIST external\rpclib\rpclib-%RPC_VERSION%\build mkdir external\rpclib\rpclib-%RPC_VERSION%\build -cd external\rpclib\rpclib-%RPC_VERSION%\build +IF NOT EXIST external\rpclib\rpclib-2.2.1\build mkdir external\rpclib\rpclib-2.2.1\build +cd external\rpclib\rpclib-2.2.1\build REM cmake -G"Visual Studio 14 2015 Win64" .. cmake -G"Visual Studio 16 2019" .. @@ -98,15 +97,15 @@ set RPCLIB_TARGET_LIB=AirLib\deps\rpclib\lib\x64 if NOT exist %RPCLIB_TARGET_LIB% mkdir %RPCLIB_TARGET_LIB% set RPCLIB_TARGET_INCLUDE=AirLib\deps\rpclib\include if NOT exist %RPCLIB_TARGET_INCLUDE% mkdir %RPCLIB_TARGET_INCLUDE% -robocopy /MIR external\rpclib\rpclib-%RPC_VERSION%\include %RPCLIB_TARGET_INCLUDE% +robocopy /MIR external\rpclib\rpclib-2.2.1\include %RPCLIB_TARGET_INCLUDE% if "%buildMode%" == "--Debug" ( -robocopy /MIR external\rpclib\rpclib-%RPC_VERSION%\build\Debug %RPCLIB_TARGET_LIB%\Debug +robocopy /MIR external\rpclib\rpclib-2.2.1\build\Debug %RPCLIB_TARGET_LIB%\Debug ) else if "%buildMode%" == "--Release" ( -robocopy /MIR external\rpclib\rpclib-%RPC_VERSION%\build\Release %RPCLIB_TARGET_LIB%\Release +robocopy /MIR external\rpclib\rpclib-2.2.1\build\Release %RPCLIB_TARGET_LIB%\Release ) else ( -robocopy /MIR external\rpclib\rpclib-%RPC_VERSION%\build\Debug %RPCLIB_TARGET_LIB%\Debug -robocopy /MIR external\rpclib\rpclib-%RPC_VERSION%\build\Release %RPCLIB_TARGET_LIB%\Release +robocopy /MIR external\rpclib\rpclib-2.2.1\build\Debug %RPCLIB_TARGET_LIB%\Debug +robocopy /MIR external\rpclib\rpclib-2.2.1\build\Release %RPCLIB_TARGET_LIB%\Release ) REM //---------- get High PolyCount SUV Car Model ------------ diff --git a/build.sh b/build.sh index c298a6c17..952b73965 100755 --- a/build.sh +++ b/build.sh @@ -10,8 +10,7 @@ set -x function version_less_than_equal_to() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" = "$1"; } # check for rpclib -RPC_VERSION=c4fb37acbe67ec99e47e5187acd2a7450bde0cec -if [ ! -d "./external/rpclib/rpclib-${RPC_VERSION}" ]; then +if [ ! -d "./external/rpclib/rpclib-2.2.1" ]; then echo "ERROR: new version of AirSim requires newer rpclib." echo "please run setup.sh first and then run build.sh again." exit 1 @@ -79,7 +78,7 @@ cp $build_dir/output/lib/librpc.a AirLib/deps/rpclib/lib/librpc.a # Update AirLib/lib, AirLib/deps, Plugins folders with new binaries rsync -a --delete $build_dir/output/lib/ AirLib/lib/x64/Debug -rsync -a --delete external/rpclib/rpclib-${RPC_VERSION}/include AirLib/deps/rpclib +rsync -a --delete external/rpclib/rpclib-2.2.1/include AirLib/deps/rpclib rsync -a --delete MavLinkCom/include AirLib/deps/MavLinkCom rsync -a --delete AirLib Unreal/Plugins/AirSim/Source diff --git a/cmake/cmake-modules/CommonSetup.cmake b/cmake/cmake-modules/CommonSetup.cmake index a2b029d5d..ff6714576 100644 --- a/cmake/cmake-modules/CommonSetup.cmake +++ b/cmake/cmake-modules/CommonSetup.cmake @@ -37,7 +37,7 @@ macro(CommonSetup) SET(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) #setup include and lib for rpclib which will be referenced by other projects - set(RPCLIB_VERSION_FOLDER rpclib-c4fb37acbe67ec99e47e5187acd2a7450bde0cec) + set(RPCLIB_VERSION_FOLDER rpclib-2.2.1) set(RPC_LIB_INCLUDES " ${AIRSIM_ROOT}/external/rpclib/${RPCLIB_VERSION_FOLDER}/include") #name of .a file with lib prefix set(RPC_LIB rpc) diff --git a/setup.sh b/setup.sh index a9dccecdf..614297599 100755 --- a/setup.sh +++ b/setup.sh @@ -119,13 +119,12 @@ fi # End USB setup, CMake install # Download rpclib -RPC_VERSION=c4fb37acbe67ec99e47e5187acd2a7450bde0cec -if [ ! -d "external/rpclib/rpclib-${RPC_VERSION}" ]; then +if [ ! -d "external/rpclib/rpclib-2.2.1" ]; then echo "*********************************************************************************************" echo "Downloading rpclib..." echo "*********************************************************************************************" - wget https://github.com/qchateau/rpclib/archive/${RPC_VERSION}.zip -O rpclib.zip + wget https://github.com/madratman/rpclib/archive/v2.2.1.zip # remove previous versions rm -rf "external/rpclib"