Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2022-10-21 18:50:14 +0300
committerRay Molenkamp <github@lazydodo.com>2022-10-21 18:50:14 +0300
commit116d7b0042bba7d6cabd8e04c7d020ac3816caf3 (patch)
tree9c7161347f22ed4b470c0fc307a7c71afd8e9209
parent2c108d55031f2b6b5f83810f7f560d1ed81bdc5c (diff)
make.bat: update the libraries before calling update_sources.py
The issue we ran into a lot is we have a python script that updates git+SVN. Which works fine most of the time, except when we have a python update in SVN, or worse a python version change. Python really doesn't enjoy having its files being deleted or changed while it is running and users generally end up with a corrupted lib folder. This change updates the library folder using svn.exe first before letting the python script run sidestepping the issue in most cases. The python script will still run and do the more elaborate work like updating git and switching SVN branches which could still run into issues cause python still doesn't like being changed while running but there's not a whole lot we can about that, for *most* people however things will just work now.
-rw-r--r--build_files/windows/svn_update.cmd24
-rw-r--r--make.bat10
2 files changed, 33 insertions, 1 deletions
diff --git a/build_files/windows/svn_update.cmd b/build_files/windows/svn_update.cmd
new file mode 100644
index 00000000000..f91f03f15b3
--- /dev/null
+++ b/build_files/windows/svn_update.cmd
@@ -0,0 +1,24 @@
+if "%BUILD_VS_YEAR%"=="2019" set BUILD_VS_LIBDIRPOST=vc15
+if "%BUILD_VS_YEAR%"=="2022" set BUILD_VS_LIBDIRPOST=vc15
+
+set BUILD_VS_SVNDIR=win64_%BUILD_VS_LIBDIRPOST%
+set BUILD_VS_LIBDIR="%BLENDER_DIR%..\lib\%BUILD_VS_SVNDIR%"
+
+cd %BUILD_VS_LIBDIR%
+:RETRY
+"%SVN%" update
+if errorlevel 1 (
+ set /p LibRetry= "Error during update, retry? y/n"
+ if /I "!LibRetry!"=="Y" (
+ "%SVN%" cleanup
+ goto RETRY
+ )
+ echo.
+ echo Error: Download of external libraries failed.
+ echo This is needed for building, please manually run 'svn cleanup' and 'svn update' in
+ echo %BUILD_VS_LIBDIR% , until this is resolved you CANNOT make a successful blender build
+ echo.
+ exit /b 1
+)
+
+cd %BLENDER_DIR% \ No newline at end of file
diff --git a/make.bat b/make.bat
index ff8059b0754..0be70053ce1 100644
--- a/make.bat
+++ b/make.bat
@@ -62,9 +62,17 @@ if "%SVN_FIX%" == "1" (
)
if "%BUILD_UPDATE%" == "1" (
+ REM First see if the SVN libs are there and check them out if they are not.
call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
if errorlevel 1 goto EOF
-
+ REM Then update SVN platform libraries, since updating python while python is
+ REM running tends to be problematic. The python script that update_sources
+ REM calls later on may still try to switch branches and run into trouble,
+ REM but for *most* people this will side step the problem.
+ call "%BLENDER_DIR%\build_files\windows\svn_update.cmd"
+ REM Finally call the python script shared between all platforms that updates git
+ REM and does any other SVN work like update the tests or branch switches
+ REM if required.
call "%BLENDER_DIR%\build_files\windows\update_sources.cmd"
goto EOF
)