2015-12-31 18:14:49 +00:00
|
|
|
@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.
|
2017-04-23 16:10:57 +00:00
|
|
|
setlocal EnableDelayedExpansion
|
2016-01-01 14:42:43 +00:00
|
|
|
setlocal ENABLEEXTENSIONS
|
2015-12-31 18:14:49 +00:00
|
|
|
set BLENDER_DIR=%~dp0
|
2016-11-01 21:30:12 +00:00
|
|
|
set BLENDER_DIR_NOSPACES=%BLENDER_DIR: =%
|
2017-02-16 22:06:03 +00:00
|
|
|
if not "%BLENDER_DIR%"=="%BLENDER_DIR_NOSPACES%" (
|
|
|
|
echo There are spaces detected in the build path "%BLENDER_DIR%", this is currently not supported, exiting....
|
2016-11-01 21:30:12 +00:00
|
|
|
goto EOF
|
|
|
|
)
|
2015-12-31 18:14:49 +00:00
|
|
|
set BUILD_DIR=%BLENDER_DIR%..\build_windows
|
|
|
|
set BUILD_TYPE=Release
|
2016-10-01 16:22:28 +00:00
|
|
|
rem reset all variables so they do not get accidentally get carried over from previous builds
|
2017-04-23 16:10:57 +00:00
|
|
|
set BUILD_DIR_OVERRRIDE=
|
2016-01-01 05:04:21 +00:00
|
|
|
set BUILD_CMAKE_ARGS=
|
2016-10-01 16:22:28 +00:00
|
|
|
set BUILD_ARCH=
|
|
|
|
set BUILD_VS_VER=
|
|
|
|
set BUILD_VS_YEAR=
|
2017-04-23 20:45:51 +00:00
|
|
|
set BUILD_NGE=
|
2016-10-01 16:22:28 +00:00
|
|
|
set KEY_NAME=
|
|
|
|
set MSBUILD_PLATFORM=
|
|
|
|
set MUST_CLEAN=
|
|
|
|
set NOBUILD=
|
|
|
|
set TARGET=
|
|
|
|
set WINDOWS_ARCH=
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
set TESTS_CMAKE_ARGS=
|
2015-12-31 18:14:49 +00:00
|
|
|
:argv_loop
|
|
|
|
if NOT "%1" == "" (
|
|
|
|
|
|
|
|
REM Help Message
|
2016-01-04 09:38:27 +00:00
|
|
|
if "%1" == "help" (
|
2016-09-17 15:19:54 +00:00
|
|
|
goto HELP
|
2015-12-31 18:14:49 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
REM Build Types
|
|
|
|
if "%1" == "debug" (
|
|
|
|
set BUILD_TYPE=Debug
|
|
|
|
REM Build Configurations
|
2017-04-23 20:45:51 +00:00
|
|
|
) else if "%1" == "noge" (
|
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_GAMEENGINE=OFF -DWITH_PLAYER=OFF
|
|
|
|
set BUILD_NGE=_noge
|
2017-04-23 16:10:57 +00:00
|
|
|
) else if "%1" == "builddir" (
|
|
|
|
set BUILD_DIR_OVERRRIDE="%BLENDER_DIR%..\%2"
|
|
|
|
shift /1
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
) else if "%1" == "with_tests" (
|
|
|
|
set TESTS_CMAKE_ARGS=-DWITH_GTESTS=On
|
2015-12-31 18:14:49 +00:00
|
|
|
) else if "%1" == "full" (
|
2016-09-29 01:57:25 +00:00
|
|
|
set TARGET=Full
|
2015-12-31 18:14:49 +00:00
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
2016-01-01 05:04:21 +00:00
|
|
|
-C"%BLENDER_DIR%\build_files\cmake\config\blender_full.cmake"
|
2015-12-31 18:14:49 +00:00
|
|
|
) else if "%1" == "lite" (
|
2016-09-29 01:57:25 +00:00
|
|
|
set TARGET=Lite
|
2015-12-31 18:14:49 +00:00
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
2016-01-01 05:04:21 +00:00
|
|
|
-C"%BLENDER_DIR%\build_files\cmake\config\blender_lite.cmake"
|
2016-01-01 07:47:30 +00:00
|
|
|
) else if "%1" == "cycles" (
|
2016-09-29 01:57:25 +00:00
|
|
|
set TARGET=Cycles
|
2015-12-31 18:14:49 +00:00
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
2016-01-01 05:04:21 +00:00
|
|
|
-C"%BLENDER_DIR%\build_files\cmake\config\cycles_standalone.cmake"
|
2015-12-31 18:14:49 +00:00
|
|
|
) else if "%1" == "headless" (
|
2016-09-29 01:57:25 +00:00
|
|
|
set TARGET=Headless
|
2015-12-31 18:14:49 +00:00
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
2016-01-01 05:04:21 +00:00
|
|
|
-C"%BLENDER_DIR%\build_files\cmake\config\blender_headless.cmake"
|
2015-12-31 18:14:49 +00:00
|
|
|
) else if "%1" == "bpy" (
|
2016-09-29 01:57:25 +00:00
|
|
|
set TARGET=Bpy
|
2015-12-31 18:14:49 +00:00
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
2016-01-01 05:04:21 +00:00
|
|
|
-C"%BLENDER_DIR%\build_files\cmake\config\bpy_module.cmake"
|
2016-09-14 23:50:16 +00:00
|
|
|
) else if "%1" == "release" (
|
2016-09-29 01:57:25 +00:00
|
|
|
set TARGET=Release
|
2016-09-14 23:50:16 +00:00
|
|
|
) else if "%1" == "x86" (
|
|
|
|
set BUILD_ARCH=x86
|
|
|
|
) else if "%1" == "x64" (
|
|
|
|
set BUILD_ARCH=x64
|
2016-11-17 03:13:58 +00:00
|
|
|
) else if "%1" == "2017" (
|
|
|
|
set BUILD_VS_VER=15
|
|
|
|
set BUILD_VS_YEAR=2017
|
2016-09-14 23:50:16 +00:00
|
|
|
) else if "%1" == "2015" (
|
|
|
|
set BUILD_VS_VER=14
|
|
|
|
set BUILD_VS_YEAR=2015
|
|
|
|
) else if "%1" == "2013" (
|
|
|
|
set BUILD_VS_VER=12
|
|
|
|
set BUILD_VS_YEAR=2013
|
|
|
|
) else if "%1" == "packagename" (
|
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DCPACK_OVERRIDE_PACKAGENAME="%2"
|
|
|
|
shift /1
|
|
|
|
) else if "%1" == "nobuild" (
|
|
|
|
set NOBUILD=1
|
|
|
|
) else if "%1" == "showhash" (
|
|
|
|
for /f "delims=" %%i in ('git rev-parse HEAD') do echo Branch_hash=%%i
|
2017-02-16 22:06:03 +00:00
|
|
|
cd release/datafiles/locale
|
2016-09-14 23:50:16 +00:00
|
|
|
for /f "delims=" %%i in ('git rev-parse HEAD') do echo Locale_hash=%%i
|
|
|
|
cd %~dp0
|
|
|
|
cd release/scripts/addons
|
|
|
|
for /f "delims=" %%i in ('git rev-parse HEAD') do echo Addons_Hash=%%i
|
|
|
|
cd %~dp0
|
|
|
|
goto EOF
|
2015-12-31 18:14:49 +00:00
|
|
|
REM Non-Build Commands
|
|
|
|
) else if "%1" == "update" (
|
|
|
|
svn up ../lib/*
|
|
|
|
git pull --rebase
|
|
|
|
git submodule foreach git pull --rebase origin master
|
|
|
|
goto EOF
|
2016-01-01 15:30:02 +00:00
|
|
|
) else if "%1" == "clean" (
|
2016-09-17 15:19:54 +00:00
|
|
|
set MUST_CLEAN=1
|
2015-12-31 18:14:49 +00:00
|
|
|
) else (
|
|
|
|
echo Command "%1" unknown, aborting!
|
|
|
|
goto EOF
|
|
|
|
)
|
|
|
|
|
|
|
|
shift /1
|
|
|
|
goto argv_loop
|
|
|
|
)
|
2016-09-14 23:50:16 +00:00
|
|
|
if "%BUILD_ARCH%"=="" (
|
|
|
|
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
|
|
|
|
set WINDOWS_ARCH= Win64
|
2016-09-29 01:57:25 +00:00
|
|
|
set BUILD_ARCH=x64
|
2016-09-14 23:50:16 +00:00
|
|
|
) else if "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
|
|
|
|
set WINDOWS_ARCH= Win64
|
2016-09-29 01:57:25 +00:00
|
|
|
set BUILD_ARCH=x64
|
2016-09-14 23:50:16 +00:00
|
|
|
) else (
|
|
|
|
set WINDOWS_ARCH=
|
2016-09-29 01:57:25 +00:00
|
|
|
set BUILD_ARCH=x86
|
2016-09-14 23:50:16 +00:00
|
|
|
)
|
|
|
|
) else if "%BUILD_ARCH%"=="x64" (
|
|
|
|
set WINDOWS_ARCH= Win64
|
|
|
|
) else if "%BUILD_ARCH%"=="x86" (
|
|
|
|
set WINDOWS_ARCH=
|
|
|
|
)
|
2015-12-31 18:14:49 +00:00
|
|
|
|
2016-09-14 23:50:16 +00:00
|
|
|
if "%BUILD_VS_VER%"=="" (
|
|
|
|
set BUILD_VS_VER=12
|
|
|
|
set BUILD_VS_YEAR=2013
|
2015-12-31 18:14:49 +00:00
|
|
|
)
|
|
|
|
|
2016-10-01 17:21:42 +00:00
|
|
|
if "%BUILD_ARCH%"=="x64" (
|
|
|
|
set MSBUILD_PLATFORM=x64
|
|
|
|
) else if "%BUILD_ARCH%"=="x86" (
|
|
|
|
set MSBUILD_PLATFORM=win32
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2016-09-29 01:57:25 +00:00
|
|
|
if "%target%"=="Release" (
|
2017-02-16 22:06:03 +00:00
|
|
|
rem for vc12 check for both cuda 7.5 and 8
|
2016-10-04 17:51:04 +00:00
|
|
|
if "%CUDA_PATH%"=="" (
|
|
|
|
echo Cuda Not found, aborting!
|
2016-09-29 01:57:25 +00:00
|
|
|
goto EOF
|
|
|
|
)
|
2016-10-04 17:51:04 +00:00
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
2017-02-16 22:06:03 +00:00
|
|
|
-C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake"
|
2016-09-29 01:57:25 +00:00
|
|
|
)
|
2016-09-14 23:50:16 +00:00
|
|
|
|
2016-10-01 16:22:28 +00:00
|
|
|
:DetectMSVC
|
2016-11-17 03:13:58 +00:00
|
|
|
REM Detect MSVC Installation for 2013-2015
|
2016-09-14 23:50:16 +00:00
|
|
|
if DEFINED VisualStudioVersion goto msvc_detect_finally
|
|
|
|
set VALUE_NAME=ProductDir
|
|
|
|
REM Check 64 bits
|
|
|
|
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%BUILD_VS_VER%.0\Setup\VC"
|
|
|
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO set MSVC_VC_DIR=%%C
|
|
|
|
if DEFINED MSVC_VC_DIR goto msvc_detect_finally
|
|
|
|
REM Check 32 bits
|
|
|
|
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\%BUILD_VS_VER%.0\Setup\VC"
|
|
|
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO set MSVC_VC_DIR=%%C
|
|
|
|
if DEFINED MSVC_VC_DIR goto msvc_detect_finally
|
|
|
|
:msvc_detect_finally
|
|
|
|
if DEFINED MSVC_VC_DIR call "%MSVC_VC_DIR%\vcvarsall.bat"
|
2016-11-17 03:13:58 +00:00
|
|
|
if DEFINED MSVC_VC_DIR goto sanity_checks
|
2016-09-14 23:50:16 +00:00
|
|
|
|
2017-02-16 22:06:03 +00:00
|
|
|
rem MSVC Build environment 2017 and up.
|
2016-11-17 03:13:58 +00:00
|
|
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SXS\VS7" /v %BUILD_VS_VER%.0 2^>nul`) DO set MSVC_VS_DIR=%%C
|
|
|
|
if DEFINED MSVC_VS_DIR goto msvc_detect_finally_2017
|
|
|
|
REM Check 32 bits
|
|
|
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\sxs\vs7" /v %BUILD_VS_VER%.0 2^>nul`) DO set MSVC_VS_DIR=%%C
|
|
|
|
if DEFINED MSVC_VS_DIR goto msvc_detect_finally_2017
|
|
|
|
:msvc_detect_finally_2017
|
|
|
|
if DEFINED MSVC_VS_DIR call "%MSVC_VS_DIR%\Common7\Tools\VsDevCmd.bat"
|
|
|
|
|
|
|
|
:sanity_checks
|
2016-09-14 23:50:16 +00:00
|
|
|
REM Sanity Checks
|
|
|
|
where /Q msbuild
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
2016-10-01 16:22:28 +00:00
|
|
|
if "%BUILD_VS_VER%"=="12" (
|
|
|
|
rem vs12 not found, try vs14
|
2017-01-19 20:55:50 +00:00
|
|
|
echo Visual Studio 2013 not found, trying Visual Studio 2015.
|
2016-10-01 16:22:28 +00:00
|
|
|
set BUILD_VS_VER=14
|
|
|
|
set BUILD_VS_YEAR=2015
|
|
|
|
goto DetectMSVC
|
|
|
|
) else (
|
|
|
|
echo Error: "MSBuild" command not in the PATH.
|
|
|
|
echo You must have MSVC installed and run this from the "Developer Command Prompt"
|
|
|
|
echo ^(available from Visual Studio's Start menu entry^), aborting!
|
|
|
|
goto EOF
|
|
|
|
)
|
2016-09-14 23:50:16 +00:00
|
|
|
)
|
2017-01-19 20:55:50 +00:00
|
|
|
|
|
|
|
|
2017-04-23 20:45:51 +00:00
|
|
|
set BUILD_DIR=%BUILD_DIR%_%TARGET%%BUILD_NGE%_%BUILD_ARCH%_vc%BUILD_VS_VER%_%BUILD_TYPE%
|
2017-04-23 16:10:57 +00:00
|
|
|
if NOT "%BUILD_DIR_OVERRRIDE%"=="" (
|
|
|
|
set BUILD_DIR=%BUILD_DIR_OVERRRIDE%
|
|
|
|
)
|
2017-01-19 20:55:50 +00:00
|
|
|
|
2016-09-14 23:50:16 +00:00
|
|
|
where /Q cmake
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
echo Error: "CMake" command not in the PATH.
|
|
|
|
echo You must have CMake installed and added to your PATH, aborting!
|
|
|
|
goto EOF
|
|
|
|
)
|
|
|
|
if NOT EXIST %BLENDER_DIR%..\lib\nul (
|
|
|
|
echo Error: Path to libraries not found "%BLENDER_DIR%..\lib\"
|
|
|
|
echo This is needed for building, aborting!
|
|
|
|
goto EOF
|
|
|
|
)
|
2016-09-29 01:57:25 +00:00
|
|
|
if "%TARGET%"=="" (
|
2016-09-17 15:19:54 +00:00
|
|
|
echo Error: Convenience target not set
|
|
|
|
echo This is required for building, aborting!
|
2017-02-16 22:06:03 +00:00
|
|
|
echo .
|
2016-09-17 15:19:54 +00:00
|
|
|
goto HELP
|
|
|
|
)
|
2016-09-14 23:50:16 +00:00
|
|
|
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS%
|
2016-01-01 10:26:27 +00:00
|
|
|
if NOT EXIST %BUILD_DIR%\nul (
|
|
|
|
mkdir %BUILD_DIR%
|
|
|
|
)
|
2016-09-17 15:19:54 +00:00
|
|
|
if "%MUST_CLEAN%"=="1" (
|
|
|
|
echo Cleaning %BUILD_DIR%
|
|
|
|
msbuild ^
|
|
|
|
%BUILD_DIR%\Blender.sln ^
|
|
|
|
/target:clean ^
|
|
|
|
/property:Configuration=%BUILD_TYPE% ^
|
2016-10-01 16:22:28 +00:00
|
|
|
/verbosity:minimal ^
|
|
|
|
/p:platform=%MSBUILD_PLATFORM%
|
|
|
|
|
2016-09-17 15:19:54 +00:00
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
echo Cleaned "%BUILD_DIR%"
|
|
|
|
)
|
|
|
|
goto EOF
|
|
|
|
)
|
2016-09-14 23:50:16 +00:00
|
|
|
REM Only configure on first run or when called with nobuild
|
|
|
|
if NOT EXIST %BUILD_DIR%\Blender.sln set MUST_CONFIGURE=1
|
|
|
|
if "%NOBUILD%"=="1" set MUST_CONFIGURE=1
|
|
|
|
|
|
|
|
if "%MUST_CONFIGURE%"=="1" (
|
2016-01-01 19:30:19 +00:00
|
|
|
cmake ^
|
|
|
|
%BUILD_CMAKE_ARGS% ^
|
|
|
|
-H%BLENDER_DIR% ^
|
|
|
|
-B%BUILD_DIR% ^
|
|
|
|
%BUILD_CMAKE_ARGS%
|
|
|
|
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
echo "Configuration Failed"
|
|
|
|
goto EOF
|
|
|
|
)
|
2016-01-01 07:47:30 +00:00
|
|
|
)
|
2017-04-26 14:46:35 +00:00
|
|
|
if DEFINED MSVC_VC_DIR echo call "%MSVC_VC_DIR%\vcvarsall.bat" > %BUILD_DIR%\rebuild.cmd
|
|
|
|
if DEFINED MSVC_VS_DIR echo call "%MSVC_VS_DIR%\Common7\Tools\VsDevCmd.bat" > %BUILD_DIR%\rebuild.cmd
|
|
|
|
echo cmake . >> %BUILD_DIR%\rebuild.cmd
|
|
|
|
echo msbuild ^
|
|
|
|
%BUILD_DIR%\Blender.sln ^
|
|
|
|
/target:build ^
|
|
|
|
/property:Configuration=%BUILD_TYPE% ^
|
2017-05-03 21:15:35 +00:00
|
|
|
/maxcpucount:2 ^
|
2017-04-26 14:46:35 +00:00
|
|
|
/verbosity:minimal ^
|
|
|
|
/p:platform=%MSBUILD_PLATFORM% ^
|
|
|
|
/flp:Summary;Verbosity=minimal;LogFile=%BUILD_DIR%\Build.log >> %BUILD_DIR%\rebuild.cmd
|
|
|
|
echo msbuild ^
|
|
|
|
%BUILD_DIR%\INSTALL.vcxproj ^
|
|
|
|
/property:Configuration=%BUILD_TYPE% ^
|
|
|
|
/verbosity:minimal ^
|
|
|
|
/p:platform=%MSBUILD_PLATFORM% >> %BUILD_DIR%\rebuild.cmd
|
|
|
|
|
2016-09-14 23:50:16 +00:00
|
|
|
if "%NOBUILD%"=="1" goto EOF
|
2015-12-31 18:14:49 +00:00
|
|
|
|
|
|
|
msbuild ^
|
|
|
|
%BUILD_DIR%\Blender.sln ^
|
|
|
|
/target:build ^
|
2016-01-01 05:04:21 +00:00
|
|
|
/property:Configuration=%BUILD_TYPE% ^
|
2017-05-03 21:15:35 +00:00
|
|
|
/maxcpucount:2 ^
|
2016-10-01 16:22:28 +00:00
|
|
|
/verbosity:minimal ^
|
2016-10-25 17:49:08 +00:00
|
|
|
/p:platform=%MSBUILD_PLATFORM% ^
|
|
|
|
/flp:Summary;Verbosity=minimal;LogFile=%BUILD_DIR%\Build.log
|
2016-01-01 05:04:21 +00:00
|
|
|
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
2016-01-01 07:47:30 +00:00
|
|
|
echo "Build Failed"
|
|
|
|
goto EOF
|
|
|
|
)
|
2016-01-01 05:04:21 +00:00
|
|
|
|
|
|
|
msbuild ^
|
|
|
|
%BUILD_DIR%\INSTALL.vcxproj ^
|
|
|
|
/property:Configuration=%BUILD_TYPE% ^
|
2016-10-01 16:22:28 +00:00
|
|
|
/verbosity:minimal ^
|
|
|
|
/p:platform=%MSBUILD_PLATFORM%
|
2016-01-01 05:04:21 +00:00
|
|
|
|
|
|
|
echo.
|
2016-02-08 10:12:03 +00:00
|
|
|
echo At any point you can optionally modify your build configuration by editing:
|
2017-04-26 14:46:35 +00:00
|
|
|
echo "%BUILD_DIR%\CMakeCache.txt", then run "rebuild.cmd" in the build folder to build with the changes applied.
|
2016-02-08 10:12:03 +00:00
|
|
|
echo.
|
2017-02-16 22:08:33 +00:00
|
|
|
echo Blender successfully built, run from: "%BUILD_DIR%\bin\%BUILD_TYPE%\blender.exe"
|
2016-01-01 05:04:21 +00:00
|
|
|
echo.
|
2016-09-17 15:19:54 +00:00
|
|
|
goto EOF
|
|
|
|
:HELP
|
|
|
|
echo.
|
|
|
|
echo Convenience targets
|
2017-02-16 22:06:03 +00:00
|
|
|
echo - release ^(identical to the official blender.org builds^)
|
2016-09-29 01:57:25 +00:00
|
|
|
echo - full ^(same as release minus the cuda kernels^)
|
2017-02-16 22:06:03 +00:00
|
|
|
echo - lite
|
2016-09-17 15:19:54 +00:00
|
|
|
echo - headless
|
|
|
|
echo - cycles
|
|
|
|
echo - bpy
|
|
|
|
echo.
|
|
|
|
echo Utilities ^(not associated with building^)
|
|
|
|
echo - clean ^(Target must be set^)
|
|
|
|
echo - update
|
|
|
|
echo - nobuild ^(only generate project files^)
|
|
|
|
echo - showhash ^(Show git hashes of source tree^)
|
|
|
|
echo.
|
|
|
|
echo Configuration options
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
echo - with_tests ^(enable building unit tests^)
|
2017-04-23 20:45:51 +00:00
|
|
|
echo - noge ^(disable building game enginge and player^)
|
2016-09-29 01:57:25 +00:00
|
|
|
echo - debug ^(Build an unoptimized debuggable build^)
|
2016-09-17 15:19:54 +00:00
|
|
|
echo - packagename [newname] ^(override default cpack package name^)
|
2017-04-23 16:10:57 +00:00
|
|
|
echo - buildir [newdir] ^(override default build folder^)
|
2017-02-16 22:06:03 +00:00
|
|
|
echo - x86 ^(override host auto-detect and build 32 bit code^)
|
|
|
|
echo - x64 ^(override host auto-detect and build 64 bit code^)
|
2016-09-17 15:19:54 +00:00
|
|
|
echo - 2013 ^(build with visual studio 2013^)
|
|
|
|
echo - 2015 ^(build with visual studio 2015^) [EXPERIMENTAL]
|
|
|
|
echo.
|
2015-12-31 18:14:49 +00:00
|
|
|
|
|
|
|
:EOF
|