From 716fda7df1e7dfee2a9308926b50cf539f3e4098 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Tue, 14 Jan 2025 18:12:02 -0700 Subject: [PATCH] Deps: Windows: Add back nuke convenience script To easily force a rebuild of a dependency the nuke script will remove all build artifacts for a specific dependency from the dependency build folder. This includes - The Debug and Release build folder of the dependency - The Debug and Release staging output folder of the dependency - The harvest output folder of the dependency For dependencies that have a long dependency chain like embree, shaderc and python extra convenience scripts are added that nuke the additional deps that need to be removed to obtain a fully clean build. --- .../build_environment/windows/nuke.cmd | 27 +++++++++++++++++++ .../build_environment/windows/nuke_embree.cmd | 9 +++++++ .../build_environment/windows/nuke_python.cmd | 5 ++++ .../windows/nuke_shaderc.cmd | 5 ++++ .../build_environment/windows/vmprep.cmd.txt | 8 ++++++ 5 files changed, 54 insertions(+) create mode 100644 build_files/build_environment/windows/nuke.cmd create mode 100644 build_files/build_environment/windows/nuke_embree.cmd create mode 100644 build_files/build_environment/windows/nuke_python.cmd create mode 100644 build_files/build_environment/windows/nuke_shaderc.cmd diff --git a/build_files/build_environment/windows/nuke.cmd b/build_files/build_environment/windows/nuke.cmd new file mode 100644 index 00000000000..b96a22000fd --- /dev/null +++ b/build_files/build_environment/windows/nuke.cmd @@ -0,0 +1,27 @@ +@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%" ) + diff --git a/build_files/build_environment/windows/nuke_embree.cmd b/build_files/build_environment/windows/nuke_embree.cmd new file mode 100644 index 00000000000..a8dec3fd906 --- /dev/null +++ b/build_files/build_environment/windows/nuke_embree.cmd @@ -0,0 +1,9 @@ +@echo off +call nuke embree +call nuke dpcpp +call nuke vcintrinsics +call nuke openclheaders +call nuke icdloader +call nuke mp11 +call nuke spirvheaders + diff --git a/build_files/build_environment/windows/nuke_python.cmd b/build_files/build_environment/windows/nuke_python.cmd new file mode 100644 index 00000000000..51ba88d83e6 --- /dev/null +++ b/build_files/build_environment/windows/nuke_python.cmd @@ -0,0 +1,5 @@ +@echo off +call nuke python +call nuke numpy +call nuke python_site_packages +call nuke Package_Python \ No newline at end of file diff --git a/build_files/build_environment/windows/nuke_shaderc.cmd b/build_files/build_environment/windows/nuke_shaderc.cmd new file mode 100644 index 00000000000..3d9ba73974f --- /dev/null +++ b/build_files/build_environment/windows/nuke_shaderc.cmd @@ -0,0 +1,5 @@ +@echo off +call nuke shaderc +call nuke shaderc_spirv_tools +call nuke shaderc_spirv_headers +call nuke shaderc_glslang \ No newline at end of file diff --git a/build_files/build_environment/windows/vmprep.cmd.txt b/build_files/build_environment/windows/vmprep.cmd.txt index 6577006d2e1..bf13381278b 100644 --- a/build_files/build_environment/windows/vmprep.cmd.txt +++ b/build_files/build_environment/windows/vmprep.cmd.txt @@ -130,6 +130,14 @@ REM Git won't be in the path yet, use full path 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 **