Merge remote-tracking branch 'origin/master' into blender2.8
[blender.git] / make.bat
1 @echo off
2 REM This batch file does an out-of-source CMake build in ../build_windows
3 REM This is for users who like to configure & build Blender with a single command.
4 setlocal EnableDelayedExpansion
5 setlocal ENABLEEXTENSIONS
6 set BLENDER_DIR=%~dp0
7
8 call "%BLENDER_DIR%\build_files\windows\reset_variables.cmd"
9
10 call "%BLENDER_DIR%\build_files\windows\check_spaces_in_path.cmd"
11 if errorlevel 1 goto EOF
12
13 call "%BLENDER_DIR%\build_files\windows\parse_arguments.cmd" %*
14 if errorlevel 1 goto EOF
15
16 call "%BLENDER_DIR%\build_files\windows\find_dependencies.cmd"
17 if errorlevel 1 goto EOF
18
19 if "%SHOW_HELP%" == "1" (
20         call "%BLENDER_DIR%\build_files\windows\show_help.cmd"
21         goto EOF
22 )
23
24 if "%BUILD_UPDATE%" == "1" (
25         call "%BLENDER_DIR%\build_files\windows\update_sources.cmd"
26         goto EOF
27 )
28
29 call "%BLENDER_DIR%\build_files\windows\detect_architecture.cmd" 
30
31 if "%BUILD_VS_YEAR%" == "" (
32         call "%BLENDER_DIR%\build_files\windows\autodetect_msvc.cmd"
33         if errorlevel 1 (
34                 echo Visual Studio not found ^(try with the 'verbose' switch for more information^)
35                 goto EOF
36         )
37 ) else (
38         call "%BLENDER_DIR%\build_files\windows\detect_msvc%BUILD_VS_YEAR%.cmd"
39         if errorlevel 1 (
40                 echo Visual Studio %BUILD_VS_YEAR% not found ^(try with the 'verbose' switch for more information^)
41                 goto EOF
42         )
43 )
44
45 call "%BLENDER_DIR%\build_files\windows\set_build_dir.cmd" 
46
47 echo Building blender with VS%BUILD_VS_YEAR% for %BUILD_ARCH% in %BUILD_DIR%
48
49 call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd" 
50 if errorlevel 1 goto EOF
51
52 call "%BLENDER_DIR%\build_files\windows\check_submodules.cmd" 
53 if errorlevel 1 goto EOF
54
55 if "%BUILD_WITH_NINJA%" == "" (
56         call "%BLENDER_DIR%\build_files\windows\configure_msbuild.cmd" 
57         if errorlevel 1 goto EOF
58
59         call "%BLENDER_DIR%\build_files\windows\build_msbuild.cmd" 
60         if errorlevel 1 goto EOF
61 ) else (
62         call "%BLENDER_DIR%\build_files\windows\configure_ninja.cmd" 
63         if errorlevel 1 goto EOF
64
65         call "%BLENDER_DIR%\build_files\windows\build_ninja.cmd" 
66         if errorlevel 1 goto EOF
67 )
68
69 :EOF