2015-12-31 18:14:49 +00:00
|
|
|
@echo off
|
|
|
|
REM This batch file does an out-of-source CMake build in ../build_windows
|
|
|
|
REM This is for users who like to configure & build Blender with a single command.
|
2017-04-23 16:10:57 +00:00
|
|
|
setlocal EnableDelayedExpansion
|
2016-01-01 14:42:43 +00:00
|
|
|
setlocal ENABLEEXTENSIONS
|
2015-12-31 18:14:49 +00:00
|
|
|
set BLENDER_DIR=%~dp0
|
2018-05-25 16:24:01 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
call "%BLENDER_DIR%\build_files\windows\reset_variables.cmd"
|
2016-11-17 03:13:58 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
call "%BLENDER_DIR%\build_files\windows\check_spaces_in_path.cmd"
|
|
|
|
if errorlevel 1 goto EOF
|
2017-01-19 20:55:50 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
call "%BLENDER_DIR%\build_files\windows\parse_arguments.cmd" %*
|
|
|
|
if errorlevel 1 goto EOF
|
2017-01-19 20:55:50 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
call "%BLENDER_DIR%\build_files\windows\find_dependencies.cmd"
|
|
|
|
if errorlevel 1 goto EOF
|
2017-01-19 20:55:50 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
if "%SHOW_HELP%" == "1" (
|
|
|
|
call "%BLENDER_DIR%\build_files\windows\show_help.cmd"
|
2016-09-14 23:50:16 +00:00
|
|
|
goto EOF
|
|
|
|
)
|
2017-08-19 18:00:30 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
if "%BUILD_UPDATE%" == "1" (
|
|
|
|
call "%BLENDER_DIR%\build_files\windows\update_sources.cmd"
|
2017-08-21 05:37:38 +00:00
|
|
|
goto EOF
|
2016-09-14 23:50:16 +00:00
|
|
|
)
|
2017-08-19 18:00:30 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
call "%BLENDER_DIR%\build_files\windows\detect_architecture.cmd"
|
2016-10-01 16:22:28 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
if "%BUILD_VS_YEAR%" == "" (
|
|
|
|
call "%BLENDER_DIR%\build_files\windows\autodetect_msvc.cmd"
|
|
|
|
if errorlevel 1 (
|
|
|
|
echo Visual Studio not found ^(try with the 'verbose' switch for more information^)
|
|
|
|
goto EOF
|
2017-12-11 08:28:40 +00:00
|
|
|
)
|
2018-05-25 23:57:13 +00:00
|
|
|
) else (
|
|
|
|
call "%BLENDER_DIR%\build_files\windows\detect_msvc%BUILD_VS_YEAR%.cmd"
|
|
|
|
if errorlevel 1 (
|
|
|
|
echo Visual Studio %BUILD_VS_YEAR% not found ^(try with the 'verbose' switch for more information^)
|
2016-01-01 19:30:19 +00:00
|
|
|
goto EOF
|
|
|
|
)
|
2016-01-01 07:47:30 +00:00
|
|
|
)
|
2017-04-26 14:46:35 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
call "%BLENDER_DIR%\build_files\windows\set_build_dir.cmd"
|
2015-12-31 18:14:49 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
echo Building blender with VS%BUILD_VS_YEAR% for %BUILD_ARCH% in %BUILD_DIR%
|
2016-01-01 05:04:21 +00:00
|
|
|
|
2018-05-25 23:57:13 +00:00
|
|
|
call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
|
|
|
|
if errorlevel 1 goto EOF
|
|
|
|
|
|
|
|
call "%BLENDER_DIR%\build_files\windows\check_submodules.cmd"
|
|
|
|
if errorlevel 1 goto EOF
|
2016-01-01 05:04:21 +00:00
|
|
|
|
2018-05-26 03:46:42 +00:00
|
|
|
if "%BUILD_WITH_NINJA%" == "" (
|
|
|
|
call "%BLENDER_DIR%\build_files\windows\configure_msbuild.cmd"
|
|
|
|
if errorlevel 1 goto EOF
|
2016-01-01 05:04:21 +00:00
|
|
|
|
2018-05-26 03:46:42 +00:00
|
|
|
call "%BLENDER_DIR%\build_files\windows\build_msbuild.cmd"
|
|
|
|
if errorlevel 1 goto EOF
|
|
|
|
) else (
|
|
|
|
call "%BLENDER_DIR%\build_files\windows\configure_ninja.cmd"
|
|
|
|
if errorlevel 1 goto EOF
|
|
|
|
|
|
|
|
call "%BLENDER_DIR%\build_files\windows\build_ninja.cmd"
|
|
|
|
if errorlevel 1 goto EOF
|
|
|
|
)
|
2015-12-31 18:14:49 +00:00
|
|
|
|
2018-05-25 23:59:07 +00:00
|
|
|
:EOF
|