From 2ba02e332be2af51f5dd756c8f85f4dbcbc60b0e Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Fri, 5 Jun 2026 17:29:05 +0800 Subject: [PATCH 01/29] =?UTF-8?q?ubuntu=E7=B3=BB=E7=BB=9F=E6=89=93?= =?UTF-8?q?=E5=8C=85carla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 10 ++--- Unreal/CarlaUE4/CarlaUE4.uproject | 20 +-------- .../Plugins/Carla/Source/Carla/Carla.Build.cs | 18 +++----- .../Source/CarlaUE4/CarlaUE4.Build.cs | 5 ++- Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp | 11 ++++- Util/BuildTools/BuildUE4Plugins.sh | 44 +++++++++---------- 6 files changed, 46 insertions(+), 62 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index d543777045..6e63744345 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -49,11 +49,11 @@ jobs: make CarlaUE4Editor ARGS="--chrono -j$(nproc)" shell: bash - # - name: package - #run: | - # source ./setEnv64.sh - # make package ARGS="--chrono" - # shell: bash + - name: package + run: | + source ./setEnv64.sh + make package ARGS="--chrono" + shell: bash diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index 056d38b3d0..7540f20876 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -1,6 +1,6 @@ { "FileVersion": 3, - "EngineAssociation": "{E0A51DA7-4769-9458-687B-4680AAEBFD72}", + "EngineAssociation": "{FF5B26C3-46CF-C440-D9FB-F48D5F122826}", "Category": "", "Description": "", "Modules": [ @@ -95,7 +95,7 @@ }, { "Name": "SteamVR", - "Enabled": true, + "Enabled": false, "WhitelistPlatforms": [ "Win32", "Win64", @@ -152,22 +152,6 @@ { "Name": "AirSim", "Enabled": true - }, - { - "Name": "UnrealRoboticsLab", - "Enabled": true - }, - { - "Name": "GLTFImporter", - "Enabled": true - }, - { - "Name": "FunctionalTestingEditor", - "Enabled": true - }, - { - "Name": "RuntimeTests", - "Enabled": true } ] } \ No newline at end of file diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs index b8d7b93905..c83dec4291 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs @@ -18,14 +18,12 @@ private bool IsWindows(ReadOnlyTargetRules Target) public Carla(ReadOnlyTargetRules Target) : base(Target) { PrivatePCHHeaderFile = "Carla.h"; - - bool HasCustomGBufferView = File.Exists(Path.Combine(EngineDirectory, "Source", "Runtime", "Renderer", "Public", "GBufferView.h")); - + // 关键:强制开启 C++ 异常支持,以兼容 Boost 和 DReyeVR + bEnableExceptions = true; if (IsWindows(Target)) { - bEnableExceptions = true; + bEnableExceptions = true; } - // Read config about carsim string CarlaPluginPath = Path.GetFullPath( ModuleDirectory ); string ConfigDir = Path.GetFullPath(Path.Combine(CarlaPluginPath, "../../../../Config/")); @@ -73,7 +71,6 @@ public Carla(ReadOnlyTargetRules Target) : base(Target) PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... - Path.Combine(EngineDirectory, "Source", "Runtime", "Engine", "Private") } ); @@ -140,7 +137,6 @@ public Carla(ReadOnlyTargetRules Target) : base(Target) ); AddCarlaServerDependency(Target); - PublicDefinitions.Add(HasCustomGBufferView ? "CARLA_HAS_ENGINE_GBUFFER_VIEW=1" : "CARLA_HAS_ENGINE_GBUFFER_VIEW=0"); } private bool UseDebugLibs(ReadOnlyTargetRules Target) @@ -182,7 +178,6 @@ private void AddBoostLibs(string LibPath) private void AddCarlaServerDependency(ReadOnlyTargetRules Target) { string LibCarlaInstallPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "../../CarlaDependencies")); - ADelegate GetLibName = (string BaseName) => { if (IsWindows(Target)) { @@ -227,7 +222,6 @@ private void AddCarlaServerDependency(ReadOnlyTargetRules Target) PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", "proj.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", "osm2odr.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", "zlibstatic.lib")); - } else { @@ -323,7 +317,7 @@ private void AddCarlaServerDependency(ReadOnlyTargetRules Target) PublicAdditionalLibraries.Add("stdc++"); PublicAdditionalLibraries.Add("/usr/lib/x86_64-linux-gnu/libpython3.9.so"); } - + if (UsingRos2) { PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_fastdds"))); @@ -343,13 +337,11 @@ private void AddCarlaServerDependency(ReadOnlyTargetRules Target) } bEnableExceptions = true; - // Include path. string LibCarlaIncludePath = Path.Combine(LibCarlaInstallPath, "include"); PublicIncludePaths.Add(LibCarlaIncludePath); PrivateIncludePaths.Add(LibCarlaIncludePath); - PublicDefinitions.Add("ASIO_NO_EXCEPTIONS"); PublicDefinitions.Add("BOOST_NO_EXCEPTIONS"); PublicDefinitions.Add("LIBCARLA_NO_EXCEPTIONS"); @@ -357,4 +349,4 @@ private void AddCarlaServerDependency(ReadOnlyTargetRules Target) PublicDefinitions.Add("BOOST_DISABLE_ABI_HEADERS"); PublicDefinitions.Add("BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY"); } -} +} \ No newline at end of file diff --git a/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs b/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs index cc8b88df99..471fc2a528 100644 --- a/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs +++ b/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs @@ -14,7 +14,8 @@ public CarlaUE4(ReadOnlyTargetRules Target) : base(Target) { PrivatePCHHeaderFile = "CarlaUE4.h"; ShadowVariableWarningLevel = WarningLevel.Off; // -Wno-shadow - + // 关键:强制开启 C++ 异常支持,以兼容 Boost 和 DReyeVR + bEnableExceptions = true; // include LibCarla so we can #include headers string LibCarlaIncludePath = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "..", "..", "LibCarla", "source")); @@ -95,4 +96,4 @@ public CarlaUE4(ReadOnlyTargetRules Target) : base(Target) PrivateDependencyModuleNames.AddRange(new string[] { "ImageWriteQueue" }); } -} +} \ No newline at end of file diff --git a/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp b/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp index 53af611e2e..47b4546a3b 100644 --- a/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp +++ b/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp @@ -1,7 +1,14 @@ // Fill out your copyright notice in the Description page of Project Settings. - #include "CarlaUE4.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, CarlaUE4, "CarlaUE4" ); - +#ifdef __linux__ +#include +namespace std { + void __throw_out_of_range_fmt(const char* fmt, ...) { + // 直接调用底层终止函数,骗过链接器即可,绝不使用 throw + abort(); + } +} +#endif DEFINE_LOG_CATEGORY(LogDReyeVR); diff --git a/Util/BuildTools/BuildUE4Plugins.sh b/Util/BuildTools/BuildUE4Plugins.sh index 04b04c56ab..7b1832504d 100755 --- a/Util/BuildTools/BuildUE4Plugins.sh +++ b/Util/BuildTools/BuildUE4Plugins.sh @@ -30,7 +30,7 @@ CARLA_STREETMAP_PLUGINS_PATH="$CARLA_PLUGINS_PATH/StreetMap" AIR_PLUGIN_PATH="$CARLA_PLUGINS_PATH/AirSim" AIR_BUILD_PATH="$ROOT_PATH/Build/AirSim" -#CONTENT_PATH="$ROOT_PATH/Unreal/CarlaUE4/Content" +CONTENT_PATH="$ROOT_PATH/Unreal/CarlaUE4/Content" OPTS=`getopt -o h --long build,rebuild,clean,chrono,chrono-path: -n 'parse-options' -- "$@"` @@ -96,26 +96,26 @@ fi # download assets -#if [[ ! -d "$CONTENT_PATH" ]]; then -# echo "$FILE_N Content directory: \"$CONTENT_PATH\"" - -# if [[ -d "$CACHE_DIR/Content" ]]; then -# # <==> xcopy /q /Y /S /I -# cp -a "$CACHE_DIR/Content/." "$CONTENT_PATH/" -# else -# git clone https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/Content.git "$CONTENT_PATH" -# cd "$CONTENT_PATH" -# git lfs pull -# fi - -#else -# echo "$FILE_N Content directory already exists: \"$CONTENT_PATH\", executing git pull." -# cd "$CONTENT_PATH" -# git fetch --all -# git reset --hard origin/master -# git pull -# git lfs pull -#fi +if [[ ! -d "$CONTENT_PATH" ]]; then + echo "$FILE_N Content directory: \"$CONTENT_PATH\"" + + if [[ -d "$CACHE_DIR/Content" ]]; then + # <==> xcopy /q /Y /S /I + cp -a "$CACHE_DIR/Content/." "$CONTENT_PATH/" + else + git clone https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/Content.git "$CONTENT_PATH" + cd "$CONTENT_PATH" + git lfs pull + fi + +else + echo "$FILE_N Content directory already exists: \"$CONTENT_PATH\", executing git pull." + cd "$CONTENT_PATH" + git fetch --all + git reset --hard origin/master + git pull + git lfs pull +fi if ${BUILD_STREETMAP} ; then @@ -162,4 +162,4 @@ fi -log "StreetMap Success!" +log "StreetMap Success!" \ No newline at end of file From 9e66a462031dabc6c1e50cd725cfc9b3c62b66c7 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Mon, 8 Jun 2026 13:54:08 +0800 Subject: [PATCH 02/29] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Unreal/CarlaUE4/CarlaUE4.uproject | 16 ++++++++++++++++ .../Plugins/Carla/Source/Carla/Carla.Build.cs | 14 ++++++++++++-- .../CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs | 3 ++- Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp | 1 + 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index 7540f20876..0ef9dbda48 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -152,6 +152,22 @@ { "Name": "AirSim", "Enabled": true + }, + { + "Name": "UnrealRoboticsLab", + "Enabled": true + }, + { + "Name": "GLTFImporter", + "Enabled": true + }, + { + "Name": "FunctionalTestingEditor", + "Enabled": true + }, + { + "Name": "RuntimeTests", + "Enabled": true } ] } \ No newline at end of file diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs index c83dec4291..88e65a57e6 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs @@ -18,12 +18,16 @@ private bool IsWindows(ReadOnlyTargetRules Target) public Carla(ReadOnlyTargetRules Target) : base(Target) { PrivatePCHHeaderFile = "Carla.h"; + + bool HasCustomGBufferView = File.Exists(Path.Combine(EngineDirectory, "Source", "Runtime", "Renderer", "Public", "GBufferView.h")); + // 关键:强制开启 C++ 异常支持,以兼容 Boost 和 DReyeVR bEnableExceptions = true; if (IsWindows(Target)) { - bEnableExceptions = true; + bEnableExceptions = true; } + // Read config about carsim string CarlaPluginPath = Path.GetFullPath( ModuleDirectory ); string ConfigDir = Path.GetFullPath(Path.Combine(CarlaPluginPath, "../../../../Config/")); @@ -71,6 +75,7 @@ public Carla(ReadOnlyTargetRules Target) : base(Target) PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... + Path.Combine(EngineDirectory, "Source", "Runtime", "Engine", "Private") } ); @@ -137,6 +142,7 @@ public Carla(ReadOnlyTargetRules Target) : base(Target) ); AddCarlaServerDependency(Target); + PublicDefinitions.Add(HasCustomGBufferView ? "CARLA_HAS_ENGINE_GBUFFER_VIEW=1" : "CARLA_HAS_ENGINE_GBUFFER_VIEW=0"); } private bool UseDebugLibs(ReadOnlyTargetRules Target) @@ -178,6 +184,7 @@ private void AddBoostLibs(string LibPath) private void AddCarlaServerDependency(ReadOnlyTargetRules Target) { string LibCarlaInstallPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "../../CarlaDependencies")); + ADelegate GetLibName = (string BaseName) => { if (IsWindows(Target)) { @@ -222,6 +229,7 @@ private void AddCarlaServerDependency(ReadOnlyTargetRules Target) PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", "proj.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", "osm2odr.lib")); PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", "zlibstatic.lib")); + } else { @@ -317,7 +325,7 @@ private void AddCarlaServerDependency(ReadOnlyTargetRules Target) PublicAdditionalLibraries.Add("stdc++"); PublicAdditionalLibraries.Add("/usr/lib/x86_64-linux-gnu/libpython3.9.so"); } - + if (UsingRos2) { PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_fastdds"))); @@ -337,11 +345,13 @@ private void AddCarlaServerDependency(ReadOnlyTargetRules Target) } bEnableExceptions = true; + // Include path. string LibCarlaIncludePath = Path.Combine(LibCarlaInstallPath, "include"); PublicIncludePaths.Add(LibCarlaIncludePath); PrivateIncludePaths.Add(LibCarlaIncludePath); + PublicDefinitions.Add("ASIO_NO_EXCEPTIONS"); PublicDefinitions.Add("BOOST_NO_EXCEPTIONS"); PublicDefinitions.Add("LIBCARLA_NO_EXCEPTIONS"); diff --git a/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs b/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs index 471fc2a528..3057e5789a 100644 --- a/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs +++ b/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs @@ -14,7 +14,8 @@ public CarlaUE4(ReadOnlyTargetRules Target) : base(Target) { PrivatePCHHeaderFile = "CarlaUE4.h"; ShadowVariableWarningLevel = WarningLevel.Off; // -Wno-shadow - // 关键:强制开启 C++ 异常支持,以兼容 Boost 和 DReyeVR + + // 关键:强制开启 C++ 异常支持,以兼容 Boost 和 DReyeVR bEnableExceptions = true; // include LibCarla so we can #include headers string LibCarlaIncludePath = diff --git a/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp b/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp index 47b4546a3b..044ee2618b 100644 --- a/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp +++ b/Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp @@ -1,4 +1,5 @@ // Fill out your copyright notice in the Description page of Project Settings. + #include "CarlaUE4.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, CarlaUE4, "CarlaUE4" ); From 3396b14bc90347c8534544ad1a0ade1e35ccb0b2 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Mon, 8 Jun 2026 14:13:29 +0800 Subject: [PATCH 03/29] =?UTF-8?q?=E5=AF=B9=E9=BD=90=E7=BC=A9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 6e63744345..23d7527970 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -49,10 +49,10 @@ jobs: make CarlaUE4Editor ARGS="--chrono -j$(nproc)" shell: bash - - name: package + - name: package run: | - source ./setEnv64.sh - make package ARGS="--chrono" + source ./setEnv64.sh + make package ARGS="--chrono" shell: bash From 1be6ed3e7a6d5bd7267633015e749645c7564bcb Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Mon, 8 Jun 2026 14:16:35 +0800 Subject: [PATCH 04/29] =?UTF-8?q?linux=20CI/CD=20=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=A7=A6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 23d7527970..89f10854ef 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -1,6 +1,7 @@ name: hubt Linux CI/CD on: + pull_request: workflow_dispatch: From 93d63dcb07179517e49e51826b45eebd1e2eae82 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Mon, 8 Jun 2026 15:43:04 +0800 Subject: [PATCH 05/29] =?UTF-8?q?=E4=B8=8E=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E7=AD=BE=E7=9B=B8=E5=90=8C=E5=81=9A=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 89f10854ef..8bd88474db 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -9,7 +9,7 @@ jobs: linux-dev: name: Linux CI/CD timeout-minutes: 1440 - runs-on: self-hosted:ubuntu-hutb + runs-on: [self-hosted, ubuntu-hutb] env: UE4_ROOT: /home/ubuntu/UnrealEngine_4.26 From e55b918565a881b594adae0c151b534b684f83d8 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Mon, 8 Jun 2026 16:29:40 +0800 Subject: [PATCH 06/29] =?UTF-8?q?=E5=85=A8=E5=B1=80=E6=9B=BF=E6=8D=A2=20Gi?= =?UTF-8?q?t=20=E9=95=9C=E5=83=8F=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 8bd88474db..7a64ed1f6e 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -19,6 +19,10 @@ jobs: uses: actions/checkout@v5 with: fetch-depth: 0 + + - name: Configure Git Mirror for GitHub + run: | + git config --global url."https://mirror.ghproxy.com/https://github.com/".insteadOf "https://github.com/" - name: Show files run: | From 3d2056dde76582e6b1539f2436808d687df48166 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Tue, 9 Jun 2026 18:55:58 +0800 Subject: [PATCH 07/29] =?UTF-8?q?=E4=B8=8D=E4=BD=BF=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 7a64ed1f6e..1af4afd829 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -19,11 +19,7 @@ jobs: uses: actions/checkout@v5 with: fetch-depth: 0 - - - name: Configure Git Mirror for GitHub - run: | - git config --global url."https://mirror.ghproxy.com/https://github.com/".insteadOf "https://github.com/" - + - name: Show files run: | pwd From fd2cd4928afb1730708ddaf0a48357d9750b1475 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Wed, 10 Jun 2026 21:33:00 +0800 Subject: [PATCH 08/29] =?UTF-8?q?=E8=A7=A3=E5=86=B3/wd4103=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 1af4afd829..2b1f69a112 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -44,6 +44,12 @@ jobs: source ./Update.sh shell: bash + - name: Fix Windows Compiler Flags and Clean Cache + run: | + # 使用 ${{ github.workspace }} 动态获取当前 Runner 的工作目录 + find ${{ github.workspace }} -type f -name "*.cs" -exec sed -i 's#-wd4103##g' {} + + find ${{ github.workspace }} -type f -name "*.cs" -exec sed -i 's#/wd4103##g' {} + + - name: CarlaUE4Editor run: | source ./setEnv64.sh From 98e7dc1a1c84e53a4c8d140552ae43901390022c Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Wed, 10 Jun 2026 21:35:32 +0800 Subject: [PATCH 09/29] =?UTF-8?q?=E8=A7=A3=E5=86=B3LFS=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E4=B8=8D=E4=BA=86=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util/BuildTools/Linux.mk | 3 ++- Util/download_from_git.py | 44 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/Util/BuildTools/Linux.mk b/Util/BuildTools/Linux.mk index 635137c581..9f034a8333 100644 --- a/Util/BuildTools/Linux.mk +++ b/Util/BuildTools/Linux.mk @@ -80,7 +80,8 @@ examples: run-examples: @for D in ${CARLA_EXAMPLES_FOLDER}/*; do [ -d "$${D}" ] && make -C $${D} run.only; done -CarlaUE4Editor: LibCarla.server.release osm2odr downloadplugins +# CarlaUE4Editor: LibCarla.server.release osm2odr downloadplugins +CarlaUE4Editor: @${CARLA_BUILD_TOOLS_FOLDER}/BuildUE4Plugins.sh --build $(ARGS) @${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.sh --build $(ARGS) diff --git a/Util/download_from_git.py b/Util/download_from_git.py index be480d3b79..40c6e85f62 100644 --- a/Util/download_from_git.py +++ b/Util/download_from_git.py @@ -482,9 +482,47 @@ def remove_readonly(func, path, _): ) if os.path.exists(os.path.join(rep_path, "*.dat")) is False: split_file( - os.path.join(local_path, "hutb.zip"), rep_path, 256 * 1024 * 1024 - ) # 每个小文件最大为 256MB - repo.commit_push_force(message=latest_file_name) + os.path.join(local_path, "hutb.zip"), rep_path, 5120 * 1024 * 1024 + ) # 每个小文件最大为 128MB + # repo.commit_push_force(message=latest_file_name) + + # ---------- 修复 504 超时:增量分批推送逻辑开始 ---------- + print("\nStarting incremental push to prevent 504 Gateway Timeout...") + + # 核心补充:强制本地初始化 LFS 追踪规则,防御 LFS 脱靶的情况 + print("Enforcing Git LFS tracking for .dat files...") + subprocess.run([git_exe, "-C", rep_path, "lfs", "track", "*.dat"]) + repo.repo.git.add(".gitattributes") # 必须把生成的规则文件先加进暂存区 + + # 获取所有切割好的 .dat 文件并严格按序号排序 + dat_files = sorted([f for f in os.listdir(rep_path) if f.endswith(".dat")]) + total_chunks = len(dat_files) + + for idx, file_name in enumerate(dat_files, 1): + print(f"\n>>> Processing chunk {idx}/{total_chunks}: {file_name}") + file_path = os.path.join(rep_path, file_name) + + # 1. 仅将当前单个分块加入暂存区,而不是全部加入 + repo.repo.git.add(file_path) + + # 2. 检查是否有实质性更改,防御空提交引发的系统崩溃(自动化测试核心原则) + if repo.repo.is_dirty(untracked_files=True) or repo.repo.index.diff("HEAD"): + commit_msg = f"{latest_file_name} - upload chunk {idx}/{total_chunks}" + repo.repo.git.commit("-m", commit_msg) + + # 3. 执行推送。结合上文可能有 reset_hard,首个包强制覆盖,后续包常规追加 + try: + if idx == 1: + repo.repo.git.push(force=True) + else: + repo.repo.git.push() + print(f"Chunk {idx} successfully pushed.") + except Exception as e: + print(f"Failed to push chunk {idx}. Error: {e}") + # 遇到网络彻底断开等致命异常时,优雅地中止程序 + sys.exit(1) + # ---------- 增量分批推送逻辑结束 ---------- + print("Upload finished.") sys.exit(0) From 1276e9edf06c5575e3e0b46d7544259bd7888011 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Wed, 10 Jun 2026 21:45:25 +0800 Subject: [PATCH 10/29] =?UTF-8?q?=E5=8A=A0=E5=BF=AB=E6=8E=92=E9=94=99?= =?UTF-8?q?=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util/BuildTools/Linux.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Util/BuildTools/Linux.mk b/Util/BuildTools/Linux.mk index 9f034a8333..6d24b159cf 100644 --- a/Util/BuildTools/Linux.mk +++ b/Util/BuildTools/Linux.mk @@ -84,7 +84,7 @@ run-examples: CarlaUE4Editor: @${CARLA_BUILD_TOOLS_FOLDER}/BuildUE4Plugins.sh --build $(ARGS) @${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.sh --build $(ARGS) - + .PHONY: PythonAPI PythonAPI: LibCarla.client.release osm2odr @${CARLA_BUILD_TOOLS_FOLDER}/BuildPythonAPI.sh $(ARGS) From ffb128ed47fbcedafdd62c9d648ab3c2402dfc48 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Thu, 11 Jun 2026 14:28:38 +0800 Subject: [PATCH 11/29] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E4=B8=8D=E4=BA=86?= =?UTF-8?q?=E8=AF=A5=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Unreal/CarlaUE4/CarlaUE4.uproject | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index 0ef9dbda48..63256b1c14 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -155,7 +155,7 @@ }, { "Name": "UnrealRoboticsLab", - "Enabled": true + "Enabled": false }, { "Name": "GLTFImporter", From 74789ca6c2b174e8313b60917f10ed513389564c Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Thu, 11 Jun 2026 14:30:43 +0800 Subject: [PATCH 12/29] =?UTF-8?q?=E8=A7=A3=E5=86=B3wd4301=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 2b1f69a112..64c5c0cd91 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -46,9 +46,22 @@ jobs: - name: Fix Windows Compiler Flags and Clean Cache run: | - # 使用 ${{ github.workspace }} 动态获取当前 Runner 的工作目录 - find ${{ github.workspace }} -type f -name "*.cs" -exec sed -i 's#-wd4103##g' {} + - find ${{ github.workspace }} -type f -name "*.cs" -exec sed -i 's#/wd4103##g' {} + + # 💡 在脚本中直接使用 $UE4_ROOT 变量 + echo "=== 正在抹除 C# 脚本中的 Windows 专属忽略警告参数 (/wd4103) ===" + find $UE4_ROOT/Engine/Source/Programs/UnrealBuildTool -type f -name "*.cs" -exec sed -i 's#-wd4103##g' {} + + find $UE4_ROOT/Engine/Source/Programs/UnrealBuildTool -type f -name "*.cs" -exec sed -i 's#/wd4103##g' {} + + + find ${{ github.workspace }} -type f -name "*.cs" -exec sed -i 's#-wd4103##g' {} + + find ${{ github.workspace }} -type f -name "*.cs" -exec sed -i 's#/wd4103##g' {} + + + echo "=== 正在强制重新编译虚幻引擎构建工具 (UBT) ===" + rm -f $UE4_ROOT/Engine/Binaries/DotNET/UnrealBuildTool.exe + cd $UE4_ROOT + ./GenerateProjectFiles.sh + + echo "=== 正在物理清空被污染的 Intermediate 缓存 ===" + rm -rf $UE4_ROOT/Engine/Intermediate/Build/Linux/B4D820EA + rm -rf ${{ github.workspace }}/Unreal/CarlaUE4/Intermediate - name: CarlaUE4Editor run: | From 4dcb45f08b5608fcf1fbf260efdc29dd32bf00dc Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Fri, 12 Jun 2026 14:29:15 +0800 Subject: [PATCH 13/29] =?UTF-8?q?=E4=B8=8D=E4=BD=BF=E7=94=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Unreal/CarlaUE4/CarlaUE4.uproject | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index 63256b1c14..09c3f7b72c 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -159,15 +159,15 @@ }, { "Name": "GLTFImporter", - "Enabled": true + "Enabled": false }, { "Name": "FunctionalTestingEditor", - "Enabled": true + "Enabled": false }, { "Name": "RuntimeTests", - "Enabled": true + "Enabled": false } ] } \ No newline at end of file From c70bdeca096fcfa159c49180caecb4304387eec9 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Tue, 16 Jun 2026 00:52:56 +0800 Subject: [PATCH 14/29] =?UTF-8?q?cpu=E6=A0=B8=E6=95=B0=E8=BF=87=E5=A4=9A?= =?UTF-8?q?=EF=BC=8C=E5=86=85=E5=AD=98=E4=B8=8D=E5=A4=9F=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 64c5c0cd91..0cad62c297 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -66,7 +66,7 @@ jobs: - name: CarlaUE4Editor run: | source ./setEnv64.sh - make CarlaUE4Editor ARGS="--chrono -j$(nproc)" + make CarlaUE4Editor ARGS="--chrono -j$(( $(nproc) / 3 ))" shell: bash - name: package From 5a329c5038d9e694afafe746507a37465caa813c Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Tue, 16 Jun 2026 15:58:03 +0800 Subject: [PATCH 15/29] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=8E=9F?= =?UTF-8?q?=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util/BuildTools/Linux.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Util/BuildTools/Linux.mk b/Util/BuildTools/Linux.mk index 6d24b159cf..3927a90757 100644 --- a/Util/BuildTools/Linux.mk +++ b/Util/BuildTools/Linux.mk @@ -80,8 +80,8 @@ examples: run-examples: @for D in ${CARLA_EXAMPLES_FOLDER}/*; do [ -d "$${D}" ] && make -C $${D} run.only; done -# CarlaUE4Editor: LibCarla.server.release osm2odr downloadplugins -CarlaUE4Editor: +CarlaUE4Editor: LibCarla.server.release osm2odr downloadplugins +# CarlaUE4Editor: @${CARLA_BUILD_TOOLS_FOLDER}/BuildUE4Plugins.sh --build $(ARGS) @${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.sh --build $(ARGS) From cba6f85342554afb253bb656fe78a63652083f5a Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Wed, 17 Jun 2026 16:05:11 +0800 Subject: [PATCH 16/29] =?UTF-8?q?=E8=A7=A3=E5=86=B3python=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=BF=87=E9=AB=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 0cad62c297..583c6dbef9 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -71,7 +71,12 @@ jobs: - name: package run: | - source ./setEnv64.sh + source /home/ubuntu/miniconda3/etc/profile.d/conda.sh + conda activate carla + + source ./setEnv64.sh + + export MaxProcessorCount=$(( $(nproc) / 3 )) make package ARGS="--chrono" shell: bash From 43c5c857e76f78e84c5ec9f4e3fb64ba9d40b46d Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Fri, 26 Jun 2026 16:24:38 +0800 Subject: [PATCH 17/29] =?UTF-8?q?=E8=AE=A9=E6=89=93=E5=8C=85=E6=9C=BA?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E6=89=AB=E6=8F=8F=E8=BF=99=E6=89=B9=E5=9D=8F?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=EF=BC=8C=E6=88=90=E5=8A=9F=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E4=B8=BB=E4=BD=93=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util/BuildTools/Package.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Util/BuildTools/Package.sh b/Util/BuildTools/Package.sh index ce985638ca..f02f74a84c 100755 --- a/Util/BuildTools/Package.sh +++ b/Util/BuildTools/Package.sh @@ -120,6 +120,8 @@ function copy_dir_fast { } function cook_tagged_materials { + return 0 + # Measure duration of this function call T_START_COOK_TAGGED_MATS=$(date +%s) From 75a5f9255ebb2dd93c64c951cdb55c4935ff4432 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Wed, 1 Jul 2026 15:34:36 +0800 Subject: [PATCH 18/29] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=BF=90=E8=A1=8CCheck?= =?UTF-8?q?out=20repository=E6=97=B6=E9=97=B4=E8=BF=87=E9=95=BF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 583c6dbef9..c65bd96606 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 with: - fetch-depth: 0 + fetch-depth: 1 - name: Show files run: | From b484dde9d155dbdd3b31f7f1e3235de1a2f155d4 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Wed, 1 Jul 2026 15:49:36 +0800 Subject: [PATCH 19/29] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=BF=87=E5=90=8E?= =?UTF-8?q?=E5=B9=B6=E9=9D=9E=E8=AF=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index c65bd96606..583c6dbef9 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 with: - fetch-depth: 1 + fetch-depth: 0 - name: Show files run: | From 0bd3706631d80bac7075e2694d8442ce2f87a55d Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Wed, 8 Jul 2026 15:37:35 +0800 Subject: [PATCH 20/29] =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=B7=B3=E8=BF=87?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E8=BF=99=E6=89=B9=E5=9D=8F=E8=B5=84=E4=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 583c6dbef9..4972d42f92 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -62,6 +62,7 @@ jobs: echo "=== 正在物理清空被污染的 Intermediate 缓存 ===" rm -rf $UE4_ROOT/Engine/Intermediate/Build/Linux/B4D820EA rm -rf ${{ github.workspace }}/Unreal/CarlaUE4/Intermediate + shell: bash - name: CarlaUE4Editor run: | @@ -69,6 +70,13 @@ jobs: make CarlaUE4Editor ARGS="--chrono -j$(( $(nproc) / 3 ))" shell: bash + # 在执行 make package 之前,动态注入 return 0 + - name: Patch Package.sh to skip bad materials + run: | + echo "=== 正在动态修改 Package.sh,跳过 cook_tagged_materials ===" + sed -i 's/function cook_tagged_materials {/function cook_tagged_materials {\n return 0/g' Util/BuildTools/Package.sh + shell: bash + - name: package run: | source /home/ubuntu/miniconda3/etc/profile.d/conda.sh From 2929fe5fc091b2adfebbda57ca5f13d17cb8797c Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Thu, 9 Jul 2026 15:12:37 +0800 Subject: [PATCH 21/29] =?UTF-8?q?=E5=AF=B9LFS=E7=8A=B6=E6=80=81=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=8C=E5=85=88=E8=AF=95=E8=AF=95=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util/BuildTools/BuildUE4Plugins.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Util/BuildTools/BuildUE4Plugins.sh b/Util/BuildTools/BuildUE4Plugins.sh index 7b1832504d..ec44941472 100755 --- a/Util/BuildTools/BuildUE4Plugins.sh +++ b/Util/BuildTools/BuildUE4Plugins.sh @@ -105,16 +105,18 @@ if [[ ! -d "$CONTENT_PATH" ]]; then else git clone https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/Content.git "$CONTENT_PATH" cd "$CONTENT_PATH" + git lfs install git lfs pull fi else echo "$FILE_N Content directory already exists: \"$CONTENT_PATH\", executing git pull." cd "$CONTENT_PATH" - git fetch --all - git reset --hard origin/master + git lfs install + git stash git pull git lfs pull + git stash pop || true fi From 179c1472e3e7ccb7744b5c319118c61ee2de7961 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Fri, 10 Jul 2026 11:13:56 +0800 Subject: [PATCH 22/29] =?UTF-8?q?=E5=9B=9E=E9=80=80LFS=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util/BuildTools/BuildUE4Plugins.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Util/BuildTools/BuildUE4Plugins.sh b/Util/BuildTools/BuildUE4Plugins.sh index ec44941472..7b1832504d 100755 --- a/Util/BuildTools/BuildUE4Plugins.sh +++ b/Util/BuildTools/BuildUE4Plugins.sh @@ -105,18 +105,16 @@ if [[ ! -d "$CONTENT_PATH" ]]; then else git clone https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/Content.git "$CONTENT_PATH" cd "$CONTENT_PATH" - git lfs install git lfs pull fi else echo "$FILE_N Content directory already exists: \"$CONTENT_PATH\", executing git pull." cd "$CONTENT_PATH" - git lfs install - git stash + git fetch --all + git reset --hard origin/master git pull git lfs pull - git stash pop || true fi From 89b824e16e411471173c5f8390f3514ea9e4cc4c Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Sun, 12 Jul 2026 17:25:30 +0800 Subject: [PATCH 23/29] =?UTF-8?q?Cook=20=E5=89=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20.uasset=20=E4=B8=AD=E9=9D=9E=E6=B3=95=20/R?= =?UTF-8?q?oadRunnerMaterials/=20=E6=9D=90=E8=B4=A8=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E4=B8=BA=20/Game/RoadRunnerMaterials/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 19 ++++++++++++++++++- Util/BuildTools/Package.sh | 15 ++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 4972d42f92..53f3cee0e9 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -75,7 +75,24 @@ jobs: run: | echo "=== 正在动态修改 Package.sh,跳过 cook_tagged_materials ===" sed -i 's/function cook_tagged_materials {/function cook_tagged_materials {\n return 0/g' Util/BuildTools/Package.sh - shell: bash + shell: bash + + # 修复 Content 包中 .uasset 文件的非法材质路径(缺少 /Game/ 根前缀) + - name: Fix invalid material paths in RoadRunner assets + run: | + echo "=== 正在修复 .uasset 中的非法 RoadRunner 材质路径 ===" + for BAD_PATH in \ + "/RoadRunnerMaterials/BaseMaterial:/Game/RoadRunnerMaterials/BaseMat" \ + "/RoadRunnerMaterials/BaseCutoutMaterial:/Game/RoadRunnerMaterials/BaseCutoutMat" \ + ; do + FROM="${BAD_PATH%%:*}" + TO="${BAD_PATH##*:}" + find Unreal/CarlaUE4/Content -name "*.uasset" \ + -exec grep -l "$FROM" {} \; \ + -exec sed -i "s|$FROM|$TO|g" {} \; 2>/dev/null || true + done + echo "修复完成。" + shell: bash - name: package run: | diff --git a/Util/BuildTools/Package.sh b/Util/BuildTools/Package.sh index f02f74a84c..2caf8a5fa5 100755 --- a/Util/BuildTools/Package.sh +++ b/Util/BuildTools/Package.sh @@ -120,7 +120,7 @@ function copy_dir_fast { } function cook_tagged_materials { - return 0 + # return 0 # Measure duration of this function call T_START_COOK_TAGGED_MATS=$(date +%s) @@ -253,6 +253,19 @@ if ${DO_CARLA_RELEASE} ; then log "Cooking CARLA project." + # 修复 Content 中 .uasset 的非法材质路径(缺少 /Game/ 根前缀导致 Cook 崩溃) + log "Fixing invalid RoadRunner material paths in .uasset files..." + for BAD_PATH in \ + "/RoadRunnerMaterials/BaseMaterial:/Game/RoadRunnerMaterials/BaseMat" \ + "/RoadRunnerMaterials/BaseCutoutMaterial:/Game/RoadRunnerMaterials/BaseCutoutMat" \ + ; do + FROM="${BAD_PATH%%:*}" + TO="${BAD_PATH##*:}" + find "${CARLAUE4_ROOT_FOLDER}/Content" -name "*.uasset" \ + -exec grep -l "$FROM" {} \; \ + -exec sed -i "s|$FROM|$TO|g" {} \; 2>/dev/null || true + done + rm -Rf ${RELEASE_BUILD_FOLDER} mkdir -p ${RELEASE_BUILD_FOLDER} From d9d34a7d95c4f2160c610872dd4778cfc0b20c7a Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Mon, 13 Jul 2026 13:27:10 +0800 Subject: [PATCH 24/29] =?UTF-8?q?=E5=B0=86=E6=96=B0=E5=A2=9E=E7=9A=84?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=85=88=E6=94=B9=E4=B8=BAfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Unreal/CarlaUE4/CarlaUE4.uproject | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index 09c3f7b72c..d066a72ca1 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -168,6 +168,50 @@ { "Name": "RuntimeTests", "Enabled": false + }, + { + "Name": "DatasmithGLTFImporter", + "Enabled": true + }, + { + "Name": "CesiumForUnreal", + "Enabled": false, + "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/87b0d05800a545d49bf858ef3458c4f7", + "SupportedTargetPlatforms": [ + "Win64", + "Mac", + "Linux", + "Android", + "IOS" + ] + }, + { + "Name": "RoadRunnerCarlaIntegration", + "Enabled": false + }, + { + "Name": "RoadRunnerImporter", + "Enabled": false + }, + { + "Name": "StreetMap", + "Enabled": false + }, + { + "Name": "RoadRunnerCarlaDatasmith", + "Enabled": false + }, + { + "Name": "RoadRunnerDatasmith", + "Enabled": false + }, + { + "Name": "RoadRunnerRuntime", + "Enabled": false + }, + { + "Name": "LogitechWheelPlugin", + "Enabled": false } ] } \ No newline at end of file From 77c359a27048f3bdfd616e6ecec8dcd6a2cf185b Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Mon, 13 Jul 2026 13:34:03 +0800 Subject: [PATCH 25/29] =?UTF-8?q?=E5=B0=86=E6=96=B0=E5=A2=9E=E7=9A=84?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=85=88=E8=AE=BE=E7=BD=AE=E4=B8=BAfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Unreal/CarlaUE4/CarlaUE4.uproject | 36 ------------------------------- 1 file changed, 36 deletions(-) diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index e66f5b06f3..6389125f80 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -166,11 +166,7 @@ }, { "Name": "RuntimeTests", -<<<<<<< HEAD "Enabled": false -======= - "Enabled": true ->>>>>>> b56b835e3e67543f324dca6892e6669bd0243cf0 }, { "Name": "DatasmithGLTFImporter", @@ -178,11 +174,7 @@ }, { "Name": "CesiumForUnreal", -<<<<<<< HEAD "Enabled": false, -======= - "Enabled": true, ->>>>>>> b56b835e3e67543f324dca6892e6669bd0243cf0 "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/87b0d05800a545d49bf858ef3458c4f7", "SupportedTargetPlatforms": [ "Win64", @@ -194,7 +186,6 @@ }, { "Name": "RoadRunnerCarlaIntegration", -<<<<<<< HEAD "Enabled": false }, { @@ -220,33 +211,6 @@ { "Name": "LogitechWheelPlugin", "Enabled": false -======= - "Enabled": true - }, - { - "Name": "RoadRunnerImporter", - "Enabled": true - }, - { - "Name": "StreetMap", - "Enabled": true - }, - { - "Name": "RoadRunnerCarlaDatasmith", - "Enabled": true - }, - { - "Name": "RoadRunnerDatasmith", - "Enabled": true - }, - { - "Name": "RoadRunnerRuntime", - "Enabled": true - }, - { - "Name": "LogitechWheelPlugin", - "Enabled": true ->>>>>>> b56b835e3e67543f324dca6892e6669bd0243cf0 } ] } \ No newline at end of file From f0c5d36aa49fa404c32b909ccc926d3d57d51a2b Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Tue, 14 Jul 2026 11:46:32 +0800 Subject: [PATCH 26/29] fix: register RoadRunnerCarlaContent plugin to resolve Cook mount point error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建 RoadRunnerCarlaContent 内容插件,提供 /RoadRunnerCarlaContent/ 挂载点 - 在 .uproject 中注册并启用该插件 - 在 Package.sh 和 CI yml 中增加对应路径替换规则 修复 Cook 阶段报错: Illegal call to DoesPackageExist: '/RoadRunnerCarlaContent/RR_TrafficLightManager' is not a standard unreal filename (Error_UnknownCookFailure) --- .github/workflows/build_linux.yml | 1 + Unreal/CarlaUE4/CarlaUE4.uproject | 4 ++++ .../RoadRunnerCarlaContent.uplugin | 13 +++++++++++++ Util/BuildTools/Package.sh | 1 + 4 files changed, 19 insertions(+) create mode 100644 Unreal/CarlaUE4/Plugins/RoadRunnerCarlaContent/RoadRunnerCarlaContent.uplugin diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 53f3cee0e9..e7cdd48ab0 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -84,6 +84,7 @@ jobs: for BAD_PATH in \ "/RoadRunnerMaterials/BaseMaterial:/Game/RoadRunnerMaterials/BaseMat" \ "/RoadRunnerMaterials/BaseCutoutMaterial:/Game/RoadRunnerMaterials/BaseCutoutMat" \ + "/RoadRunnerCarlaContent/:/Game/RoadRunnerCarlaContent/" \ ; do FROM="${BAD_PATH%%:*}" TO="${BAD_PATH##*:}" diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index 6389125f80..5353ecf339 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -184,6 +184,10 @@ "IOS" ] }, + { + "Name": "RoadRunnerCarlaContent", + "Enabled": true + }, { "Name": "RoadRunnerCarlaIntegration", "Enabled": false diff --git a/Unreal/CarlaUE4/Plugins/RoadRunnerCarlaContent/RoadRunnerCarlaContent.uplugin b/Unreal/CarlaUE4/Plugins/RoadRunnerCarlaContent/RoadRunnerCarlaContent.uplugin new file mode 100644 index 0000000000..524f100821 --- /dev/null +++ b/Unreal/CarlaUE4/Plugins/RoadRunnerCarlaContent/RoadRunnerCarlaContent.uplugin @@ -0,0 +1,13 @@ +{ + "FileVersion": 3, + "Version": 1, + "VersionName": "1.0", + "FriendlyName": "RoadRunnerCarlaContent", + "Description": "Content-only plugin providing RoadRunner Carla content mount point for compatibility with assets that reference /RoadRunnerCarlaContent/ paths.", + "Category": "Other", + "CreatedBy": "HUTB Team", + "CanContainContent": true, + "IsBetaVersion": false, + "Installed": true, + "Modules": [] +} diff --git a/Util/BuildTools/Package.sh b/Util/BuildTools/Package.sh index 2caf8a5fa5..23e95eb94b 100755 --- a/Util/BuildTools/Package.sh +++ b/Util/BuildTools/Package.sh @@ -258,6 +258,7 @@ if ${DO_CARLA_RELEASE} ; then for BAD_PATH in \ "/RoadRunnerMaterials/BaseMaterial:/Game/RoadRunnerMaterials/BaseMat" \ "/RoadRunnerMaterials/BaseCutoutMaterial:/Game/RoadRunnerMaterials/BaseCutoutMat" \ + "/RoadRunnerCarlaContent/:/Game/RoadRunnerCarlaContent/" \ ; do FROM="${BAD_PATH%%:*}" TO="${BAD_PATH##*:}" From 7316845fa2029e264c402cefe8f4c331c9a07a56 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Thu, 16 Jul 2026 16:37:41 +0800 Subject: [PATCH 27/29] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E6=8F=92=E4=BB=B6=E4=BB=A5=E5=8F=8A=E5=B0=86=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E6=94=BE=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Unreal/CarlaUE4/CarlaUE4.uproject | 18 +- setup.sh | 411 ++++++++++++++++++++++++++++++ 2 files changed, 420 insertions(+), 9 deletions(-) create mode 100755 setup.sh diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index 5353ecf339..a38420b70a 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -166,7 +166,7 @@ }, { "Name": "RuntimeTests", - "Enabled": false + "Enabled": true }, { "Name": "DatasmithGLTFImporter", @@ -174,7 +174,7 @@ }, { "Name": "CesiumForUnreal", - "Enabled": false, + "Enabled": true, "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/87b0d05800a545d49bf858ef3458c4f7", "SupportedTargetPlatforms": [ "Win64", @@ -190,31 +190,31 @@ }, { "Name": "RoadRunnerCarlaIntegration", - "Enabled": false + "Enabled": true }, { "Name": "RoadRunnerImporter", - "Enabled": false + "Enabled": true }, { "Name": "StreetMap", - "Enabled": false + "Enabled": true }, { "Name": "RoadRunnerCarlaDatasmith", - "Enabled": false + "Enabled": true }, { "Name": "RoadRunnerDatasmith", - "Enabled": false + "Enabled": true }, { "Name": "RoadRunnerRuntime", - "Enabled": false + "Enabled": true }, { "Name": "LogitechWheelPlugin", - "Enabled": false + "Enabled": true } ] } \ No newline at end of file diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000000..9c2f8f2d17 --- /dev/null +++ b/setup.sh @@ -0,0 +1,411 @@ +#!/bin/bash +# ============================================================================== +# setup.sh — Ubuntu/Linux adaptation of Windows setup.bat +# +# All dependencies (including UE4 plugins not shipped with the engine) are +# centralized in a single repository: +# +# git@git.code.tencent.com:OpenHUTB/dependencies_u.git +# +# The repo contains Linux-compatible builds of every package AND an init.sh +# script that handles extraction. This setup.sh only orchestrates: +# +# 1. Ensure system tools (git, curl, 7z, gcc, etc.) +# 2. Clone dependencies_u → Build/dependencies/ +# 3. Run init.sh → extract everything to the right places +# 4. Install system packages via apt +# 5. Set up Python environment (conda or venv) +# 6. Optionally invoke Util/BuildTools/Setup.sh for the full C++ build +# +# Usage: +# ./setup.sh [--skip-prerequisites] [--download-only] [--help] +# ============================================================================== + +set -e + +# ============================================================================== +# -- Parse command-line arguments ----------------------------------------------- +# ============================================================================== + +DOC_STRING="Download and install all dependencies and UE4 plugins for Ubuntu. +All packages come from the dependencies_u repository (Linux builds)." + +USAGE_STRING="Usage: $0 [--skip-prerequisites] [--download-only] [--help]" + +SKIP_PREREQUISITES=false +DOWNLOAD_ONLY=false + +OPTS=$(getopt -o h --long help,skip-prerequisites,download-only -n 'parse-options' -- "$@") +eval set -- "$OPTS" + +while [[ $# -gt 0 ]]; do + case "$1" in + --skip-prerequisites ) + SKIP_PREREQUISITES=true + shift ;; + --download-only ) + DOWNLOAD_ONLY=true + shift ;; + -h | --help ) + echo "$DOC_STRING" + echo "$USAGE_STRING" + exit 0 + ;; + * ) + shift ;; + esac +done + +# ============================================================================== +# -- Color helpers -------------------------------------------------------------- +# ============================================================================== + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +CYAN='\033[1;36m' +NC='\033[0m' + +log() { echo -e "${CYAN}[setup.sh]${NC} $1"; } +success(){ echo -e "${GREEN}[setup.sh]${NC} \xe2\x9c\x85 $1"; } +warn() { echo -e "${YELLOW}[setup.sh]${NC} \xe2\x9a\xa0\xef\xb8\x8f $1"; } +error() { echo -e "${RED}[setup.sh]${NC} \xe2\x9d\x8c $1"; exit 1; } + +# ============================================================================== +# -- Paths --------------------------------------------------------------------- +# ============================================================================== + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$SCRIPT_DIR" +BUILD_DIR="$PROJECT_ROOT/Build" +PLUGINS_DIR="$PROJECT_ROOT/Unreal/CarlaUE4/Plugins" + +# ------------------------------------------------------------------------------ +# dependencies_u — Ubuntu edition of the Windows dependencies repo. +# +# Repo layout (see README.md in the repo for full documentation): +# +# dependencies_u/ +# |-- Plugins/ # UE4 plugins + third-party runtime libs +# | |-- RoadRunner_Plugins.zip +# | |-- CesiumForUnreal-426-v1.18.0-ue4.zip +# | |-- mujoco-3.3.5-linux-x86_64.tar.gz +# | |-- CoACD.zip +# | `-- libzmq-linux.tar.gz +# |-- prerequisites/ # Pre-packaged toolchain +# | `-- Miniconda3-latest-Linux-x86_64.sh +# |-- src/ # C++ source packages (cross-platform) +# | |-- boost-1_86_0.zip +# | |-- chrono-src.zip +# | |-- eigen-3.3.7.zip +# | |-- ... (13 packages total) +# | `-- zlib-source.zip +# |-- init.sh # Extraction / initialization script +# |-- .gitattributes # LFS tracking rules +# `-- README.md +# ------------------------------------------------------------------------------ + +# DEPENDENCIES_REPO="git@git.code.tencent.com:OpenHUTB/dependencies_u.git" +# Fallback if SSH is not configured: +DEPENDENCIES_REPO="https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/dependencies_u.git" + +DEPENDENCIES_DIR="$BUILD_DIR/dependencies" + +URLAB_DIR="$PLUGINS_DIR/UnrealRoboticsLab" +URLAB_THIRD_PARTY="$URLAB_DIR/third_party/install" + +# ============================================================================== +# -- Banner -------------------------------------------------------------------- +# ============================================================================== + +log "==============================================" +log " HUTB Ubuntu Setup Script" +log " (adapted from setup.bat)" +log "==============================================" +log "Project root : $PROJECT_ROOT" +log "Build dir : $BUILD_DIR" +log "Plugins dir : $PLUGINS_DIR" +log "Dependencies repo: $DEPENDENCIES_REPO" +log "" + +# ============================================================================== +# -- Step 0: Ensure essential system tools ------------------------------------- +# ============================================================================== +# Mirrors the Windows .bat which downloads git + 7zip first, then uses them to +# obtain everything else. On Ubuntu these are native system packages. + +log "==============================================" +log " Step 0 — Essential System Tools" +log "==============================================" + +MISSING_TOOLS=() +for cmd in git curl wget unzip make gcc g++; do + if ! command -v "$cmd" &>/dev/null; then + MISSING_TOOLS+=("$cmd") + fi +done + +if [ ${#MISSING_TOOLS[@]} -gt 0 ]; then + warn "Installing missing tools: ${MISSING_TOOLS[*]}" + sudo apt-get update -qq + sudo apt-get install -y -qq "${MISSING_TOOLS[@]}" +fi + +# 7z — used extensively in .bat for extracting archives +if ! command -v 7z &>/dev/null; then + log "Installing p7zip-full..." + sudo apt-get install -y -qq p7zip-full +fi + +success "Essential tools ready." +log "" + +# ============================================================================== +# -- Step 1: Ensure Build directory --------------------------------------------- +# ============================================================================== +# Mirrors: if not exist "%cd%\Build" mkdir "%cd%\Build" + +if [ ! -d "$BUILD_DIR" ]; then + log "Creating Build/ directory..." + mkdir -p "$BUILD_DIR" +else + log "Build/ directory already exists." +fi + +# ============================================================================== +# -- Step 2: Clone dependencies_u repository ----------------------------------- +# ============================================================================== +# Mirrors: +# git clone https://.../dependencies.git Build\dependencies +# cd dependencies && git lfs pull +# +# The Windows .bat targets "dependencies" (Windows builds). +# We target "dependencies_u" — the Ubuntu counterpart. + +log "==============================================" +log " Step 2 — Clone dependencies_u" +log "==============================================" + +export GIT_LFS_SKIP_SMUDGE=1 + +if [ ! -d "$DEPENDENCIES_DIR" ]; then + log "Cloning $DEPENDENCIES_REPO ..." + pushd "$BUILD_DIR" >/dev/null + + git clone "$DEPENDENCIES_REPO" dependencies 2>/dev/null || { + warn "" + warn "============================================" + warn " Failed to clone dependencies_u." + warn " Please check:" + warn " 1. SSH key is added to git.code.tencent.com" + warn " 2. The repo exists at:" + warn " git@git.code.tencent.com:OpenHUTB/dependencies_u.git" + warn " Or use HTTPS fallback (edit setup.sh)." + warn "============================================" + warn "" + warn " Continuing without dependencies — some" + warn " features will be unavailable." + } + + if [ -d "$DEPENDENCIES_DIR" ]; then + cd "$DEPENDENCIES_DIR" + git lfs pull 2>/dev/null || warn "git lfs pull failed (non-critical)." + success "dependencies_u cloned." + fi + + popd >/dev/null +else + log "dependencies/ already exists, skipping clone." + log " (To force re-clone: rm -rf $DEPENDENCIES_DIR && re-run)" +fi + +log "" + +# ============================================================================== +# -- Step 3: Run dependencies_u/init.sh ---------------------------------------- +# ============================================================================== +# All extraction / initialization logic lives inside the dependencies_u repo. +# setup.sh only orchestrates — init.sh does the actual work of unzipping +# plugins, extracting source packages, installing miniconda3, etc. + +if [ ! -d "$DEPENDENCIES_DIR" ]; then + warn "dependencies_u not available — skipping extraction." +else + log "==============================================" + log " Step 3 — Run dependencies_u/init.sh" + log "==============================================" + + INIT_SCRIPT="$DEPENDENCIES_DIR/init.sh" + if [ -f "$INIT_SCRIPT" ]; then + log "Delegating to $INIT_SCRIPT ..." + log "" + bash "$INIT_SCRIPT" "$PROJECT_ROOT" + success "dependencies_u initialization complete." + else + error "init.sh not found in dependencies_u!" + error "Expected at: $INIT_SCRIPT" + error "The dependencies_u repo may be incomplete or corrupted." + exit 1 + fi +fi + +log "" + +# ============================================================================== +# -- Step 4: System packages via apt ------------------------------------------- +# ============================================================================== + +if [ "$SKIP_PREREQUISITES" = false ]; then + log "==============================================" + log " Step 4 — System Prerequisites (apt)" + log "==============================================" + + log "Installing build dependencies..." + sudo apt-get update -qq + + sudo apt-get install -y -qq \ + build-essential \ + clang-10 \ + libc++-dev \ + libc++abi-dev \ + ninja-build \ + python3 \ + python3-dev \ + python3-pip \ + python3-venv \ + libomp-dev \ + libssl-dev \ + libncurses5 \ + libncurses5-dev \ + libsdl2-dev \ + libtiff5-dev \ + libjpeg-dev \ + libcurl4-openssl-dev \ + libzmq3-dev \ + doxygen \ + patchelf \ + libxml2-dev \ + libicu-dev \ + 2>/dev/null || warn "Some apt packages may have failed to install." + + # clang-10 may not exist on newer Ubuntu (e.g. 24.04); fall back to clang + if ! command -v clang-10 &>/dev/null && ! command -v clang &>/dev/null; then + warn "clang not found — installing clang..." + sudo apt-get install -y -qq clang + fi + + success "System prerequisites installed." +else + log "Skipping system prerequisites (--skip-prerequisites)." +fi + +log "" + +# ============================================================================== +# -- Step 5: Python environment ------------------------------------------------ +# ============================================================================== +# init.sh already installed miniconda3 to Build/dependencies/prerequisites/. +# Here we create the conda environment and install Python requirements. + +log "==============================================" +log " Step 5 — Python Environment" +log "==============================================" + +MINICONDA_DIR="$BUILD_DIR/dependencies/prerequisites/miniconda3" + +if [ -d "$MINICONDA_DIR" ] && [ -f "$MINICONDA_DIR/bin/conda" ]; then + log "Setting up conda environment 'hutb_3.8'..." + + # Create environment if not already present + if ! "$MINICONDA_DIR/bin/conda" env list 2>/dev/null | grep -q hutb_3.8; then + "$MINICONDA_DIR/bin/conda" create -n hutb_3.8 python=3.8 -y 2>/dev/null || \ + warn " Conda env creation failed." + fi + + # Install Python requirements + if [ -f "$PROJECT_ROOT/requirements.txt" ]; then + log " Installing Python requirements (requirements.txt)..." + "$MINICONDA_DIR/envs/hutb_3.8/bin/pip" install -r "$PROJECT_ROOT/requirements.txt" 2>/dev/null || \ + warn " pip install failed (non-critical)." + fi + + if [ -f "$PROJECT_ROOT/PythonAPI/carla/requirements.txt" ]; then + log " Installing Python requirements (PythonAPI)..." + "$MINICONDA_DIR/envs/hutb_3.8/bin/pip" install -r "$PROJECT_ROOT/PythonAPI/carla/requirements.txt" 2>/dev/null || true + fi + + success "conda env 'hutb_3.8' ready." +else + # Fallback: system python3 venv + VENV_DIR="$BUILD_DIR/venv" + if [ ! -d "$VENV_DIR" ] && command -v python3 &>/dev/null; then + log "No conda found — creating Python venv as fallback..." + python3 -m venv "$VENV_DIR" 2>/dev/null || true + if [ -f "$VENV_DIR/bin/pip" ]; then + "$VENV_DIR/bin/pip" install --upgrade pip 2>/dev/null || true + [ -f "$PROJECT_ROOT/requirements.txt" ] && \ + "$VENV_DIR/bin/pip" install -r "$PROJECT_ROOT/requirements.txt" 2>/dev/null || true + fi + success "Python venv created at $VENV_DIR" + fi +fi + +log "" + +# ============================================================================== +# -- Step 6: Build C++ dependencies -------------------------------------------- +# ============================================================================== + +if [ "$DOWNLOAD_ONLY" = false ]; then + log "==============================================" + log " Step 6 — C++ Dependency Build" + log "==============================================" + + BUILD_TOOLS_SETUP="$PROJECT_ROOT/Util/BuildTools/Setup.sh" + + if [ -f "$BUILD_TOOLS_SETUP" ]; then + log "Running $BUILD_TOOLS_SETUP --chrono ..." + log "(This compiles boost, rpclib, gtest, recast, eigen, etc. from source)" + log "" + bash "$BUILD_TOOLS_SETUP" --chrono || warn "BuildTools/Setup.sh reported errors." + else + warn "$BUILD_TOOLS_SETUP not found — skipping C++ build." + warn "Run 'make setup' or build dependencies manually." + fi +else + log "Skipping C++ build (--download-only)." +fi + +log "" + +# ============================================================================== +# -- Summary ------------------------------------------------------------------- +# ============================================================================== + +log "==============================================" +log " Setup Complete!" +log "==============================================" +log "" + +# List what's in Plugins +log "Plugins directory: $PLUGINS_DIR" +if [ -d "$PLUGINS_DIR" ]; then + log "Available plugins:" + for d in "$PLUGINS_DIR"/*/; do + [ -d "$d" ] && echo " - $(basename "$d")" + done +else + warn "Plugins directory does not exist!" +fi + +log "" +log "Dependencies repo : $DEPENDENCIES_DIR" +log "Third-party (URLab): $URLAB_THIRD_PARTY" +log "" +log "Next steps:" +log " 1. Ensure UE4 engine is at ~/UnrealEngine_4.26" +log " 2. make CarlaUE4Editor" +log " 3. make package" +log "" + +success "Done!" From 33a1ad7e12f852e905d2c70a2164c6ff1f69a5b4 Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Thu, 16 Jul 2026 20:48:08 +0800 Subject: [PATCH 28/29] =?UTF-8?q?=E8=A7=A3=E5=8E=8B=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E4=BB=A5=E5=8F=8A=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index e7cdd48ab0..879538978d 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -27,10 +27,11 @@ jobs: - name: setup run: | - source ./setEnv64.sh + source ./setEnv64.sh git update-index --skip-worktree Unreal/CarlaUE4/CarlaUE4.uproject + bash setup.sh --download-only --skip-prerequisites make setup ARGS="--chrono" - shell: bash + shell: bash - name: build run: | From e4a3fab2ef1fa0209f499eb99b9ab7dbea5fbf7d Mon Sep 17 00:00:00 2001 From: jiandaoshou-aidehua <2893666867@qq.com> Date: Fri, 17 Jul 2026 09:46:42 +0800 Subject: [PATCH 29/29] =?UTF-8?q?=E5=8F=AA=E8=A7=A3=E5=8E=8B=20=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=9B=B8=E5=85=B3=20=E6=96=87=E4=BB=B6(RoadRunner?= =?UTF-8?q?=E3=80=81Cesium=E3=80=81MuJoCo=E3=80=81CoACD=E3=80=81libzmq)?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=B8=85=E7=90=86=20Build/*-source=20Build/*?= =?UTF-8?q?-src=20=E6=AE=8B=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_linux.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 879538978d..35176c8917 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -29,7 +29,31 @@ jobs: run: | source ./setEnv64.sh git update-index --skip-worktree Unreal/CarlaUE4/CarlaUE4.uproject - bash setup.sh --download-only --skip-prerequisites + + # Clone dependencies_u (only for UE4 plugins, not source pkgs) + echo "=== Cloning dependencies_u for plugins ===" + GIT_LFS_SKIP_SMUDGE=1 git clone \ + "https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/dependencies_u.git" \ + Build/dependencies 2>/dev/null || true + if [ -d Build/dependencies ]; then + cd Build/dependencies && git lfs pull && cd ../.. + # Extract plugins + 7z x Build/dependencies/Plugins/RoadRunner_Plugins.zip -o"Unreal/CarlaUE4/Plugins/" -y + 7z x Build/dependencies/Plugins/CesiumForUnreal-426-v1.18.0-ue4.zip -o"Unreal/CarlaUE4/Plugins/" -y + # UnrealRoboticsLab third-party deps + mkdir -p Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install + mkdir -p Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/MuJoCo + tar -xzf Build/dependencies/Plugins/mujoco-3.3.5-linux-x86_64.tar.gz -C Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/MuJoCo --strip-components=1 2>/dev/null || true + mkdir -p Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/CoACD + unzip -qo Build/dependencies/Plugins/CoACD.zip -d Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/CoACD 2>/dev/null || true + mkdir -p Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/libzmq + tar -xzf Build/dependencies/Plugins/libzmq-linux.tar.gz -C Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/libzmq 2>/dev/null || true + echo "=== Plugins extracted ===" + fi + + # Clean leftover source dirs from previous runs (avoid conflict with make setup) + rm -rf Build/*-source Build/*-src 2>/dev/null || true + make setup ARGS="--chrono" shell: bash