Fix for make.bat
authorCampbell Barton <ideasman42@gmail.com>
Fri, 1 Jan 2016 05:04:21 +0000 (16:04 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 1 Jan 2016 05:05:11 +0000 (16:05 +1100)
Build install target and config path was wrong.

Also use less verbose output and enable multiprocess builds.

make.bat

index 046baf55e0fbc1efd746a95a35bf6df70ef99475..b1b5a35d40582e84ed5e21f0ee6bbe9936e5d21c 100644 (file)
--- a/make.bat
+++ b/make.bat
@@ -5,6 +5,7 @@ REM This is for users who like to configure & build Blender with a single comman
 set BLENDER_DIR=%~dp0
 set BUILD_DIR=%BLENDER_DIR%..\build_windows
 set BUILD_TYPE=Release
+set BUILD_CMAKE_ARGS=
 
 :argv_loop
 if NOT "%1" == "" (
@@ -34,23 +35,23 @@ if NOT "%1" == "" (
        ) else if "%1" == "full" (
                set BUILD_DIR=%BUILD_DIR%_full
                set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
-                   -C"%BLENDER_DIR%\blender\build_files\cmake\config\blender_full.cmake"
+                   -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%\blender\build_files\cmake\config\blender_lite.cmake"
+                   -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%\blender\build_files\cmake\config\cycles_standalone.cmake"
+                   -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%\blender\build_files\cmake\config\blender_headless.cmake"
+                   -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%\blender\build_files\cmake\config\bpy_module.cmake"
+                   -C"%BLENDER_DIR%\build_files\cmake\config\bpy_module.cmake"
 
        REM Non-Build Commands
        ) else if "%1" == "update" (
@@ -73,7 +74,7 @@ if "%PROCESSOR_ARCHITECTURE%" == "x86" (
        set WINDOWS_ARCH=Win64
 )
 
-set BUILD_CMAKE_ARGS=-G "Visual Studio 12 2013 %WINDOWS_ARCH%"
+set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio 12 2013 %WINDOWS_ARCH%"
 mkdir %BUILD_DIR%
 
 cmake ^
@@ -90,7 +91,23 @@ if %ERRORLEVEL% NEQ 0 (
 msbuild ^
        %BUILD_DIR%\Blender.sln ^
        /target:build ^
-       /property:Configuration=%BUILD_TYPE%
+       /property:Configuration=%BUILD_TYPE% ^
+       /maxcpucount ^
+       /verbosity:minimal
+
+if %ERRORLEVEL% NEQ 0 (
+       ECHO "Build Failed"
+       GOTO :EOF
+       )
+
+msbuild ^
+       %BUILD_DIR%\INSTALL.vcxproj ^
+       /property:Configuration=%BUILD_TYPE% ^
+       /verbosity:minimal
+
+echo.
+echo Your build is complete at: "%BUILD_DIR%\bin\%BUILD_TYPE%"
+echo.
 
 :EOF