From f0bbb0266af4bfdcda5e244771a40eeb9d7cfd2b Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Thu, 22 Feb 2024 10:40:25 -0700 Subject: [PATCH] make.bat: fix make update not working properly Git escaped a quote and used all of the cli arguments as the folder name. Also fixes: - Progress on the initial clone so it doesn't appear stuck - re-detect python after updating libs, so you don't have to run make update twice on a fresh clone. - Hide python not found warning unless the lib folder exists (this seemingly got lost in one of the merges) --- build_files/windows/check_libraries.cmd | 6 +++--- build_files/windows/find_dependencies.cmd | 4 +++- build_files/windows/lib_update.cmd | 9 ++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/build_files/windows/check_libraries.cmd b/build_files/windows/check_libraries.cmd index 5322b1a9327..5c29f0fe6e9 100644 --- a/build_files/windows/check_libraries.cmd +++ b/build_files/windows/check_libraries.cmd @@ -1,4 +1,4 @@ -set BUILD_VS_LIBDIR="lib\windows_x64" +set BUILD_VS_LIBDIR=lib/windows_x64 if NOT "%verbose%" == "" ( echo Library Directory = "%BUILD_VS_LIBDIR%" @@ -15,8 +15,8 @@ if NOT EXIST "%BUILD_VS_LIBDIR%\.git" ( echo Downloading %BUILD_VS_LIBDIR% libraries, please wait. echo. :RETRY - "%GIT%" -C "%BLENDER_DIR%" config --local "submodule.%BUILD_VS_LIBDIR%.update" "checkout" - "%GIT%" -C "%BLENDER_DIR%" submodule update --init "%BUILD_VS_LIBDIR%" + "%GIT%" -C "%BLENDER_DIR%\" config --local "submodule.%BUILD_VS_LIBDIR%.update" "checkout" + "%GIT%" -C "%BLENDER_DIR%\" submodule update --progress --init "%BUILD_VS_LIBDIR%" if errorlevel 1 ( set /p LibRetry= "Error during download, retry? y/n" if /I "!LibRetry!"=="Y" ( diff --git a/build_files/windows/find_dependencies.cmd b/build_files/windows/find_dependencies.cmd index f16a46cd51f..abcb92dc2f7 100644 --- a/build_files/windows/find_dependencies.cmd +++ b/build_files/windows/find_dependencies.cmd @@ -24,7 +24,9 @@ if EXIST %PYTHON% ( ) if NOT EXIST %PYTHON% ( - echo Warning: Python not found, there is likely an issue with the library folder + if EXIST %BLENDER_DIR%\lib\windows_x64\ ( + echo Warning: Python not found, there is likely an issue with the library folder + ) set PYTHON="" ) diff --git a/build_files/windows/lib_update.cmd b/build_files/windows/lib_update.cmd index 56b8fe026c6..7564ceab83e 100644 --- a/build_files/windows/lib_update.cmd +++ b/build_files/windows/lib_update.cmd @@ -1,8 +1,8 @@ -set BUILD_VS_LIBDIR="lib\windows_x64" +set BUILD_VS_LIBDIR=lib/windows_x64 :RETRY -"%GIT%" -C "%BLENDER_DIR%" config --local "submodule.%BUILD_VS_LIBDIR%.update" "checkout" -"%GIT%" -C "%BLENDER_DIR%" submodule update --init "%BUILD_VS_LIBDIR%" +"%GIT%" -C "%BLENDER_DIR%\" config --local "submodule.%BUILD_VS_LIBDIR%.update" "checkout" +"%GIT%" -C "%BLENDER_DIR%\" submodule update --progress --init "%BUILD_VS_LIBDIR%" if errorlevel 1 ( set /p LibRetry= "Error during update, retry? y/n" if /I "!LibRetry!"=="Y" ( @@ -14,3 +14,6 @@ if errorlevel 1 ( echo. exit /b 1 ) +REM re-detect the dependencies after updating the libraries so any python version +REM changes are accounted for. +call "%~dp0\find_dependencies.cmd"