make.bat 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. call "%BLENDER_DIR%\build_files\windows\reset_variables.cmd"
  8. call "%BLENDER_DIR%\build_files\windows\check_spaces_in_path.cmd"
  9. if errorlevel 1 goto EOF
  10. call "%BLENDER_DIR%\build_files\windows\parse_arguments.cmd" %*
  11. if errorlevel 1 goto EOF
  12. call "%BLENDER_DIR%\build_files\windows\find_dependencies.cmd"
  13. if errorlevel 1 goto EOF
  14. if "%BUILD_SHOW_HASHES%" == "1" (
  15. call "%BLENDER_DIR%\build_files\windows\show_hashes.cmd"
  16. goto EOF
  17. )
  18. if "%SHOW_HELP%" == "1" (
  19. call "%BLENDER_DIR%\build_files\windows\show_help.cmd"
  20. goto EOF
  21. )
  22. if "%BUILD_UPDATE%" == "1" (
  23. call "%BLENDER_DIR%\build_files\windows\update_sources.cmd"
  24. goto EOF
  25. )
  26. if "%FORMAT%" == "1" (
  27. call "%BLENDER_DIR%\build_files\windows\format.cmd"
  28. goto EOF
  29. )
  30. call "%BLENDER_DIR%\build_files\windows\detect_architecture.cmd"
  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. call "%BLENDER_DIR%\build_files\windows\set_build_dir.cmd"
  45. echo Building blender with VS%BUILD_VS_YEAR% for %BUILD_ARCH% in %BUILD_DIR%
  46. call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
  47. if errorlevel 1 goto EOF
  48. call "%BLENDER_DIR%\build_files\windows\check_submodules.cmd"
  49. if errorlevel 1 goto EOF
  50. if "%BUILD_WITH_NINJA%" == "" (
  51. call "%BLENDER_DIR%\build_files\windows\configure_msbuild.cmd"
  52. if errorlevel 1 goto EOF
  53. call "%BLENDER_DIR%\build_files\windows\build_msbuild.cmd"
  54. if errorlevel 1 goto EOF
  55. ) else (
  56. call "%BLENDER_DIR%\build_files\windows\configure_ninja.cmd"
  57. if errorlevel 1 goto EOF
  58. call "%BLENDER_DIR%\build_files\windows\build_ninja.cmd"
  59. if errorlevel 1 goto EOF
  60. )
  61. :EOF