Add Chromium-only Blender WebEngine parity work

This commit is contained in:
mes123456
2026-08-12 04:47:48 -04:00
commit 9fd26010f6
18225 changed files with 11622124 additions and 0 deletions

View File

@@ -0,0 +1,168 @@
@echo off
if NOT "%1" == "" (
if "%1" == "2017" (
echo "Building for VS2017"
set VSVER=15.0
set VSVER_SHORT=15
set BuildDir=VS15
goto par2
)
if "%1" == "2019" (
echo "Building for VS2019"
set VSVER=16.0
set VSVER_SHORT=16
set BuildDir=VS16
goto par2
)
if "%1" == "2022" (
echo "Building for VS2022"
set VSVER=17.0
set VSVER_SHORT=17
set BuildDir=VS17
goto par2
)
)
:usage
Echo Usage build_deps 2017/2019/2022 x64/arm64
goto exit
:par2
if NOT "%2" == "" (
if "%2" == "x64" (
echo "Building for x64"
set HARVESTROOT=Win64_vc
set ARCH=64
if "%1" == "2022" (
set CMAKE_BUILDER=Visual Studio 17 2022
set CMAKE_BUILD_ARCH=-A x64 -Thost=x64
)
if "%1" == "2019" (
set CMAKE_BUILDER=Visual Studio 16 2019
set CMAKE_BUILD_ARCH=-A x64 -Thost=x64
)
if "%1" == "2017" (
set CMAKE_BUILDER=Visual Studio 15 2017 Win64
set CMAKE_BUILD_ARCH=-Thost=x64
)
goto start
)
if "%2" == "arm64" (
echo "Building for arm64"
set HARVESTROOT=WinArm64_vc
set ARCH=64
if "%1" == "2022" (
set CMAKE_BUILDER=Visual Studio 17 2022
set CMAKE_BUILD_ARCH=-A arm64
) else (
echo ARM64 can only be used in combination with VS2022
goto exit
)
goto start
)
)
goto usage
:start
setlocal ENABLEEXTENSIONS
set CMAKE_DEBUG_OPTIONS=-DWITH_OPTIMIZED_DEBUG=On
if "%3" == "debug" set CMAKE_DEBUG_OPTIONS=-DWITH_OPTIMIZED_DEBUG=Off
set dobuild=1
if "%4" == "nobuild" set dobuild=0
REM If Python is be available certain deps may try to
REM to use this over the version we build, to prevent that
REM make sure pythonw is NOT in the path. We look for pythonw.exe
REM since windows apparently ships a python.exe that just opens up
REM the windows store but does not ship any actual python files that
REM could cause issues.
for %%X in (pythonw.exe) do (set PYTHONW=%%~$PATH:X)
if EXIST "%PYTHONW%" (
echo PYTHON found at %PYTHONW% dependencies cannot be build with python available in the path
goto exit
)
set SOURCE_DIR=%~dp0\..
set BUILD_DIR=%cd%\build
set HARVEST_DIR=%BUILD_DIR%\output
set STAGING=%BUILD_DIR%\S
rem for python module build
set MSSdk=1
set DISTUTILS_USE_SDK=1
rem if you let pip pick its own build dirs, it'll stick it somewhere deep inside the user profile
rem and cython will refuse to link due to a path that gets too long.
set TMPDIR=c:\t\
rem for python externals source to be shared between the various archs and compilers
mkdir %BUILD_DIR%\downloads\externals
REM Detect MSVC Installation
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\%VSVER%\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\%VSVER%\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"
echo on
REM Sanity Checks
where /Q msbuild
if %ERRORLEVEL% NEQ 0 (
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
)
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
)
set StatusFile=%BUILD_DIR%\%1_%2.log
set original_path=%path%
set oiio_paths=%Staging%\%BuildDir%%ARCH%R\Release\openimageio\bin
set openexr_paths=%Staging%\%BuildDir%%ARCH%R\Release\openexr\bin
set imath_paths=%Staging%\%BuildDir%%ARCH%R\Release\imath\bin
set tbb_paths=%Staging%\%BuildDir%%ARCH%R\Release\tbb\bin
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%original_path%;%oiio_paths%;%openexr_paths%;%imath_paths%;%tbb_paths%
mkdir %STAGING%\%BuildDir%%ARCH%R
cd %Staging%\%BuildDir%%ARCH%R
echo %DATE% %TIME% : Start > %StatusFile%
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/
echo %DATE% %TIME% : Release Configuration done >> %StatusFile%
if "%dobuild%" == "1" (
msbuild -maxcpucount:1 "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
echo %DATE% %TIME% : Release Build done >> %StatusFile%
cmake --build . --target Harvest_Release_Results > Harvest_Release.txt
)
echo %DATE% %TIME% : Release Harvest done >> %StatusFile%
if "%NODEBUG%" == "1" goto exit
cd %BUILD_DIR%
mkdir %STAGING%\%BuildDir%%ARCH%D
cd %Staging%\%BuildDir%%ARCH%D
set oiio_paths=%Staging%\%BuildDir%%ARCH%D\Debug\openimageio\bin
set openexr_paths=%Staging%\%BuildDir%%ARCH%D\Debug\openexr\bin
set imath_paths=%Staging%\%BuildDir%%ARCH%D\Debug\imath\bin
set tbb_paths=%Staging%\%BuildDir%%ARCH%D\Debug\tbb\bin
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%original_path%;%oiio_paths%;%openexr_paths%;%imath_paths%;%tbb_paths%
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
echo %DATE% %TIME% : Debug Configuration done >> %StatusFile%
if "%dobuild%" == "1" (
msbuild -maxcpucount:1 "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
echo %DATE% %TIME% : Debug Build done >> %StatusFile%
cmake --build . --target Harvest_Debug_Results> Harvest_Debug.txt
)
echo %DATE% %TIME% : Debug Harvest done >> %StatusFile%
cd %BUILD_DIR%
:exit
set path=%original_path%
Echo .

View File

@@ -0,0 +1,65 @@
@echo off
REM This is a helper script to easily force a rebuild of a single dependency
REM calling nuke depname in c:\db will remove all build artifacts of the
REM dependency and the next time you call vmbuild the dep will be build from
REM scratch.
if "%1"=="" goto EOF:
set ROOT=%~dp0\build\
set CurPath=%ROOT%\s\vs1564D\debug\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1564D\x64\debug\external_%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1564D\x64\debug\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1564D\build\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1564R\release\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1564R\x64\Release\external_%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1564R\x64\Release\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1564R\build\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\output\win64_vc15\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1664D\debug\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1664D\x64\debug\external_%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1664D\x64\debug\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1664D\build\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1664R\release\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1664R\x64\Release\external_%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1664R\x64\Release\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1664R\build\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\output\win64_vc16\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1764D\debug\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1764D\x64\debug\external_%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1764D\x64\debug\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1764D\build\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1764R\release\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1764R\x64\Release\external_%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1764R\x64\Release\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\s\vs1764R\build\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )
set CurPath=%ROOT%\output\win64_vc17\%1\
if EXIST %CurPath%\nul ( echo removing "%CurPath%" && rd /s /q "%CurPath%" )

View File

@@ -0,0 +1,9 @@
@echo off
call nuke embree
call nuke dpcpp
call nuke vcintrinsics
call nuke openclheaders
call nuke icdloader
call nuke emhash
call nuke spirvheaders

View File

@@ -0,0 +1,5 @@
@echo off
call nuke python
call nuke numpy
call nuke python_site_packages
call nuke Package_Python

View File

@@ -0,0 +1,5 @@
@echo off
call nuke shaderc
call nuke shaderc_spirv_tools
call nuke shaderc_spirv_headers
call nuke shaderc_glslang

View File

@@ -0,0 +1,22 @@
@echo off
REM ###########################################################################
REM #
REM # This script assumes the machine has been prepared with the vmprep.cmd
REM # script and will build the dependencies in the c:\db folder
REM #
REM # If you find this script with a .txt extension, DO NOT RUN IT! vmprep will
REM # Download this and give it the right extension.
REM ###########################################################################
set CMAKE_GENERATOR_INSTANCE=c:\vs2022bt\
set CMAKE_GENERATOR=Visual Studio 17 2022
set NODEBUG=
set TMPDIR=c:\t\
set ROCM_PATH=c:\tools\rocm\7.1.1
set HIP_PATH=c:\tools\rocm\7.1.1
set PERL=c:\db\build\downloads\perl\perl\bin\perl.exe
set path=%path%;c:\db\build\downloads\perl\perl\bin\;
if not exist c:\db\ (
mkdir c:\db
)
cd /d c:\db
call c:\blendergit\blender\build_files\build_environment\windows\build_deps.cmd 2022 x64 release

View File

@@ -0,0 +1,140 @@
@echo off
REM ###########################################################################
REM #
REM # Note: This file has a .txt extension so it cannot be directly run from a
REM # blender source clone, it is meant to run on a clean windows install and
REM # nothing else. DO NOT REMOVE THE .TXT extension. See instructions below on
REM # how to execute this script.
REM #
REM ###########################################################################
echo ###########################################################################
echo #
echo # This sets up a Virtual Machine for building the blender dependencies, No
echo # additional software nor a clone of the blender repository is required
echo # before running this script. A Clean installation of Windows will suffice.
echo # Obtain this script on the VM by running from an *administrator* command
echo # prompt :
echo #
echo # curl https://projects.blender.org/blender/blender/raw/branch/main/build_files/build_environment/windows/vmprep.cmd.txt -o %USERPROFILE%/vmprep.cmd
echo #
echo # Then run it using %USERPROFILE%/vmprep.cmd
echo #
echo # This will install :
echo # - Visual Studio 2022 17.14.14 Buildtools with the required workloads in
echo # the c:\vs2022bt\ folder
echo # - Meson 1.9.1
echo # - Visual Studio 2010 X64 redist (required for the yaml binary)
echo # - Git 2.38.0
echo # - CMake 3.31.7
echo # - Cuda 12.8.0
echo # - HIP 7.1.51803
echo #
echo # Additionally this will also create and populate the following folders :
echo #
echo # - C:\install\ - This is a temporary folder with installation files
echo # needed by this script.
echo # - C:\t\ - This is a temporary folder for the python dependencies
echo # to build in, as they would have build issues if the
echo # default user profile path is used as it is too long.
echo # - c:\blendergit\blender
echo # - This is the blender source repository
echo # - c:\db - This is the build folder for the dependencies
echo # it has a short name to sidestep any long path issues.
echo ###########################################################################
echo #
echo # Since this will download and install a whole bunch of stuff the following
echo # disclaimer is seemingly required:
echo #
echo # ******* WARNING *******
echo # ******* WARNING *******
echo #
echo # DO NOT RUN THIS ON ANYTHING BUT A CLEAN WINDOWS INSTALL, IF YOU DO, AND IT
echo # MESSES UP YOUR WORKSTATION, THAT'S ON YOU...
echo #
echo # ******* WARNING *******
echo # ******* WARNING *******
echo #
echo # hit ctrl-break right now to abort.. last chance
echo #
pause
echo create install folder
mkdir c:\install
echo create shortly named temp folder
mkdir C:\t
echo Obtaining Visual Studio build tools installer
curl https://download.visualstudio.microsoft.com/download/pr/c2e2845d-bdff-44fc-ac00-3d488e9f5675/abdb87ff12fe1885ccc4964b4ab51da566549fd2096d7ceb1fdea907372f21d7/vs_BuildTools.exe -o c:\install\vs_BuildTools.exe
echo Obtaining Visual studio blender installer configuration
curl https://projects.blender.org/blender/blender/raw/branch/main/build_files/build_environment/windows/vsconfig -o c:\install\.vsconfig
echo Installing Visual Studio 2022 Build tools
c:\install\vs_BuildTools.exe --wait --passive --installPath c:\vs2022bt\ --config c:\install\.vsconfig
echo Obtaining git
curl -L https://github.com/git-for-windows/git/releases/download/v2.38.0.windows.1/Git-2.38.0-64-bit.exe -o c:\install\Git-2.38.0-64-bit.exe
echo Installing git
start /wait c:\install\Git-2.38.0-64-bit.exe /silent
echo Obtaining CMake
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.7/cmake-3.31.7-windows-x86_64.msi -o c:\install\cmake-3.31.7-windows-x86_64.msi
echo Installing cmake
start /wait msiexec /passive /ic:\install\cmake-3.31.7-windows-x86_64.msi ADD_CMAKE_TO_PATH="System"
echo Obtaining meson
curl -L https://github.com/mesonbuild/meson/releases/download/1.9.1/meson-1.9.1-64.msi -o c:\install\meson-1.9.1-64.msi
echo Installing meson
start /wait msiexec /passive /i c:\install\meson-1.9.1-64.msi
echo Obtaining Visual studio 2010 x64 redist
curl https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe -o c:\install\vcredist_x64.exe
echo Installing Visual studio 2010 x64 redist
start /wait c:\install\vcredist_x64.exe /passive /norestart
echo Obtaining cuda 12.8.0
curl https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_571.96_windows.exe -o c:\install\cuda_12.8.0_571.96_windows.exe
echo Installing cuda 12.8.0
echo *********************************************************************
echo ** CUDA is a bit of a pain to install due to it lacking features **
echo ** for unattended installs, the installer should have just started **
echo ** manually install it to c:\tools\cuda\12.8.0\ this HAS to be the **
echo ** place, don't use anything else, This folder has been created **
echo ** so you should be able to just browse to it in the installer **
echo *********************************************************************
mkdir c:\tools\cuda\12.8.0\
start /wait c:\install\cuda_12.8.0_571.96_windows.exe
echo Obtaining 7zr
curl https://www.7-zip.org/a/7zr.exe -o c:\install\7zr.exe
echo Obtaining Hip SDK 7.1.51803-d3a86bd04
curl https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-26.Q1-Win11-For-HIP.exe -o c:\install\AMD-Software-PRO-Edition-26.Q1-Win11-For-HIP.exe
c:\install\7zr.exe x C:\install\AMD-Software-PRO-Edition-26.Q1-Win11-For-HIP.exe -oC:\install\
mkdir C:\tools\rocm
echo Installing Hip SDK 7.1.51803-d3a86bd04
msiexec /i C:\install\Packages\Apps\ROCmSDKPackages\SDKCore\ROCm_SDK_Core.msi INSTALLDIR="C:\tools\rocm"
echo Cloning Blender repository
mkdir c:\blendergit
cd c:\blendergit
REM Git won't be in the path yet, use full path
"C:\Program Files\Git\cmd\git.exe" clone https://projects.blender.org/blender/blender.git
mkdir c:\db
echo Obtaining vmbuild.cmd
curl https://projects.blender.org/blender/blender/raw/branch/main/build_files/build_environment/windows/vmbuild.cmd.txt -o c:\db\vmbuild.cmd
echo Obtaining nuke.cmd
curl https://projects.blender.org/blender/blender/raw/branch/main/build_files/build_environment/windows/nuke.cmd -o c:\db\nuke.cmd
echo Obtaining nuke_python.cmd
curl https://projects.blender.org/blender/blender/raw/branch/main/build_files/build_environment/windows/nuke_python.cmd -o c:\db\nuke_python.cmd
echo Obtaining nuke_embree.cmd
curl https://projects.blender.org/blender/blender/raw/branch/main/build_files/build_environment/windows/nuke_embree.cmd -o c:\db\nuke_embree.cmd
echo Obtaining nuke_shaderc.cmd
curl https://projects.blender.org/blender/blender/raw/branch/main/build_files/build_environment/windows/nuke_shaderc.cmd -o c:\db\nuke_shaderc.cmd
echo *******************************************************************
echo ** Environment variables have changed, please close this console **
echo ** open "x64 Native Tools Command Prompt for VS 2019" and run **
echo ** "cd c:\db && vmbuild.cmd" to start a build. **
echo *******************************************************************

View File

@@ -0,0 +1,22 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.CoreBuildTools",
"Microsoft.VisualStudio.Workload.MSBuildTools",
"Microsoft.VisualStudio.Component.Windows11SDK.22621",
"Microsoft.VisualStudio.Component.VC.CoreBuildTools",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
"Microsoft.VisualStudio.Component.VC.CMake.Project",
"Microsoft.VisualStudio.Component.TestTools.BuildTools",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.ASAN",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.Workload.VCTools"
]
}