Linux: Improve headless EGL initialization messages
[blender.git] / make.bat
blob85a8ba95e70ce4a229382d47cedef024dfa1a140
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
8 call "%BLENDER_DIR%\build_files\windows\reset_variables.cmd"
10 call "%BLENDER_DIR%\build_files\windows\check_spaces_in_path.cmd"
11 if errorlevel 1 goto EOF
13 call "%BLENDER_DIR%\build_files\windows\parse_arguments.cmd" %*
14 if errorlevel 1 goto EOF
16 call "%BLENDER_DIR%\build_files\windows\find_dependencies.cmd"
17 if errorlevel 1 goto EOF
19 REM if it is one of the convenience targets and BLENDER_BIN is set
20 REM skip compiler detection
21 if "%ICONS%%ICONS_GEOM%%DOC_PY%" == "1" (
22         if EXIST "%BLENDER_BIN%" (
23                 goto convenience_targets
24         )
27 if "%BUILD_SHOW_HASHES%" == "1" (
28         call "%BLENDER_DIR%\build_files\windows\show_hashes.cmd"
29         goto EOF
32 if "%SHOW_HELP%" == "1" (
33         call "%BLENDER_DIR%\build_files\windows\show_help.cmd"
34         goto EOF
37 if "%FORMAT%" == "1" (
38         call "%BLENDER_DIR%\build_files\windows\format.cmd"
39         goto EOF
42 call "%BLENDER_DIR%\build_files\windows\detect_architecture.cmd"
43 if errorlevel 1 goto EOF
45 if "%BUILD_VS_YEAR%" == "" (
46         call "%BLENDER_DIR%\build_files\windows\autodetect_msvc.cmd"
47         if errorlevel 1 (
48                 echo Visual Studio not found ^(try with the 'verbose' switch for more information^)
49                 goto EOF
50         )
51 ) else (
52         call "%BLENDER_DIR%\build_files\windows\detect_msvc%BUILD_VS_YEAR%.cmd"
53         if errorlevel 1 (
54                 echo Visual Studio %BUILD_VS_YEAR% not found ^(try with the 'verbose' switch for more information^)
55                 goto EOF
56         )
59 if "%SVN_FIX%" == "1" (
60         call "%BLENDER_DIR%\build_files\windows\svn_fix.cmd"
61         goto EOF
64 if "%BUILD_UPDATE%" == "1" (
65         REM First see if the SVN libs are there and check them out if they are not.
66         call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
67         if errorlevel 1 goto EOF
68         if "%BUILD_UPDATE_SVN%" == "1" (
69                 REM Then update SVN platform libraries, since updating python while python is
70                 REM running tends to be problematic. The python script that update_sources
71                 REM calls later on may still try to switch branches and run into trouble,
72                 REM but for *most* people this will side step the problem.
73                 call "%BLENDER_DIR%\build_files\windows\svn_update.cmd"
74         )
75         REM Finally call the python script shared between all platforms that updates git
76         REM and does any other SVN work like update the tests or branch switches
77         REM if required.
78         call "%BLENDER_DIR%\build_files\windows\update_sources.cmd"
79         goto EOF
82 call "%BLENDER_DIR%\build_files\windows\set_build_dir.cmd"
84 :convenience_targets
86 if "%ICONS%" == "1" (
87         call "%BLENDER_DIR%\build_files\windows\icons.cmd"
88         goto EOF
91 if "%ICONS_GEOM%" == "1" (
92         call "%BLENDER_DIR%\build_files\windows\icons_geom.cmd"
93         goto EOF
96 if "%DOC_PY%" == "1" (
97         call "%BLENDER_DIR%\build_files\windows\doc_py.cmd"
98         goto EOF
101 if "%CMAKE%" == "" (
102         echo Cmake not found in path, required for building, exiting...
103         exit /b 1
106 echo Building blender with VS%BUILD_VS_YEAR% for %BUILD_ARCH% in %BUILD_DIR%
108 call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
109 if errorlevel 1 goto EOF
111 if "%TEST%" == "1" (
112         call "%BLENDER_DIR%\build_files\windows\test.cmd"
113         goto EOF
116 if "%BUILD_WITH_NINJA%" == "" (
117         call "%BLENDER_DIR%\build_files\windows\configure_msbuild.cmd"
118         if errorlevel 1 goto EOF
120         call "%BLENDER_DIR%\build_files\windows\build_msbuild.cmd"
121         if errorlevel 1 goto EOF
122 ) else (
123         call "%BLENDER_DIR%\build_files\windows\configure_ninja.cmd"
124         if errorlevel 1 goto EOF
126         call "%BLENDER_DIR%\build_files\windows\build_ninja.cmd"
127         if errorlevel 1 goto EOF
130 :EOF
131 if errorlevel 1 exit /b %errorlevel%