2024-03-06 15:46:43 +01:00
|
|
|
if "%BUILD_ARCH%" == "arm64" (
|
|
|
|
|
set BUILD_VS_LIBDIR=lib/windows_arm64
|
|
|
|
|
) else (
|
|
|
|
|
set BUILD_VS_LIBDIR=lib/windows_x64
|
|
|
|
|
)
|
2018-05-25 17:57:13 -06:00
|
|
|
|
|
|
|
|
if NOT "%verbose%" == "" (
|
|
|
|
|
echo Library Directory = "%BUILD_VS_LIBDIR%"
|
|
|
|
|
)
|
2024-02-22 13:50:55 +01:00
|
|
|
if NOT EXIST "%BUILD_VS_LIBDIR%\.git" (
|
|
|
|
|
rem libs not found, but git is on the system
|
|
|
|
|
if not "%GIT%"=="" (
|
2018-05-25 17:57:13 -06:00
|
|
|
echo.
|
|
|
|
|
echo The required external libraries in %BUILD_VS_LIBDIR% are missing
|
|
|
|
|
echo.
|
|
|
|
|
set /p GetLibs= "Would you like to download them? (y/n)"
|
|
|
|
|
if /I "!GetLibs!"=="Y" (
|
|
|
|
|
echo.
|
2024-02-22 13:50:55 +01:00
|
|
|
echo Downloading %BUILD_VS_LIBDIR% libraries, please wait.
|
2018-05-25 17:57:13 -06:00
|
|
|
echo.
|
2024-02-22 13:09:34 -07:00
|
|
|
echo *********************************************************
|
|
|
|
|
echo * *
|
|
|
|
|
echo * Note: Once the initial download finishes and you see *
|
|
|
|
|
echo * "Resolving deltas: 100%% (nnn/nnn) done" *
|
|
|
|
|
echo * a second, much larger, update will occur with *
|
|
|
|
|
echo * no visible updates. Please do not interrupt *
|
|
|
|
|
echo * this process. It may take over an hour to *
|
|
|
|
|
echo * complete depending on your internet connection. *
|
|
|
|
|
echo * *
|
|
|
|
|
echo *********************************************************
|
2024-02-22 13:50:55 +01:00
|
|
|
:RETRY
|
2024-02-22 10:40:25 -07:00
|
|
|
"%GIT%" -C "%BLENDER_DIR%\" config --local "submodule.%BUILD_VS_LIBDIR%.update" "checkout"
|
2024-02-26 16:49:08 -07:00
|
|
|
set GIT_LFS_SKIP_SMUDGE=1
|
2024-02-22 10:40:25 -07:00
|
|
|
"%GIT%" -C "%BLENDER_DIR%\" submodule update --progress --init "%BUILD_VS_LIBDIR%"
|
2024-02-26 16:49:08 -07:00
|
|
|
set GIT_LFS_SKIP_SMUDGE=
|
|
|
|
|
"%GIT%" -C "./%BUILD_VS_LIBDIR%" lfs pull
|
2018-05-25 17:57:13 -06:00
|
|
|
if errorlevel 1 (
|
2018-09-19 17:48:11 +02:00
|
|
|
set /p LibRetry= "Error during download, retry? y/n"
|
2018-05-25 17:57:13 -06:00
|
|
|
if /I "!LibRetry!"=="Y" (
|
|
|
|
|
goto RETRY
|
|
|
|
|
)
|
|
|
|
|
echo.
|
|
|
|
|
echo Error: Download of external libraries failed.
|
2024-02-22 13:50:55 +01:00
|
|
|
echo Until this is resolved you CANNOT make a successful blender build.
|
2018-05-25 17:57:13 -06:00
|
|
|
echo.
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
2024-02-22 13:09:34 -07:00
|
|
|
) else (
|
|
|
|
|
echo Not downloading libraries, until this is resolved you CANNOT make a successful blender build.
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
2018-05-25 17:57:13 -06:00
|
|
|
)
|
2019-08-23 19:35:02 +02:00
|
|
|
) else (
|
|
|
|
|
if NOT EXIST %PYTHON% (
|
2024-02-22 13:50:55 +01:00
|
|
|
if not "%GIT%"=="" (
|
2019-08-23 19:35:02 +02:00
|
|
|
echo.
|
|
|
|
|
echo Python not found in external libraries, updating to latest version
|
|
|
|
|
echo.
|
2025-06-03 15:49:07 +02:00
|
|
|
"%GIT%" -C "%BLENDER_DIR%\" submodule update "%BUILD_VS_LIBDIR%"
|
2019-08-23 19:35:02 +02:00
|
|
|
)
|
|
|
|
|
)
|
2018-05-25 17:57:13 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if NOT EXIST %BUILD_VS_LIBDIR% (
|
|
|
|
|
echo.
|
|
|
|
|
echo Error: Required libraries not found at "%BUILD_VS_LIBDIR%"
|
|
|
|
|
echo This is needed for building, aborting!
|
|
|
|
|
echo.
|
2024-02-22 13:50:55 +01:00
|
|
|
if "%GIT%"=="" (
|
|
|
|
|
echo This is most likely caused by git.exe not being available.
|
2019-10-31 09:45:56 -06:00
|
|
|
)
|
2018-05-25 17:57:13 -06:00
|
|
|
exit /b 1
|
|
|
|
|
)
|