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

check_libraries.cmd « windows « build_files - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e8c04fb325857df0e724a246f993e00094aaa5f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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%"

if NOT "%verbose%" == "" (
	echo Library Directory = "%BUILD_VS_LIBDIR%"
)
if NOT EXIST %BUILD_VS_LIBDIR% (
	rem libs not found, but svn is on the system
	if not "%SVN%"=="" (
		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.
			echo Downloading %BUILD_VS_SVNDIR% libraries, please wait.
			echo.
:RETRY			
			"%SVN%" checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/%BUILD_VS_SVNDIR% %BUILD_VS_LIBDIR%
			if errorlevel 1 (
				set /p LibRetry= "Error during download, retry? y/n"
				if /I "!LibRetry!"=="Y" (
					cd %BUILD_VS_LIBDIR%
					"%SVN%" cleanup 
					cd %BLENDER_DIR%
					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
			)
		)
	)
) else (
	if NOT EXIST %PYTHON% (
		if not "%SVN%"=="" (
			echo.
			echo Python not found in external libraries, updating to latest version
			echo.
			"%SVN%" update %BUILD_VS_LIBDIR%
		)
	)
)

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.
	if "%SVN%"=="" (
		echo This is most likely caused by svn.exe not being available.
	)
	exit /b 1
)