diff --git a/AirLib/include/vehicles/car/api/CarRpcLibServer.hpp b/AirLib/include/vehicles/car/api/CarRpcLibServer.hpp index fa2e8f737..41388374d 100644 --- a/AirLib/include/vehicles/car/api/CarRpcLibServer.hpp +++ b/AirLib/include/vehicles/car/api/CarRpcLibServer.hpp @@ -28,8 +28,8 @@ namespace airlib return static_cast(RpcLibServerBase::getVehicleApi(vehicle_name)); } }; - -#endif } } //namespace -#endif \ No newline at end of file + +#endif +#endif diff --git a/AirLib/include/vehicles/computervision/api/ComputerVisionRpcLibServer.hpp b/AirLib/include/vehicles/computervision/api/ComputerVisionRpcLibServer.hpp index c0ecb9c44..644f2cb55 100644 --- a/AirLib/include/vehicles/computervision/api/ComputerVisionRpcLibServer.hpp +++ b/AirLib/include/vehicles/computervision/api/ComputerVisionRpcLibServer.hpp @@ -28,8 +28,8 @@ namespace msr return static_cast(RpcLibServerBase::getVehicleApi(vehicle_name)); } }; - -#endif } } //namespace -#endif \ No newline at end of file + +#endif +#endif diff --git a/Unreal/Plugins/AirSim/Source/Annotation/AnnotationComponent.cpp b/Unreal/Plugins/AirSim/Source/Annotation/AnnotationComponent.cpp index 16ad5c44c..88801c7a3 100644 --- a/Unreal/Plugins/AirSim/Source/Annotation/AnnotationComponent.cpp +++ b/Unreal/Plugins/AirSim/Source/Annotation/AnnotationComponent.cpp @@ -6,20 +6,22 @@ // Overwrite the material #include "Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h" -#include "Runtime/Engine/Classes/Materials/Material.h" -#include "Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h" #include "Runtime/Engine/Classes/Engine/StaticMesh.h" #include "Runtime/Engine/Classes/Components/SkeletalMeshComponent.h" #include "Runtime/Launch/Resources/Version.h" #include "Runtime/Engine/Public/MaterialShared.h" #include "Runtime/Engine/Classes/Engine/Engine.h" #include "AirBlueprintLib.h" - +#if ENGINE_MAJOR_VERSION < 5 +#include "Runtime/Engine/Classes/Materials/Material.h" +#include "Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h" +#endif #if ENGINE_MAJOR_VERSION >= 5 //different header files in UE +#include "Runtime/Engine/Public/Materials/Material.h" +#include "Runtime/Engine/Public/Materials/MaterialInstanceDynamic.h" #include "Runtime/Engine/Public/StaticMeshSceneProxy.h" #include "Runtime/Engine/Public/SkeletalMeshSceneProxy.h" - #endif #include "Runtime/Engine/Public/Rendering/SkeletalMeshRenderData.h" @@ -370,14 +372,14 @@ FPrimitiveSceneProxy* UAnnotationComponent::CreateSceneProxy(USkeletalMeshCompon { UMaterialInterface* ProxyMaterial = AnnotationMID; // Material Instance Dynamic - ERHIFeatureLevel::Type SceneFeatureLevel = GetWorld()->FeatureLevel; + ERHIFeatureLevel::Type SceneFeatureLevel = GetWorld()->GetFeatureLevel(); // Ref: https://github.com/EpicGames/UnrealEngine/blob/4.19/Engine/Source/Runtime/Engine/Private/Components/SkinnedMeshComponent.cpp#L415 FSkeletalMeshRenderData* SkelMeshRenderData = SkeletalMeshComponent->GetSkeletalMeshRenderData(); // Only create a scene proxy for rendering if properly initialized if (SkelMeshRenderData && - SkelMeshRenderData->LODRenderData.IsValidIndex(SkeletalMeshComponent->PredictedLODLevel) && + SkelMeshRenderData->LODRenderData.IsValidIndex(SkeletalMeshComponent->GetPredictedLODLevel()) && SkeletalMeshComponent->MeshObject) // The risk of using MeshObject { // Only create a scene proxy if the bone count being used is supported, or if we don't have a skeleton (this is the case with destructibles) diff --git a/build.sh b/build.sh index f15c82cff..431ed017c 100755 --- a/build.sh +++ b/build.sh @@ -64,11 +64,11 @@ if [ "$(uname)" == "Darwin" ]; then export CXX="$(brew --prefix)/opt/llvm/bin/clang++" else if $gcc; then - export CC="gcc-12" - export CXX="g++-12" + export CC="gcc" + export CXX="g++" else - export CC="clang-12" - export CXX="clang++-12" + export CC="clang" + export CXX="clang++" fi fi diff --git a/setup.sh b/setup.sh index f6d1ee91b..c8d221d8f 100755 --- a/setup.sh +++ b/setup.sh @@ -48,7 +48,26 @@ else #linux # wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - # sudo apt-get update # fi - sudo apt-get install -y clang-12 clang++-12 libc++-12-dev libc++abi-12-dev libstdc++-12-dev + if [ "$VERSION" -eq "20" ]; then + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt update + sudo apt-get install -y build-essential cmake clang clang-12 clang++-12 libc++-12-dev libc++abi-12-dev libstdc++-13-dev + + # configure update-alternatives for clang + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 1000 + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 1000 + sudo update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-12 1000 + sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang++-12 1000 + fi + if [ "$VERSION" -eq "22" ]; then + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt update + sudo apt-get install -y build-essential cmake clang clang-14 clang++-14 libc++-14-dev libc++abi-14-dev libstdc++-13-dev + fi + if [ "$VERSION" -eq "24" ]; then + sudo apt-get install -y build-essential cmake clang clang-18 clang++-18 libc++-18-dev libc++abi-18-dev libstdc++-13-dev + fi + fi if ! which cmake; then @@ -86,7 +105,7 @@ else #linux fi # install additional tools - sudo apt-get install -y build-essential unzip libunwind-dev + sudo apt-get install -y unzip if version_less_than_equal_to $cmake_ver $MIN_CMAKE_VERSION; then # in ubuntu 18 docker CI, avoid building cmake from scratch to save time @@ -190,4 +209,4 @@ set +x echo "" echo "******************************************" echo "Cosys-AirSim setup completed successfully!" -echo "******************************************" \ No newline at end of file +echo "******************************************"