4 Star 18 Fork 8

Gitee 极速下载/carla

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/carla-simulator/carla
克隆/下载
Update.bat 2.70 KB
一键复制 编辑 原始数据 按行查看 历史
Ruben Abad 提交于 2024-01-28 21:57 . Access files through https
@echo off
rem ============================================================================
rem -- Set up environment ------------------------------------------------------
rem ============================================================================
set SCRIPT_DIR=%~dp0
set CONTENT_FOLDER=%SCRIPT_DIR%Unreal/CarlaUE4/Content/Carla
set VERSION_FILE=%CONTENT_FOLDER%/.version
set CONTENT_VERSIONS=%SCRIPT_DIR%/Util/ContentVersions.txt
rem ============================================================================
rem -- Get the last version to download ----------------------------------------
rem ============================================================================
if not exist "%CONTENT_FOLDER%" mkdir "%CONTENT_FOLDER%"
for /F "delims=" %%a in (%CONTENT_VERSIONS%) do (
set "lastLine=%%a"
)
set CONTENT_ID=%lastLine:~-16,16%
set CONTENT_LINK=https://carla-assets.s3.us-east-005.backblazeb2.com/%CONTENT_ID%.tar.gz
if "%CONTENT_ID:~0,2%"=="20" (
set CONTENT_FILE=%CONTENT_FOLDER%/%CONTENT_ID%.tar.gz
set CONTENT_FILE_TAR=%CONTENT_FOLDER%/%CONTENT_ID%.tar
echo %CONTENT_ID%
echo %CONTENT_LINK%
) else (
echo Error reading the latest version from ContentVersions.txt, check last line of file %CONTENT_VERSIONS%'
goto error_download
)
rem ============================================================================
rem -- Download the content ----------------------------------------------------
rem ============================================================================
echo Downloading "%CONTENT_LINK%"...
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%CONTENT_LINK%', '%CONTENT_FILE%')"
if %errorlevel% neq 0 goto error_download
echo %FILE_N% Extracting content from "%CONTENT_FILE%", this can take a while...
if exist "%ProgramW6432%/7-Zip/7z.exe" (
"%ProgramW6432%/7-Zip/7z.exe" x "%CONTENT_FILE%" -o"%CONTENT_FOLDER%" -y
if %errorlevel% neq 0 goto error_download
echo Deleting %CONTENT_FILE:/=\%
del %CONTENT_FILE:/=\%
"%ProgramW6432%/7-Zip/7z.exe" x "%CONTENT_FILE_TAR%" -o"%CONTENT_FOLDER%" -y
if %errorlevel% neq 0 goto error_download
echo Deleting %CONTENT_FILE_TAR:/=\%
del %CONTENT_FILE_TAR:/=\%
) else (
powershell -Command "Expand-Archive '%CONTENT_FILE%' -DestinationPath '%CONTENT_FOLDER%'"
if %errorlevel% neq 0 goto error_download
del %CONTENT_FILE%
)
goto success
:success
echo.
echo %FILE_N% Content has been successfully installed in "%CONTENT_FOLDER%"!
goto good_exit
:error_download
goto bad_exit
:good_exit
echo %FILE_N% Exiting...
endlocal
exit /b 0
:bad_exit
if exist "%CONTENT_FILE%" rd /s /q "%CONTENT_FOLDER%"
echo %FILE_N% Exiting with error...
endlocal
exit /b %errorlevel%
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/carla.git
git@gitee.com:mirrors/carla.git
mirrors
carla
carla
dev

搜索帮助