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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-23 20:35:02 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-30 18:57:18 +0300
commite218d8c24bfbd5384e040417e533ede96c4e831b (patch)
tree962ef76ad77e62e4c1eb66bcac093e55c10cd2e1 /build_files/windows
parentfd48e17461e391c90ff9af96650480b35190e37e (diff)
Build: integrate make_update.py into Windows make.bat
Diffstat (limited to 'build_files/windows')
-rw-r--r--build_files/windows/check_libraries.cmd9
-rw-r--r--build_files/windows/find_dependencies.cmd8
-rw-r--r--build_files/windows/format.cmd5
-rw-r--r--build_files/windows/parse_arguments.cmd8
-rw-r--r--build_files/windows/update_sources.cmd25
5 files changed, 30 insertions, 25 deletions
diff --git a/build_files/windows/check_libraries.cmd b/build_files/windows/check_libraries.cmd
index fcae2c90657..b838c7d7d19 100644
--- a/build_files/windows/check_libraries.cmd
+++ b/build_files/windows/check_libraries.cmd
@@ -39,6 +39,15 @@ if NOT EXIST %BUILD_VS_LIBDIR% (
)
)
)
+) 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% (
diff --git a/build_files/windows/find_dependencies.cmd b/build_files/windows/find_dependencies.cmd
index a861cf1c98b..6a2233ecff7 100644
--- a/build_files/windows/find_dependencies.cmd
+++ b/build_files/windows/find_dependencies.cmd
@@ -2,10 +2,12 @@ REM find all dependencies and set the corresponding environment variables.
for %%X in (svn.exe) do (set SVN=%%~$PATH:X)
for %%X in (cmake.exe) do (set CMAKE=%%~$PATH:X)
for %%X in (git.exe) do (set GIT=%%~$PATH:X)
+set PYTHON=%BLENDER_DIR%\..\lib\win64_vc14\python\37\bin\python.exe
if NOT "%verbose%" == "" (
- echo svn : "%SVN%"
- echo cmake : "%CMAKE%"
- echo git : "%GIT%"
+ echo svn : "%SVN%"
+ echo cmake : "%CMAKE%"
+ echo git : "%GIT%"
+ echo python : "%PYTHON%"
)
if "%CMAKE%" == "" (
echo Cmake not found in path, required for building, exiting...
diff --git a/build_files/windows/format.cmd b/build_files/windows/format.cmd
index f036257e220..43f8b61727d 100644
--- a/build_files/windows/format.cmd
+++ b/build_files/windows/format.cmd
@@ -9,7 +9,7 @@ exit /b 1
:detect_done
echo found clang-format in %CF_PATH%
-if EXIST %BLENDER_DIR%\..\lib\win64_vc14\python\37\bin\python.exe (
+if EXIST %PYTHON% (
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc14\python\37\bin\python.exe
goto detect_python_done
)
@@ -25,6 +25,7 @@ set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths
REM The formatting script expects clang-format to be in the current PATH.
set PATH=%CF_PATH%;%PATH%
-%PYTHON% %FORMAT_PATHS% %FORMAT_ARGS%
+REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
+%PYTHON% -B %FORMAT_PATHS% %FORMAT_ARGS%
:EOF
diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd
index 3f40ef1f5ef..cb375b7fc9f 100644
--- a/build_files/windows/parse_arguments.cmd
+++ b/build_files/windows/parse_arguments.cmd
@@ -82,12 +82,10 @@ if NOT "%1" == "" (
REM Non-Build Commands
) else if "%1" == "update" (
SET BUILD_UPDATE=1
- set BUILD_UPDATE_SVN=1
- set BUILD_UPDATE_GIT=1
+ set BUILD_UPDATE_ARGS=
) else if "%1" == "code_update" (
SET BUILD_UPDATE=1
- set BUILD_UPDATE_SVN=0
- set BUILD_UPDATE_GIT=1
+ set BUILD_UPDATE_ARGS="--only-code"
) else if "%1" == "ninja" (
SET BUILD_WITH_NINJA=1
) else if "%1" == "clean" (
@@ -108,4 +106,4 @@ if NOT "%1" == "" (
:EOF
exit /b 0
:ERR
-exit /b 1 \ No newline at end of file
+exit /b 1
diff --git a/build_files/windows/update_sources.cmd b/build_files/windows/update_sources.cmd
index 1f571eaf92d..f8fbd383090 100644
--- a/build_files/windows/update_sources.cmd
+++ b/build_files/windows/update_sources.cmd
@@ -1,18 +1,13 @@
-if "%BUILD_UPDATE_SVN%" == "1" (
- if "%SVN%" == "" (
- echo svn not found, cannot update libraries
- goto UPDATE_GIT
- )
- "%SVN%" up "%BLENDER_DIR%/../lib/*"
+if EXIST %PYTHON% (
+ goto detect_python_done
)
-:UPDATE_GIT
-if "%BUILD_UPDATE_GIT%" == "1" (
- if "%GIT%" == "" (
- echo Git not found, cannot update code
- goto EOF
- )
- "%GIT%" pull --rebase
- "%GIT%" submodule foreach git pull --rebase origin master
-)
+echo python not found in lib folder
+exit /b 1
+
+:detect_python_done
+
+REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
+%PYTHON% -B %BLENDER_DIR%\build_files\utils\make_update.py --git-command "%GIT%" --svn-command "%SVN%" %BUILD_UPDATE_ARGS%
+
:EOF