Fix T58006: smart UV project island margin should not use length units.
[blender.git] / make.bat
index b1b5a35d40582e84ed5e21f0ee6bbe9936e5d21c..5fb428fbed034709df994aada23e7abd61855c3a 100644 (file)
--- a/make.bat
+++ b/make.bat
 @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.
-
+setlocal EnableDelayedExpansion
+setlocal ENABLEEXTENSIONS
 set BLENDER_DIR=%~dp0
-set BUILD_DIR=%BLENDER_DIR%..\build_windows
-set BUILD_TYPE=Release
-set BUILD_CMAKE_ARGS=
-
-:argv_loop
-if NOT "%1" == "" (
-
-       REM Help Message
-       if "%1" == "--help" (
-               echo.
-               echo Convenience targets
-               echo - debug
-               echo - full
-               echo - lite
-               echo - headless
-               echo - cycles
-               echo - bpy
-               echo.
-               echo Utilities ^(not associated with building^)
-               echo - update
-               goto EOF
-       )
 
-       REM Build Types
-       if "%1" == "debug" (
-               set BUILD_DIR=%BUILD_DIR%_debug
-               set BUILD_TYPE=Debug
-
-       REM Build Configurations
-       ) else if "%1" == "full" (
-               set BUILD_DIR=%BUILD_DIR%_full
-               set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
-                   -C"%BLENDER_DIR%\build_files\cmake\config\blender_full.cmake"
-       ) else if "%1" == "lite" (
-               set BUILD_DIR=%BUILD_DIR%_lite
-               set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
-                   -C"%BLENDER_DIR%\build_files\cmake\config\blender_lite.cmake"
-       ) else if "%1" == "cycles_standalone" (
-               set BUILD_DIR=%BUILD_DIR%_cycles
-               set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
-                   -C"%BLENDER_DIR%\build_files\cmake\config\cycles_standalone.cmake"
-       ) else if "%1" == "headless" (
-               set BUILD_DIR=%BUILD_DIR%_headless
-               set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
-                   -C"%BLENDER_DIR%\build_files\cmake\config\blender_headless.cmake"
-       ) else if "%1" == "bpy" (
-               set BUILD_DIR=%BUILD_DIR%_bpy
-               set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
-                   -C"%BLENDER_DIR%\build_files\cmake\config\bpy_module.cmake"
-
-       REM Non-Build Commands
-       ) else if "%1" == "update" (
-               svn up ../lib/*
-               git pull --rebase
-               git submodule foreach git pull --rebase origin master
-               goto EOF
-       ) else (
-               echo Command "%1" unknown, aborting!
-               goto EOF
-       )
+call "%BLENDER_DIR%\build_files\windows\reset_variables.cmd"
 
-       shift /1
-       goto argv_loop
+call "%BLENDER_DIR%\build_files\windows\check_spaces_in_path.cmd"
+if errorlevel 1 goto EOF
+
+call "%BLENDER_DIR%\build_files\windows\parse_arguments.cmd" %*
+if errorlevel 1 goto EOF
+
+call "%BLENDER_DIR%\build_files\windows\find_dependencies.cmd"
+if errorlevel 1 goto EOF
+
+if "%BUILD_SHOW_HASHES%" == "1" (
+       call "%BLENDER_DIR%\build_files\windows\show_hashes.cmd"
+       goto EOF
 )
 
-if "%PROCESSOR_ARCHITECTURE%" == "x86" (
-       set WINDOWS_ARCH=
-) else (
-       set WINDOWS_ARCH=Win64
+if "%SHOW_HELP%" == "1" (
+       call "%BLENDER_DIR%\build_files\windows\show_help.cmd"
+       goto EOF
 )
 
-set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio 12 2013 %WINDOWS_ARCH%"
-mkdir %BUILD_DIR%
+if "%BUILD_UPDATE%" == "1" (
+       call "%BLENDER_DIR%\build_files\windows\update_sources.cmd"
+       goto EOF
+)
 
-cmake ^
-       %BUILD_CMAKE_ARGS% ^
-       -H%BLENDER_DIR% ^
-       -B%BUILD_DIR% ^
-       %BUILD_CMAKE_ARGS%
+call "%BLENDER_DIR%\build_files\windows\detect_architecture.cmd"
 
-if %ERRORLEVEL% NEQ 0 (
-       ECHO "CMake Failed"
-       GOTO :EOF
+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
        )
+) 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^)
+               goto EOF
+       )
+)
 
-msbuild ^
-       %BUILD_DIR%\Blender.sln ^
-       /target:build ^
-       /property:Configuration=%BUILD_TYPE% ^
-       /maxcpucount ^
-       /verbosity:minimal
+call "%BLENDER_DIR%\build_files\windows\set_build_dir.cmd"
 
-if %ERRORLEVEL% NEQ 0 (
-       ECHO "Build Failed"
-       GOTO :EOF
-       )
+echo Building blender with VS%BUILD_VS_YEAR% for %BUILD_ARCH% in %BUILD_DIR%
 
-msbuild ^
-       %BUILD_DIR%\INSTALL.vcxproj ^
-       /property:Configuration=%BUILD_TYPE% ^
-       /verbosity:minimal
+call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
+if errorlevel 1 goto EOF
 
-echo.
-echo Your build is complete at: "%BUILD_DIR%\bin\%BUILD_TYPE%"
-echo.
+call "%BLENDER_DIR%\build_files\windows\check_submodules.cmd"
+if errorlevel 1 goto EOF
 
-:EOF
+if "%BUILD_WITH_NINJA%" == "" (
+       call "%BLENDER_DIR%\build_files\windows\configure_msbuild.cmd"
+       if errorlevel 1 goto EOF
 
+       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
+)
+
+:EOF