diff options
-rw-r--r-- | build_files/windows/configure_ninja.cmd | 6 | ||||
-rw-r--r-- | build_files/windows/detect_msvc2017.cmd | 7 | ||||
-rw-r--r-- | build_files/windows/parse_arguments.cmd | 4 | ||||
-rw-r--r-- | build_files/windows/show_help.cmd | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blender_undo.c | 7 |
5 files changed, 29 insertions, 7 deletions
diff --git a/build_files/windows/configure_ninja.cmd b/build_files/windows/configure_ninja.cmd index d3b002e9a24..224d761adf6 100644 --- a/build_files/windows/configure_ninja.cmd +++ b/build_files/windows/configure_ninja.cmd @@ -1,3 +1,9 @@ +ninja --version 1>NUL 2>&1 +if %ERRORLEVEL% NEQ 0 ( + echo "Ninja not detected in the path" + exit /b 1 + ) + set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Ninja" %TESTS_CMAKE_ARGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% if "%WITH_CLANG%" == "1" ( diff --git a/build_files/windows/detect_msvc2017.cmd b/build_files/windows/detect_msvc2017.cmd index 90fad8744b5..060e9f88617 100644 --- a/build_files/windows/detect_msvc2017.cmd +++ b/build_files/windows/detect_msvc2017.cmd @@ -12,7 +12,12 @@ if not exist "%vs_where%" ( goto FAIL ) ) -for /f "usebackq tokens=1* delims=: " %%i in (`"%vs_where%" -products * -latest %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`) do ( + +if NOT "%verbose%" == "" ( + echo "%vs_where%" -latest %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64` + ) + +for /f "usebackq tokens=1* delims=: " %%i in (`"%vs_where%" -latest %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`) do ( if /i "%%i"=="installationPath" set VS_InstallDir=%%j ) diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd index 2cc0acfd243..8a6d743978d 100644 --- a/build_files/windows/parse_arguments.cmd +++ b/build_files/windows/parse_arguments.cmd @@ -53,6 +53,10 @@ if NOT "%1" == "" ( ) else if "%1" == "2017pre" ( set BUILD_VS_YEAR=2017 set VSWHERE_ARGS=-prerelease + set BUILD_VS_YEAR=2017 + ) else if "%1" == "2017b" ( + set BUILD_VS_YEAR=2017 + set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools ) else if "%1" == "2015" ( set BUILD_VS_YEAR=2015 ) else if "%1" == "2013" ( diff --git a/build_files/windows/show_help.cmd b/build_files/windows/show_help.cmd index 0524e8a84fc..2b297120f4b 100644 --- a/build_files/windows/show_help.cmd +++ b/build_files/windows/show_help.cmd @@ -23,7 +23,13 @@ echo - buildir [newdir] ^(override default build folder^) echo - x86 ^(override host auto-detect and build 32 bit code^) echo - x64 ^(override host auto-detect and build 64 bit code^) echo - 2013 ^(build with visual studio 2013^) -echo - 2015 ^(build with visual studio 2015^) [EXPERIMENTAL] -echo - 2017 ^(build with visual studio 2017^) [EXPERIMENTAL] -echo - 2017pre ^(build with visual studio 2017 pre-release^) [EXPERIMENTAL] +echo. +echo Experimental options +echo - 2015 ^(build with visual studio 2015^) +echo - 2017 ^(build with visual studio 2017^) +echo - 2017pre ^(build with visual studio 2017 pre-release^) +echo - 2017b ^(build with visual studio 2017 Build Tools^) +echo - clang ^(enable building with clang^) +echo - asan ^(enable asan when building with clang^) +echo - ninja ^(enable building with ninja instead of msbuild^) echo. diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c index 371d9dff8d5..857fc72672c 100644 --- a/source/blender/blenkernel/intern/blender_undo.c +++ b/source/blender/blenkernel/intern/blender_undo.c @@ -83,13 +83,14 @@ bool BKE_memfile_undo_decode(MemFileUndoData *mfu, bContext *C) success = BKE_blendfile_read_from_memfile(C, &mfu->memfile, NULL, 0); } - /* restore */ - BLI_strncpy(bmain->name, mainstr, sizeof(bmain->name)); /* restore */ + /* Restore, bmain has been re-allocated. */ + bmain = CTX_data_main(C); + BLI_strncpy(bmain->name, mainstr, sizeof(bmain->name)); G.fileflags = fileflags; if (success) { /* important not to update time here, else non keyed tranforms are lost */ - DEG_on_visible_update(G.main, false); + DEG_on_visible_update(bmain, false); } return success; |