Add Chromium-only Blender WebEngine parity work
This commit is contained in:
17
blender-5.2.0/build_files/windows/autodetect_msvc.cmd
Normal file
17
blender-5.2.0/build_files/windows/autodetect_msvc.cmd
Normal file
@@ -0,0 +1,17 @@
|
||||
echo No explicit msvc version requested, autodetecting version.
|
||||
|
||||
call "%~dp0\detect_msvc2019.cmd"
|
||||
if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
||||
|
||||
call "%~dp0\detect_msvc2022.cmd"
|
||||
if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
||||
|
||||
call "%~dp0\detect_msvc2026.cmd"
|
||||
if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
||||
|
||||
echo Compiler Detection failed. Use verbose switch for more information.
|
||||
exit /b 1
|
||||
|
||||
:DetectionComplete
|
||||
echo Compiler Detection successful, detected VS%BUILD_VS_YEAR%
|
||||
exit /b 0
|
||||
17
blender-5.2.0/build_files/windows/autopep8.cmd
Normal file
17
blender-5.2.0/build_files/windows/autopep8.cmd
Normal file
@@ -0,0 +1,17 @@
|
||||
if NOT EXIST %PYTHON% (
|
||||
echo python not found, required for this operation
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set FORMAT_PATHS=%BLENDER_DIR%\tools\utils_maintenance\autopep8_format_paths.py
|
||||
|
||||
for %%a in (%PYTHON%) do (
|
||||
set PEP8_LOCATION=%%~dpa\..\lib\site-packages\autopep8.py
|
||||
)
|
||||
|
||||
REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
|
||||
REM While we run with --no-subprocess a sub process is still used to get the version
|
||||
REM information, so we still have to supply a valid --autopep8-command here.
|
||||
%PYTHON% -B %FORMAT_PATHS% --autopep8-command "%PEP8_LOCATION%" --no-subprocess %FORMAT_ARGS%
|
||||
|
||||
:EOF
|
||||
26
blender-5.2.0/build_files/windows/build_msbuild.cmd
Normal file
26
blender-5.2.0/build_files/windows/build_msbuild.cmd
Normal file
@@ -0,0 +1,26 @@
|
||||
if "%NOBUILD%"=="1" goto EOF
|
||||
echo %TIME% > %BUILD_DIR%\buildtime.txt
|
||||
msbuild ^
|
||||
%BUILD_DIR%\Blender.%VS_SLN_EXT% ^
|
||||
/target:build ^
|
||||
/property:Configuration=%BUILD_TYPE% ^
|
||||
/maxcpucount:2 ^
|
||||
/verbosity:minimal ^
|
||||
/p:platform=%MSBUILD_PLATFORM% ^
|
||||
/flp:Summary;Verbosity=minimal;LogFile=%BUILD_DIR%\Build.log
|
||||
if errorlevel 1 (
|
||||
echo Error during build, see %BUILD_DIR%\Build.log for details
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
msbuild ^
|
||||
%BUILD_DIR%\INSTALL.vcxproj ^
|
||||
/property:Configuration=%BUILD_TYPE% ^
|
||||
/verbosity:minimal ^
|
||||
/p:platform=%MSBUILD_PLATFORM%
|
||||
if errorlevel 1 (
|
||||
echo Error during install phase
|
||||
exit /b 1
|
||||
)
|
||||
echo %TIME% >> %BUILD_DIR%\buildtime.txt
|
||||
:EOF
|
||||
16
blender-5.2.0/build_files/windows/build_ninja.cmd
Normal file
16
blender-5.2.0/build_files/windows/build_ninja.cmd
Normal file
@@ -0,0 +1,16 @@
|
||||
if "%NOBUILD%"=="1" goto EOF
|
||||
set HAS_ERROR=
|
||||
cd %BUILD_DIR%
|
||||
echo %TIME% > buildtime.txt
|
||||
ninja install
|
||||
if errorlevel 1 (
|
||||
set HAS_ERROR=1
|
||||
)
|
||||
echo %TIME% >>buildtime.txt
|
||||
cd %BLENDER_DIR%
|
||||
|
||||
if "%HAS_ERROR%" == "1" (
|
||||
echo Error during build
|
||||
exit /b 1
|
||||
)
|
||||
:EOF
|
||||
73
blender-5.2.0/build_files/windows/check_libraries.cmd
Normal file
73
blender-5.2.0/build_files/windows/check_libraries.cmd
Normal file
@@ -0,0 +1,73 @@
|
||||
if "%BUILD_ARCH%" == "arm64" (
|
||||
set BUILD_VS_LIBDIR=lib/windows_arm64
|
||||
) else (
|
||||
set BUILD_VS_LIBDIR=lib/windows_x64
|
||||
)
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Library Directory = "%BUILD_VS_LIBDIR%"
|
||||
)
|
||||
if NOT EXIST "%BUILD_VS_LIBDIR%\.git" (
|
||||
rem libs not found, but git is on the system
|
||||
if not "%GIT%"=="" (
|
||||
echo.
|
||||
echo The required external libraries in %BUILD_VS_LIBDIR% are missing
|
||||
echo.
|
||||
set /p GetLibs= "Would you like to download them? (y/n)"
|
||||
if /I "!GetLibs!"=="Y" (
|
||||
echo.
|
||||
echo Downloading %BUILD_VS_LIBDIR% libraries, please wait.
|
||||
echo.
|
||||
echo *********************************************************
|
||||
echo * *
|
||||
echo * Note: Once the initial download finishes and you see *
|
||||
echo * "Resolving deltas: 100%% (nnn/nnn) done" *
|
||||
echo * a second, much larger, update will occur with *
|
||||
echo * no visible updates. Please do not interrupt *
|
||||
echo * this process. It may take over an hour to *
|
||||
echo * complete depending on your internet connection. *
|
||||
echo * *
|
||||
echo *********************************************************
|
||||
:RETRY
|
||||
"%GIT%" -C "%BLENDER_DIR%\" config --local "submodule.%BUILD_VS_LIBDIR%.update" "checkout"
|
||||
set GIT_LFS_SKIP_SMUDGE=1
|
||||
"%GIT%" -C "%BLENDER_DIR%\" submodule update --progress --init "%BUILD_VS_LIBDIR%"
|
||||
set GIT_LFS_SKIP_SMUDGE=
|
||||
"%GIT%" -C "./%BUILD_VS_LIBDIR%" lfs pull
|
||||
if errorlevel 1 (
|
||||
set /p LibRetry= "Error during download, retry? y/n"
|
||||
if /I "!LibRetry!"=="Y" (
|
||||
goto RETRY
|
||||
)
|
||||
echo.
|
||||
echo Error: Download of external libraries failed.
|
||||
echo Until this is resolved you CANNOT make a successful blender build.
|
||||
echo.
|
||||
exit /b 1
|
||||
)
|
||||
) else (
|
||||
echo Not downloading libraries, until this is resolved you CANNOT make a successful blender build.
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
) else (
|
||||
if NOT EXIST %PYTHON% (
|
||||
if not "%GIT%"=="" (
|
||||
echo.
|
||||
echo Python not found in external libraries, updating to latest version
|
||||
echo.
|
||||
"%GIT%" -C "%BLENDER_DIR%\" submodule update "%BUILD_VS_LIBDIR%"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if NOT EXIST %BUILD_VS_LIBDIR% (
|
||||
echo.
|
||||
echo Error: Required libraries not found at "%BUILD_VS_LIBDIR%"
|
||||
echo This is needed for building, aborting!
|
||||
echo.
|
||||
if "%GIT%"=="" (
|
||||
echo This is most likely caused by git.exe not being available.
|
||||
)
|
||||
exit /b 1
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
set BLENDER_DIR_NOSPACES=%BLENDER_DIR: =%
|
||||
|
||||
if not "%BLENDER_DIR%"=="%BLENDER_DIR_NOSPACES%" (
|
||||
echo There are spaces detected in the build path "%BLENDER_DIR%", this is currently not supported, exiting....
|
||||
exit /b 1
|
||||
)
|
||||
89
blender-5.2.0/build_files/windows/configure_msbuild.cmd
Normal file
89
blender-5.2.0/build_files/windows/configure_msbuild.cmd
Normal file
@@ -0,0 +1,89 @@
|
||||
set BUILD_GENERATOR_POST=
|
||||
set BUILD_PLATFORM_SELECT=
|
||||
set MSBUILD_PLATFORM=x64
|
||||
|
||||
if "%BUILD_WITH_SCCACHE%"=="1" (
|
||||
echo sccache is only supported with ninja as the build system.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%WITH_CLANG%"=="1" (
|
||||
set CLANG_CMAKE_ARGS=-T"ClangCl"
|
||||
|
||||
REM Create the build directory, so that we can create the Directory.build.props file
|
||||
if NOT EXIST %BUILD_DIR%\nul (
|
||||
mkdir %BUILD_DIR%
|
||||
)
|
||||
|
||||
REM This is required as per https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-170#custom_llvm_location
|
||||
REM Which allows any copy of LLVM to be used, not just the one that ships with VS
|
||||
echo ^<Project^> >> %BUILD_DIR%\Directory.build.props
|
||||
echo ^<PropertyGroup^> >> %BUILD_DIR%\Directory.build.props
|
||||
echo ^<LLVMInstallDir^>%LLVM_DIR%^</LLVMInstallDir^> >> %BUILD_DIR%\Directory.build.props
|
||||
echo ^<LLVMToolsVersion^>%CLANG_VERSION%^</LLVMToolsVersion^> >> %BUILD_DIR%\Directory.build.props
|
||||
echo ^</PropertyGroup^> >> %BUILD_DIR%\Directory.build.props
|
||||
echo ^</Project^> >> %BUILD_DIR%\Directory.build.props
|
||||
)
|
||||
|
||||
if "%WITH_ASAN%"=="1" (
|
||||
set ASAN_CMAKE_ARGS=-DWITH_COMPILER_ASAN=On
|
||||
)
|
||||
|
||||
if "%WITH_PYDEBUG%"=="1" (
|
||||
set PYDEBUG_CMAKE_ARGS=-DWINDOWS_PYTHON_DEBUG=On
|
||||
)
|
||||
|
||||
if "%BUILD_ARCH%"=="arm64" (
|
||||
set MSBUILD_PLATFORM=arm64
|
||||
set BUILD_PLATFORM_SELECT=-A ARM64
|
||||
)
|
||||
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%BUILD_GENERATOR_POST%" %BUILD_PLATFORM_SELECT% %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS% %PYDEBUG_CMAKE_ARGS%
|
||||
|
||||
if NOT EXIST %BUILD_DIR%\nul (
|
||||
mkdir %BUILD_DIR%
|
||||
)
|
||||
|
||||
if "%MUST_CLEAN%"=="1" (
|
||||
echo Cleaning %BUILD_DIR%
|
||||
msbuild ^
|
||||
%BUILD_DIR%\Blender.%VS_SLN_EXT% ^
|
||||
/target:clean ^
|
||||
/property:Configuration=%BUILD_TYPE% ^
|
||||
/verbosity:minimal ^
|
||||
/p:platform=%MSBUILD_PLATFORM%
|
||||
)
|
||||
|
||||
if NOT EXIST %BUILD_DIR%\Blender.%VS_SLN_EXT% set MUST_CONFIGURE=1
|
||||
if "%NOBUILD%"=="1" set MUST_CONFIGURE=1
|
||||
|
||||
if "%MUST_CONFIGURE%"=="1" (
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo "%CMAKE% %BUILD_CMAKE_ARGS% -H%BLENDER_DIR% -B%BUILD_DIR%"
|
||||
)
|
||||
|
||||
cmake ^
|
||||
%BUILD_CMAKE_ARGS% ^
|
||||
-H%BLENDER_DIR% ^
|
||||
-B%BUILD_DIR%
|
||||
|
||||
if errorlevel 1 (
|
||||
echo "Configuration Failed"
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
echo echo off > %BUILD_DIR%\rebuild.cmd
|
||||
echo if "%%VSCMD_VER%%" == "" ^( >> %BUILD_DIR%\rebuild.cmd
|
||||
echo call "%VCVARS%" %BUILD_ARCH% >> %BUILD_DIR%\rebuild.cmd
|
||||
echo ^) >> %BUILD_DIR%\rebuild.cmd
|
||||
echo "%CMAKE%" . >> %BUILD_DIR%\rebuild.cmd
|
||||
echo echo %%TIME%% ^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
||||
echo msbuild ^
|
||||
%BUILD_DIR%\INSTALL.vcxproj ^
|
||||
/property:Configuration=%BUILD_TYPE% ^
|
||||
/maxcpucount:2 ^
|
||||
/verbosity:minimal ^
|
||||
/p:platform=%MSBUILD_PLATFORM% ^
|
||||
/flp:Summary;Verbosity=minimal;LogFile=%BUILD_DIR%\Build.log >> %BUILD_DIR%\rebuild.cmd
|
||||
echo echo %%TIME%% ^>^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
||||
63
blender-5.2.0/build_files/windows/configure_ninja.cmd
Normal file
63
blender-5.2.0/build_files/windows/configure_ninja.cmd
Normal file
@@ -0,0 +1,63 @@
|
||||
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 "%BUILD_WITH_SCCACHE%"=="1" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_WINDOWS_SCCACHE=On
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Enabling sccache
|
||||
)
|
||||
)
|
||||
|
||||
if "%WITH_CLANG%" == "1" (
|
||||
REM We can assume that we have a working copy via find_llvm.cmd
|
||||
set CC=%LLVM_DIR%\bin\clang-cl
|
||||
set CXX=%LLVM_DIR%\bin\clang-cl
|
||||
set CFLAGS=-m64
|
||||
set CXXFLAGS=-m64
|
||||
)
|
||||
|
||||
if "%WITH_ASAN%"=="1" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_COMPILER_ASAN=On
|
||||
)
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS%
|
||||
)
|
||||
|
||||
if NOT EXIST %BUILD_DIR%\nul (
|
||||
mkdir %BUILD_DIR%
|
||||
)
|
||||
|
||||
if "%MUST_CLEAN%"=="1" (
|
||||
echo Cleaning %BUILD_DIR%
|
||||
cd %BUILD_DIR%
|
||||
"%CMAKE%" --build . --config Clean
|
||||
)
|
||||
|
||||
if NOT EXIST %BUILD_DIR%\build.ninja set MUST_CONFIGURE=1
|
||||
if "%NOBUILD%"=="1" set MUST_CONFIGURE=1
|
||||
|
||||
if "%MUST_CONFIGURE%"=="1" (
|
||||
"%CMAKE%" ^
|
||||
%BUILD_CMAKE_ARGS% ^
|
||||
-H%BLENDER_DIR% ^
|
||||
-B%BUILD_DIR%
|
||||
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo "Configuration Failed"
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
echo echo off > %BUILD_DIR%\rebuild.cmd
|
||||
echo if "%%VSCMD_VER%%" == "" ^( >> %BUILD_DIR%\rebuild.cmd
|
||||
echo call "%VCVARS%" %BUILD_ARCH% >> %BUILD_DIR%\rebuild.cmd
|
||||
echo ^) >> %BUILD_DIR%\rebuild.cmd
|
||||
echo echo %%TIME%% ^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
||||
echo ninja install %%* >> %BUILD_DIR%\rebuild.cmd
|
||||
echo echo %%TIME%% ^>^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
||||
24
blender-5.2.0/build_files/windows/detect_architecture.cmd
Normal file
24
blender-5.2.0/build_files/windows/detect_architecture.cmd
Normal file
@@ -0,0 +1,24 @@
|
||||
if "%BUILD_ARCH%"=="" (
|
||||
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
|
||||
set WINDOWS_ARCH= Win64
|
||||
set BUILD_ARCH=x64
|
||||
) else if "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
|
||||
set WINDOWS_ARCH= Win64
|
||||
set BUILD_ARCH=x64
|
||||
) else if "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
|
||||
set WINDOWS_ARCH= arm64
|
||||
set BUILD_ARCH=arm64
|
||||
) else (
|
||||
echo Error: 32 bit builds of blender are no longer supported.
|
||||
goto ERR
|
||||
)
|
||||
) else if "%BUILD_ARCH%"=="x64" (
|
||||
set WINDOWS_ARCH= Win64
|
||||
) else if "%BUILD_ARCH%"=="arm64" (
|
||||
set WINDOWS_ARCH= arm64
|
||||
set BUILD_ARCH=arm64
|
||||
)
|
||||
:EOF
|
||||
exit /b 0
|
||||
:ERR
|
||||
exit /b 1
|
||||
3
blender-5.2.0/build_files/windows/detect_msvc2019.cmd
Normal file
3
blender-5.2.0/build_files/windows/detect_msvc2019.cmd
Normal file
@@ -0,0 +1,3 @@
|
||||
set BUILD_VS_VER=16
|
||||
set BUILD_VS_YEAR=2019
|
||||
call "%~dp0\detect_msvc_vswhere.cmd"
|
||||
3
blender-5.2.0/build_files/windows/detect_msvc2022.cmd
Normal file
3
blender-5.2.0/build_files/windows/detect_msvc2022.cmd
Normal file
@@ -0,0 +1,3 @@
|
||||
set BUILD_VS_VER=17
|
||||
set BUILD_VS_YEAR=2022
|
||||
call "%~dp0\detect_msvc_vswhere.cmd"
|
||||
3
blender-5.2.0/build_files/windows/detect_msvc2026.cmd
Normal file
3
blender-5.2.0/build_files/windows/detect_msvc2026.cmd
Normal file
@@ -0,0 +1,3 @@
|
||||
set BUILD_VS_VER=18
|
||||
set BUILD_VS_YEAR=2026
|
||||
call "%~dp0\detect_msvc_vswhere.cmd"
|
||||
127
blender-5.2.0/build_files/windows/detect_msvc_vswhere.cmd
Normal file
127
blender-5.2.0/build_files/windows/detect_msvc_vswhere.cmd
Normal file
@@ -0,0 +1,127 @@
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Detecting msvc %BUILD_VS_YEAR%
|
||||
)
|
||||
|
||||
set ProgramFilesX86=%ProgramFiles(x86)%
|
||||
if not exist "%ProgramFilesX86%" set ProgramFilesX86=%ProgramFiles%
|
||||
|
||||
set vs_where=%ProgramFilesX86%\Microsoft Visual Studio\Installer\vswhere.exe
|
||||
if not exist "%vs_where%" (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Visual Studio %BUILD_VS_YEAR% is not detected
|
||||
)
|
||||
goto FAIL
|
||||
)
|
||||
|
||||
if "%BUILD_ARCH%" == "arm64" (
|
||||
set VSWHERE_ARCH=ARM64
|
||||
) else (
|
||||
set VSWHERE_ARCH=x86.x64
|
||||
)
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo "%vs_where%" -latest %VSWHERE_ARGS% -version ^[%BUILD_VS_VER%.0^,%BUILD_VS_VER%.99^) -requires Microsoft.VisualStudio.Component.VC.Tools.%VSWHERE_ARCH%
|
||||
)
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (`"%vs_where%" -latest -version ^[%BUILD_VS_VER%.0^,%BUILD_VS_VER%.99^) %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.%VSWHERE_ARCH%`) do (
|
||||
if /i "%%i"=="installationPath" set VS_InstallDir=%%j
|
||||
)
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo VS_Installdir="%VS_InstallDir%"
|
||||
)
|
||||
|
||||
if "%VS_InstallDir%"=="" (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo.
|
||||
echo Visual Studio is detected but no suitable installation was found.
|
||||
echo.
|
||||
echo Check the "Desktop development with C++" workload has been installed.
|
||||
echo.
|
||||
echo If you are attempting to use either Visual Studio Preview version or the Visual C++ Build tools, Please see 'make help' on how to opt in to those toolsets.
|
||||
echo.
|
||||
goto FAIL
|
||||
)
|
||||
)
|
||||
|
||||
rem If we are using Clang + MSBuild, check to make sure the clang tools are installed
|
||||
if "%WITH_CLANG%" == "1" (
|
||||
if NOT "%BUILD_WITH_NINJA%" == "1" (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo "%vs_where%" -latest %VSWHERE_ARGS% -version ^[%BUILD_VS_VER%.0^,%BUILD_VS_VER%.99^) -requires Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset
|
||||
)
|
||||
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (`"%vs_where%" -latest -version ^[%BUILD_VS_VER%.0^,%BUILD_VS_VER%.99^) %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset`) do (
|
||||
if /i "%%i"=="installationName" set VSWhere_ClangFound=%%j
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
REM This needs to be in a separate block, due to no delayed expansion (which breaks other things if enabled)
|
||||
if "%WITH_CLANG%" == "1" (
|
||||
if NOT "%BUILD_WITH_NINJA%" == "1" (
|
||||
if "%VSWhere_ClangFound%"=="" (
|
||||
echo.
|
||||
echo Clang was specified whilst using the Visual Studio CMake generator, but the Clang Toolset was not found in Visual Studio.
|
||||
echo.
|
||||
echo Check the "MSBuild support for LLVM (clang-cl) toolset" component has been installed.
|
||||
echo.
|
||||
echo Alternatively use the Ninja generator via the "ninja" switch when calling make.bat
|
||||
goto FAIL
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
set VCVARS=%VS_InstallDir%\VC\Auxiliary\Build\vcvarsall.bat
|
||||
if exist "%VCVARS%" (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo calling "%VCVARS%" %BUILD_ARCH%
|
||||
)
|
||||
call "%VCVARS%" %BUILD_ARCH%
|
||||
) else (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo "%VCVARS%" not found
|
||||
)
|
||||
goto FAIL
|
||||
)
|
||||
|
||||
rem try msbuild
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Testing for MSBuild
|
||||
)
|
||||
msbuild /version > NUL
|
||||
if errorlevel 1 (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Visual Studio %BUILD_VS_YEAR% msbuild not found
|
||||
)
|
||||
goto FAIL
|
||||
)
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Visual Studio %BUILD_VS_YEAR% msbuild found
|
||||
)
|
||||
|
||||
REM try the c++ compiler
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Testing for the C/C++ Compiler
|
||||
)
|
||||
cl 2> NUL 1>&2
|
||||
if errorlevel 1 (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler not found
|
||||
)
|
||||
goto FAIL
|
||||
)
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler found
|
||||
)
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Visual Studio %BUILD_VS_YEAR% is detected successfully
|
||||
)
|
||||
goto EOF
|
||||
|
||||
:FAIL
|
||||
exit /b 1
|
||||
|
||||
:EOF
|
||||
34
blender-5.2.0/build_files/windows/doc_py.cmd
Normal file
34
blender-5.2.0/build_files/windows/doc_py.cmd
Normal file
@@ -0,0 +1,34 @@
|
||||
set SOURCEDIR=%BLENDER_DIR%/doc/python_api/sphinx-in
|
||||
set BUILDDIR=%BLENDER_DIR%/doc/python_api/sphinx-out
|
||||
if "%BF_LANG%" == "" set BF_LANG=en
|
||||
set SPHINXOPTS=-j auto -D language=%BF_LANG%
|
||||
|
||||
call "%~dp0\find_sphinx.cmd"
|
||||
|
||||
if EXIST "%SPHINX_BIN%" (
|
||||
goto detect_sphinx_done
|
||||
)
|
||||
|
||||
echo unable to locate sphinx-build, run "set sphinx_BIN=full_path_to_sphinx-build.exe"
|
||||
exit /b 1
|
||||
|
||||
:detect_sphinx_done
|
||||
|
||||
call "%~dp0\find_blender.cmd"
|
||||
|
||||
if EXIST "%BLENDER_BIN%" (
|
||||
goto detect_blender_done
|
||||
)
|
||||
|
||||
echo unable to locate blender, run "set BLENDER_BIN=full_path_to_blender.exe"
|
||||
exit /b 1
|
||||
|
||||
:detect_blender_done
|
||||
|
||||
%BLENDER_BIN% ^
|
||||
--background --factory-startup ^
|
||||
--python %BLENDER_DIR%/doc/python_api/sphinx_doc_gen.py
|
||||
|
||||
"%SPHINX_BIN%" -b html %SPHINXOPTS% %O% %SOURCEDIR% %BUILDDIR%
|
||||
|
||||
:EOF
|
||||
28
blender-5.2.0/build_files/windows/find_blender.cmd
Normal file
28
blender-5.2.0/build_files/windows/find_blender.cmd
Normal file
@@ -0,0 +1,28 @@
|
||||
REM First see if there is an environment variable set
|
||||
if EXIST "%BLENDER_BIN%" (
|
||||
goto detect_blender_done
|
||||
)
|
||||
|
||||
REM Check the build folder next, if ninja was used there will be no
|
||||
REM debug/release folder
|
||||
set BLENDER_BIN=%BUILD_DIR%\bin\blender.exe
|
||||
if EXIST "%BLENDER_BIN%" (
|
||||
goto detect_blender_done
|
||||
)
|
||||
|
||||
REM Check the release folder next
|
||||
set BLENDER_BIN=%BUILD_DIR%\bin\release\blender.exe
|
||||
if EXIST "%BLENDER_BIN%" (
|
||||
goto detect_blender_done
|
||||
)
|
||||
|
||||
REM Check the debug folder next
|
||||
set BLENDER_BIN=%BUILD_DIR%\bin\debug\blender.exe
|
||||
if EXIST "%BLENDER_BIN%" (
|
||||
goto detect_blender_done
|
||||
)
|
||||
|
||||
REM at this point, we don't know where blender is, clear the variable
|
||||
set BLENDER_BIN=
|
||||
|
||||
:detect_blender_done
|
||||
38
blender-5.2.0/build_files/windows/find_dependencies.cmd
Normal file
38
blender-5.2.0/build_files/windows/find_dependencies.cmd
Normal file
@@ -0,0 +1,38 @@
|
||||
REM find all dependencies and set the corresponding environment variables.
|
||||
for %%X in (cmake.exe) do (set CMAKE=%%~$PATH:X)
|
||||
for %%X in (ctest.exe) do (set CTEST=%%~$PATH:X)
|
||||
for %%X in (git.exe) do (set GIT=%%~$PATH:X)
|
||||
REM For python, default on 313 but if that does not exist also check
|
||||
REM 311, to see if that is available.
|
||||
set PYTHON=%BLENDER_DIR%\lib\windows_x64\python\313\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
set PYTHON=%BLENDER_DIR%\lib\windows_x64\python\311\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
rem Additionally check for the ARM64 version
|
||||
set PYTHON=%BLENDER_DIR%\lib\windows_arm64\python\313\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
set PYTHON=%BLENDER_DIR%\lib\windows_arm64\python\311\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
|
||||
if NOT EXIST %PYTHON% (
|
||||
if EXIST %BLENDER_DIR%\lib\windows_x64\.git (
|
||||
echo Warning: Python not found, there is likely an issue with the library folder
|
||||
)
|
||||
set PYTHON=""
|
||||
)
|
||||
|
||||
:detect_python_done
|
||||
if NOT "%verbose%" == "" (
|
||||
echo cmake : "%CMAKE%"
|
||||
echo ctest : "%CTEST%"
|
||||
echo git : "%GIT%"
|
||||
echo python : "%PYTHON%"
|
||||
)
|
||||
21
blender-5.2.0/build_files/windows/find_inkscape.cmd
Normal file
21
blender-5.2.0/build_files/windows/find_inkscape.cmd
Normal file
@@ -0,0 +1,21 @@
|
||||
REM First see if there is an environment variable set
|
||||
if EXIST "%INKSCAPE_BIN%" (
|
||||
goto detect_inkscape_done
|
||||
)
|
||||
|
||||
REM Then see if inkscape is available in the path
|
||||
for %%X in (inkscape.exe) do (set INKSCAPE_BIN=%%~$PATH:X)
|
||||
if EXIST "%INKSCAPE_BIN%" (
|
||||
goto detect_inkscape_done
|
||||
)
|
||||
|
||||
REM Finally see if it is perhaps installed at the default location
|
||||
set INKSCAPE_BIN=%ProgramFiles%\Inkscape\bin\inkscape.exe
|
||||
if EXIST "%INKSCAPE_BIN%" (
|
||||
goto detect_inkscape_done
|
||||
)
|
||||
|
||||
REM If still not found clear the variable
|
||||
set INKSCAPE_BIN=
|
||||
|
||||
:detect_inkscape_done
|
||||
57
blender-5.2.0/build_files/windows/find_llvm.cmd
Normal file
57
blender-5.2.0/build_files/windows/find_llvm.cmd
Normal file
@@ -0,0 +1,57 @@
|
||||
REM Find a copy of LLVM on the system
|
||||
set LLVM_DIR=
|
||||
|
||||
REM First, we try and find the copy on the PATH (unless already specified, in which case we use that)
|
||||
if "%LLVM_EXE%" == "" (
|
||||
for %%X in (clang-cl.exe) do (set "LLVM_EXE=%%~$PATH:X")
|
||||
) else (
|
||||
echo LLVM EXE manually specified, using that
|
||||
)
|
||||
|
||||
if NOT "%LLVM_EXE%" == "" (
|
||||
REM We have found LLVM on the path
|
||||
for %%X in ("%LLVM_EXE%\..\..") do set "LLVM_DIR=%%~fX"
|
||||
if NOT "%verbose%" == "" (
|
||||
echo LLVM detected via path
|
||||
)
|
||||
goto detect_llvm_done
|
||||
)
|
||||
|
||||
REM If that fails, we try and get it from the registry
|
||||
REM Check 64-bit path
|
||||
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM" /ve 2^>nul`) DO set LLVM_DIR=%%C
|
||||
if NOT "%LLVM_DIR%" == "" (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo LLVM Detected via 64-bit registry
|
||||
)
|
||||
goto detect_llvm_done
|
||||
)
|
||||
|
||||
REM Check 32-bit path
|
||||
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM" /ve 2^>nul`) DO set LLVM_DIR=%%C
|
||||
if NOT "%LLVM_DIR%" == "" (
|
||||
if NOT "%verbose%" == "" (
|
||||
echo LLVM Detected via 32-bit registry
|
||||
)
|
||||
goto detect_llvm_done
|
||||
)
|
||||
|
||||
rem No copy has been found, so error out
|
||||
if "%LLVM_DIR%" == "" (
|
||||
echo LLVM not found on the path, or in the registry. Please verify your installation.
|
||||
goto ERR
|
||||
)
|
||||
|
||||
:detect_llvm_done
|
||||
for /F "usebackq tokens=3" %%X in (`CALL "%LLVM_DIR%\bin\clang-cl.exe" --version ^| findstr "clang version"`) do set CLANG_VERSION=%%X
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Using Clang/LLVM
|
||||
echo Version : %CLANG_VERSION%
|
||||
echo Location : "%LLVM_DIR%"
|
||||
)
|
||||
|
||||
:EOF
|
||||
exit /b 0
|
||||
:ERR
|
||||
exit /b 1
|
||||
23
blender-5.2.0/build_files/windows/find_sphinx.cmd
Normal file
23
blender-5.2.0/build_files/windows/find_sphinx.cmd
Normal file
@@ -0,0 +1,23 @@
|
||||
REM First see if there is an environment variable set
|
||||
if EXIST "%SPHINX_BIN%" (
|
||||
goto detect_sphinx_done
|
||||
)
|
||||
|
||||
REM Then see if inkscape is available in the path
|
||||
for %%X in (sphinx-build.exe) do (set SPHINX_BIN=%%~$PATH:X)
|
||||
if EXIST "%SPHINX_BIN%" (
|
||||
goto detect_sphinx_done
|
||||
)
|
||||
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINX_BIN environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
|
||||
REM If still not found clear the variable
|
||||
set SPHINX_BIN=
|
||||
|
||||
:detect_sphinx_done
|
||||
32
blender-5.2.0/build_files/windows/format.cmd
Normal file
32
blender-5.2.0/build_files/windows/format.cmd
Normal file
@@ -0,0 +1,32 @@
|
||||
if EXIST %BLENDER_DIR%\lib\windows_x64\llvm\bin\clang-format.exe (
|
||||
set CF_PATH=lib\windows_x64\llvm\bin
|
||||
goto detect_done
|
||||
)
|
||||
|
||||
if EXIST %BLENDER_DIR%\lib\windows_arm64\llvm\bin\clang-format.exe (
|
||||
set CF_PATH=lib\windows_arm64\llvm\bin
|
||||
goto detect_done
|
||||
)
|
||||
|
||||
echo clang-format not found
|
||||
exit /b 1
|
||||
|
||||
:detect_done
|
||||
echo found clang-format in %CF_PATH%
|
||||
|
||||
if NOT EXIST %PYTHON% (
|
||||
echo python not found, required for this operation
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set FORMAT_PATHS=%BLENDER_DIR%\tools\utils_maintenance\clang_format_paths.py
|
||||
|
||||
REM The formatting script expects clang-format to be in the current PATH.
|
||||
set PATH=%CF_PATH%;%PATH%
|
||||
|
||||
REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
|
||||
%PYTHON% -B %FORMAT_PATHS% %FORMAT_ARGS%
|
||||
|
||||
call "%~dp0\autopep8.cmd"
|
||||
|
||||
:EOF
|
||||
19
blender-5.2.0/build_files/windows/icons_geom.cmd
Normal file
19
blender-5.2.0/build_files/windows/icons_geom.cmd
Normal file
@@ -0,0 +1,19 @@
|
||||
if NOT EXIST %PYTHON% (
|
||||
echo python not found, required for this operation
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
call "%~dp0\find_blender.cmd"
|
||||
|
||||
if EXIST "%BLENDER_BIN%" (
|
||||
goto detect_blender_done
|
||||
)
|
||||
|
||||
echo unable to locate blender, run "set BLENDER_BIN=full_path_to_blender.exe"
|
||||
exit /b 1
|
||||
|
||||
:detect_blender_done
|
||||
|
||||
%PYTHON% -B %BLENDER_DIR%\release\datafiles\blender_icons_geom_update.py
|
||||
|
||||
:EOF
|
||||
23
blender-5.2.0/build_files/windows/lib_update.cmd
Normal file
23
blender-5.2.0/build_files/windows/lib_update.cmd
Normal file
@@ -0,0 +1,23 @@
|
||||
if "%BUILD_ARCH%" == "arm64" (
|
||||
set BUILD_VS_LIBDIR=lib/windows_arm64
|
||||
) else (
|
||||
set BUILD_VS_LIBDIR=lib/windows_x64
|
||||
)
|
||||
|
||||
:RETRY
|
||||
"%GIT%" -C "%BLENDER_DIR%\" config --local "submodule.%BUILD_VS_LIBDIR%.update" "checkout"
|
||||
"%GIT%" -C "%BLENDER_DIR%\" submodule update --progress --init "%BUILD_VS_LIBDIR%"
|
||||
if errorlevel 1 (
|
||||
set /p LibRetry= "Error during update, retry? y/n"
|
||||
if /I "!LibRetry!"=="Y" (
|
||||
goto RETRY
|
||||
)
|
||||
echo.
|
||||
echo Error: Download of external libraries failed.
|
||||
echo Until this is resolved you CANNOT make a successful blender build.
|
||||
echo.
|
||||
exit /b 1
|
||||
)
|
||||
REM re-detect the dependencies after updating the libraries so any python version
|
||||
REM changes are accounted for.
|
||||
call "%~dp0\find_dependencies.cmd"
|
||||
13
blender-5.2.0/build_files/windows/license.cmd
Normal file
13
blender-5.2.0/build_files/windows/license.cmd
Normal file
@@ -0,0 +1,13 @@
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
|
||||
echo python not found in lib folder
|
||||
exit /b 1
|
||||
|
||||
:detect_python_done
|
||||
|
||||
REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
|
||||
%PYTHON% -B %BLENDER_DIR%\tools\utils_maintenance\make_license.py
|
||||
|
||||
:EOF
|
||||
138
blender-5.2.0/build_files/windows/parse_arguments.cmd
Normal file
138
blender-5.2.0/build_files/windows/parse_arguments.cmd
Normal file
@@ -0,0 +1,138 @@
|
||||
set BUILD_DIR=%BLENDER_DIR%..\build_windows
|
||||
set BUILD_TYPE=Release
|
||||
:argv_loop
|
||||
if NOT "%1" == "" (
|
||||
|
||||
REM Help Message
|
||||
if "%1" == "help" (
|
||||
set SHOW_HELP=1
|
||||
goto EOF
|
||||
)
|
||||
REM Build Types
|
||||
if "%1" == "debug" (
|
||||
set BUILD_TYPE=Debug
|
||||
REM Build Configurations
|
||||
) else if "%1" == "builddir" (
|
||||
REM Check if the second character is a : and interpret as an absolute path if present.
|
||||
call set BUILDDIR_ARG=%~2
|
||||
if "!BUILDDIR_ARG:~1,1!" == ":" (
|
||||
set BUILD_DIR_OVERRRIDE=%2
|
||||
) else (
|
||||
set BUILD_DIR_OVERRRIDE=%BLENDER_DIR%..\%2
|
||||
)
|
||||
shift /1
|
||||
) else if "%1" == "with_tests" (
|
||||
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_GTESTS=ON
|
||||
) else if "%1" == "with_gpu_tests" (
|
||||
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_GPU_BACKEND_TESTS=ON -DWITH_GPU_DRAW_TESTS=ON -DWITH_GPU_RENDER_TESTS=ON
|
||||
) else if "%1" == "full" (
|
||||
set TARGET=Full
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
||||
-C"%BLENDER_DIR%\build_files\cmake\config\blender_full.cmake"
|
||||
) else if "%1" == "lite" (
|
||||
set TARGET=Lite
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_lite.cmake"
|
||||
) else if "%1" == "cycles" (
|
||||
set TARGET=Cycles
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\cycles_standalone.cmake"
|
||||
) else if "%1" == "headless" (
|
||||
set TARGET=Headless
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_headless.cmake"
|
||||
) else if "%1" == "bpy" (
|
||||
set TARGET=Bpy
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\bpy_module.cmake"
|
||||
) else if "%1" == "clang" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS%
|
||||
set WITH_CLANG=1
|
||||
) else if "%1" == "release" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake"
|
||||
set TARGET=Release
|
||||
) else if "%1" == "developer" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_developer.cmake"
|
||||
) else if "%1" == "asan" (
|
||||
set WITH_ASAN=1
|
||||
) else if "%1" == "x86" (
|
||||
echo Error: 32 bit builds of blender are no longer supported.
|
||||
goto ERR
|
||||
) else if "%1" == "x64" (
|
||||
set BUILD_ARCH=x64
|
||||
) else if "%1" == "arm64" (
|
||||
set BUILD_ARCH=arm64
|
||||
) else if "%1" == "2019" (
|
||||
set BUILD_VS_YEAR=2019
|
||||
) else if "%1" == "2019b" (
|
||||
set BUILD_VS_YEAR=2019
|
||||
set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
|
||||
) else if "%1" == "2022" (
|
||||
set BUILD_VS_YEAR=2022
|
||||
) else if "%1" == "2022pre" (
|
||||
set BUILD_VS_YEAR=2022
|
||||
set VSWHERE_ARGS=-prerelease
|
||||
) else if "%1" == "2022b" (
|
||||
set BUILD_VS_YEAR=2022
|
||||
set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
|
||||
) else if "%1" == "2026" (
|
||||
set BUILD_VS_YEAR=2026
|
||||
) else if "%1" == "2026i" (
|
||||
set BUILD_VS_YEAR=2026
|
||||
set VSWHERE_ARGS=-prerelease
|
||||
) else if "%1" == "2026b" (
|
||||
set BUILD_VS_YEAR=2026
|
||||
set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
|
||||
) 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" == "nobuildinfo" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_BUILDINFO=OFF
|
||||
) else if "%1" == "pydebug" (
|
||||
set WITH_PYDEBUG=1
|
||||
) else if "%1" == "showhash" (
|
||||
SET BUILD_SHOW_HASHES=1
|
||||
REM Non-Build Commands
|
||||
) else if "%1" == "update" (
|
||||
SET BUILD_UPDATE=1
|
||||
SET BUILD_UPDATE_SVN=1
|
||||
set BUILD_UPDATE_ARGS=
|
||||
) else if "%1" == "code_update" (
|
||||
SET BUILD_UPDATE=1
|
||||
SET BUILD_UPDATE_SVN=0
|
||||
set BUILD_UPDATE_ARGS="--no-libraries"
|
||||
) else if "%1" == "ninja" (
|
||||
SET BUILD_WITH_NINJA=1
|
||||
) else if "%1" == "sccache" (
|
||||
SET BUILD_WITH_SCCACHE=1
|
||||
) else if "%1" == "clean" (
|
||||
set MUST_CLEAN=1
|
||||
) else if "%1" == "verbose" (
|
||||
set VERBOSE=1
|
||||
) else if "%1" == "test" (
|
||||
set TEST=1
|
||||
set NOBUILD=1
|
||||
) else if "%1" == "license" (
|
||||
set LICENSE=1
|
||||
goto EOF
|
||||
) else if "%1" == "format" (
|
||||
set FORMAT=1
|
||||
set FORMAT_ARGS=%2 %3 %4 %5 %6 %7 %8 %9
|
||||
goto EOF
|
||||
) else if "%1" == "icons_geom" (
|
||||
set ICONS_GEOM=1
|
||||
goto EOF
|
||||
) else if "%1" == "doc_py" (
|
||||
set DOC_PY=1
|
||||
goto EOF
|
||||
) else if "%1" == "msvc" (
|
||||
set WITH_MSVC=1
|
||||
) else (
|
||||
echo Command "%1" unknown, aborting!
|
||||
goto ERR
|
||||
)
|
||||
shift /1
|
||||
goto argv_loop
|
||||
)
|
||||
:EOF
|
||||
exit /b 0
|
||||
:ERR
|
||||
exit /b 1
|
||||
36
blender-5.2.0/build_files/windows/reset_variables.cmd
Normal file
36
blender-5.2.0/build_files/windows/reset_variables.cmd
Normal file
@@ -0,0 +1,36 @@
|
||||
rem reset all variables so they do not get accidentally get carried over from previous builds
|
||||
set BUILD_DIR_OVERRRIDE=
|
||||
set BUILD_CMAKE_ARGS=
|
||||
set BUILD_ARCH=
|
||||
set BUILD_VS_VER=
|
||||
set BUILD_VS_YEAR=
|
||||
set BUILD_VS_LIBDIR=
|
||||
set KEY_NAME=
|
||||
set MSBUILD_PLATFORM=
|
||||
set MUST_CLEAN=
|
||||
set NOBUILD=
|
||||
set TARGET=
|
||||
set VERBOSE=
|
||||
set WINDOWS_ARCH=
|
||||
set TESTS_CMAKE_ARGS=
|
||||
set VSWHERE_ARGS=
|
||||
set BUILD_UPDATE=
|
||||
set BUILD_UPDATE_GIT=
|
||||
set BUILD_UPDATE_SVN=
|
||||
set BUILD_SHOW_HASHES=
|
||||
set SHOW_HELP=
|
||||
set BUILD_WITH_NINJA=
|
||||
set WITH_CLANG=
|
||||
set WITH_ASAN=
|
||||
set CLANG_CMAKE_ARGS=
|
||||
set ASAN_CMAKE_ARGS=
|
||||
set WITH_PYDEBUG=
|
||||
set PYDEBUG_CMAKE_ARGS=
|
||||
set FORMAT=
|
||||
set TEST=
|
||||
set LICENSE=
|
||||
set BUILD_WITH_SCCACHE=
|
||||
set ICONS=
|
||||
set ICONS_GEOM=
|
||||
set DOC_PY=
|
||||
SET BUILD_UPDATE_SVN=
|
||||
9
blender-5.2.0/build_files/windows/set_build_dir.cmd
Normal file
9
blender-5.2.0/build_files/windows/set_build_dir.cmd
Normal file
@@ -0,0 +1,9 @@
|
||||
if NOT "%TARGET%" == "" (
|
||||
set BUILD_DIR=%BUILD_DIR%_%TARGET%_%BUILD_ARCH%_vc%BUILD_VS_VER%_%BUILD_TYPE%
|
||||
) else (
|
||||
set BUILD_DIR=%BUILD_DIR%_%BUILD_ARCH%_vc%BUILD_VS_VER%_%BUILD_TYPE%
|
||||
)
|
||||
|
||||
if NOT "%BUILD_DIR_OVERRRIDE%"=="" (
|
||||
set BUILD_DIR=%BUILD_DIR_OVERRRIDE%
|
||||
)
|
||||
21
blender-5.2.0/build_files/windows/show_hashes.cmd
Normal file
21
blender-5.2.0/build_files/windows/show_hashes.cmd
Normal file
@@ -0,0 +1,21 @@
|
||||
if "%GIT%" == "" (
|
||||
echo Git not found, cannot show hashes.
|
||||
goto EOF
|
||||
)
|
||||
cd "%BLENDER_DIR%"
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse --abbrev-ref HEAD') do echo Branch_name=%%i
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Branch_hash=%%i
|
||||
cd "%BLENDER_DIR%/scripts/addons_core"
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse --abbrev-ref HEAD') do echo Addons_Branch_name=%%i
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Addons_Branch_hash=%%i
|
||||
|
||||
if "%BUILD_ARCH%" == "arm64" (
|
||||
cd "%BLENDER_DIR%/lib/windows_arm64"
|
||||
) else (
|
||||
cd "%BLENDER_DIR%/lib/windows_x64"
|
||||
)
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse --abbrev-ref HEAD') do echo Libs_Branch_name=%%i
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Libs_Branch_hash=%%i
|
||||
|
||||
cd "%BLENDER_DIR%"
|
||||
:EOF
|
||||
47
blender-5.2.0/build_files/windows/show_help.cmd
Normal file
47
blender-5.2.0/build_files/windows/show_help.cmd
Normal file
@@ -0,0 +1,47 @@
|
||||
echo.
|
||||
echo Convenience targets
|
||||
echo - release ^(identical to the official blender.org builds^)
|
||||
echo - full ^(same as release minus the cuda kernels^)
|
||||
echo - lite
|
||||
echo - headless
|
||||
echo - cycles
|
||||
echo - bpy
|
||||
echo.
|
||||
echo Utilities ^(not associated with building^)
|
||||
echo - clean ^(Target must be set^)
|
||||
echo - update ^(Update both SVN and GIT^)
|
||||
echo - code_update ^(Update only GIT^)
|
||||
echo - nobuild ^(only generate project files^)
|
||||
echo - showhash ^(Show git hashes of source tree^)
|
||||
echo - test ^(Run automated tests with ctest^)
|
||||
echo - format [path] ^(Format the source using clang-format, path is optional, requires python 3.x to be available^)
|
||||
echo.
|
||||
echo Configuration options
|
||||
echo - verbose ^(enable diagnostic output during configuration^)
|
||||
echo - developer ^(enable faster builds, error checking and tests, recommended for developers^)
|
||||
echo - with_tests ^(enable building unit tests^)
|
||||
echo - nobuildinfo ^(disable buildinfo^)
|
||||
echo - debug ^(Build an unoptimized debuggable build^)
|
||||
echo - packagename [newname] ^(override default cpack package name^)
|
||||
echo - builddir [newdir] ^(override default build folder^)
|
||||
echo - 2019 ^(build with visual studio 2019^)
|
||||
echo - 2019b ^(build with visual studio 2019 Build Tools^)
|
||||
echo - 2022 ^(build with visual studio 2022^)
|
||||
echo - 2022pre ^(build with visual studio 2022 pre-release^)
|
||||
echo - 2022b ^(build with visual studio 2022 Build Tools^)
|
||||
echo - 2026 ^(build with visual studio 2026^)
|
||||
echo - 2026i ^(build with visual studio 2026 insiders^)
|
||||
echo - 2026b ^(build with visual studio 2026 Build Tools^)
|
||||
echo - clang ^(enable building with clang - default on ARM64^)
|
||||
echo - msvc ^(enable building with msvc - default on x64, unsupported on ARM64^)
|
||||
|
||||
echo.
|
||||
echo Documentation Targets ^(Not associated with building^)
|
||||
echo - doc_py ^(Generate sphinx python api docs^)
|
||||
|
||||
echo.
|
||||
echo Experimental options
|
||||
echo - with_gpu_tests ^(enable both the render and draw gpu test suites including EEVEE, Workbench, Grease Pencil, draw manager and GPU backends^)
|
||||
echo - asan ^(enable asan^)
|
||||
echo - ninja ^(enable building with ninja instead of msbuild^)
|
||||
echo.
|
||||
0
blender-5.2.0/build_files/windows/svn_fix.cmd
Normal file
0
blender-5.2.0/build_files/windows/svn_fix.cmd
Normal file
0
blender-5.2.0/build_files/windows/svn_update.cmd
Normal file
0
blender-5.2.0/build_files/windows/svn_update.cmd
Normal file
13
blender-5.2.0/build_files/windows/test.cmd
Normal file
13
blender-5.2.0/build_files/windows/test.cmd
Normal file
@@ -0,0 +1,13 @@
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
|
||||
echo python not found in lib folder
|
||||
exit /b 1
|
||||
|
||||
:detect_python_done
|
||||
|
||||
REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
|
||||
%PYTHON% -B %BLENDER_DIR%\build_files\utils\make_test.py --git-command "%GIT%" --ctest-command="%CTEST%" --config="%BUILD_TYPE%" %BUILD_DIR%
|
||||
|
||||
:EOF
|
||||
10
blender-5.2.0/build_files/windows/update_sources.cmd
Normal file
10
blender-5.2.0/build_files/windows/update_sources.cmd
Normal file
@@ -0,0 +1,10 @@
|
||||
if NOT EXIST %PYTHON% (
|
||||
echo python not found, required for this operation
|
||||
exit /b 1
|
||||
)
|
||||
:detect_python_done
|
||||
|
||||
REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
|
||||
%PYTHON% -B %BLENDER_DIR%\build_files\utils\make_update.py --git-command "%GIT%" %BUILD_UPDATE_ARGS%
|
||||
|
||||
:EOF
|
||||
Reference in New Issue
Block a user