From 2362d76c6ebe3404284f760a6d116db8f07900fb Mon Sep 17 00:00:00 2001 From: Rajat Singhal Date: Fri, 30 Apr 2021 08:38:52 +0530 Subject: [PATCH] Update rpclib release to 2.3.0 --- build.cmd | 27 ++++++++++++++------------- build.sh | 5 +++-- setup.sh | 8 ++++---- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/build.cmd b/build.cmd index efc7395e7..9b84378ac 100644 --- a/build.cmd +++ b/build.cmd @@ -64,7 +64,9 @@ if ERRORLEVEL 1 ( REM //---------- get rpclib ---------- IF NOT EXIST external\rpclib mkdir external\rpclib -IF NOT EXIST external\rpclib\rpclib-2.2.1 ( + +set RPC_VERSION_FOLDER=rpclib-2.3.0 +IF NOT EXIST external\rpclib\%RPC_VERSION_FOLDER% ( REM //leave some blank lines because %powershell% shows download banner at top of console ECHO( ECHO( @@ -74,9 +76,9 @@ IF NOT EXIST external\rpclib\rpclib-2.2.1 ( ECHO ***************************************************************************************** @echo on if "%PWSHV7%" == "" ( - %powershell% -command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr https://github.com/madratman/rpclib/archive/v2.2.1.zip -OutFile external\rpclib.zip }" + %powershell% -command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr https://github.com/rpclib/rpclib/archive/v2.3.0.zip -OutFile external\rpclib.zip }" ) else ( - %powershell% -command "iwr https://github.com/madratman/rpclib/archive/v2.2.1.zip -OutFile external\rpclib.zip" + %powershell% -command "iwr https://github.com/rpclib/rpclib/archive/v2.3.0.zip -OutFile external\rpclib.zip" ) @echo off @@ -86,18 +88,17 @@ IF NOT EXIST external\rpclib\rpclib-2.2.1 ( %powershell% -command "Expand-Archive -Path external\rpclib.zip -DestinationPath external\rpclib" del external\rpclib.zip /q - 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-2.2.1 ( - ECHO Unable to download high-polycount SUV. Your AirSim build will use the default vehicle. + REM //Fail the build if unable to download rpclib + IF NOT EXIST external\rpclib\%RPC_VERSION_FOLDER% ( + ECHO Unable to download rpclib, stopping build goto :buildfailed ) ) REM //---------- Build rpclib ------------ ECHO Starting cmake to build rpclib... -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 +IF NOT EXIST external\rpclib\%RPC_VERSION_FOLDER%\build mkdir external\rpclib\%RPC_VERSION_FOLDER%\build +cd external\rpclib\%RPC_VERSION_FOLDER%\build cmake -G"Visual Studio 16 2019" .. if "%buildMode%" == "" ( @@ -115,13 +116,13 @@ 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-2.2.1\include %RPCLIB_TARGET_INCLUDE% +robocopy /MIR external\rpclib\%RPC_VERSION_FOLDER%\include %RPCLIB_TARGET_INCLUDE% if "%buildMode%" == "" ( -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 +robocopy /MIR external\rpclib\%RPC_VERSION_FOLDER%\build\Debug %RPCLIB_TARGET_LIB%\Debug +robocopy /MIR external\rpclib\%RPC_VERSION_FOLDER%\build\Release %RPCLIB_TARGET_LIB%\Release ) else ( -robocopy /MIR external\rpclib\rpclib-2.2.1\build\%buildMode% %RPCLIB_TARGET_LIB%\%buildMode% +robocopy /MIR external\rpclib\%RPC_VERSION_FOLDER%\build\%buildMode% %RPCLIB_TARGET_LIB%\%buildMode% ) REM //---------- get High PolyCount SUV Car Model ------------ diff --git a/build.sh b/build.sh index 8c4c5fe8b..4336fd67f 100755 --- a/build.sh +++ b/build.sh @@ -26,7 +26,8 @@ done function version_less_than_equal_to() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" = "$1"; } # check for rpclib -if [ ! -d "./external/rpclib/rpclib-2.2.1" ]; then +RPC_VERSION_FOLDER="rpclib-2.3.0" +if [ ! -d "./external/rpclib/$RPC_VERSION_FOLDER" ]; then echo "ERROR: new version of AirSim requires newer rpclib." echo "please run setup.sh first and then run build.sh again." exit 1 @@ -108,7 +109,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/$folder_name -rsync -a --delete external/rpclib/rpclib-2.2.1/include AirLib/deps/rpclib +rsync -a --delete external/rpclib/$RPC_VERSION_FOLDER/include AirLib/deps/rpclib rsync -a --delete MavLinkCom/include AirLib/deps/MavLinkCom rsync -a --delete AirLib Unreal/Plugins/AirSim/Source rm -rf Unreal/Plugins/AirSim/Source/AirLib/src diff --git a/setup.sh b/setup.sh index f1c2eca30..18daf4c07 100755 --- a/setup.sh +++ b/setup.sh @@ -123,19 +123,19 @@ fi # End USB setup, CMake install # Download rpclib -if [ ! -d "external/rpclib/rpclib-2.2.1" ]; then +if [ ! -d "external/rpclib/rpclib-2.3.0" ]; then echo "*********************************************************************************************" echo "Downloading rpclib..." echo "*********************************************************************************************" - wget https://github.com/madratman/rpclib/archive/v2.2.1.zip + wget https://github.com/rpclib/rpclib/archive/v2.3.0.zip # remove previous versions rm -rf "external/rpclib" mkdir -p "external/rpclib" - unzip -q v2.2.1.zip -d external/rpclib - rm v2.2.1.zip + unzip -q v2.3.0.zip -d external/rpclib + rm v2.3.0.zip fi # Download high-polycount SUV model