From 37c71007ed3affabbb44594318ec742899c178f8 Mon Sep 17 00:00:00 2001 From: Radiant <69520693+RadiantUwU@users.noreply.github.com> Date: Sun, 28 Jul 2024 20:21:11 +0300 Subject: [PATCH] Patch windows d3d12 downloading --- misc/scripts/install_d3d12_sdk_windows.py | 28 ++++------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/misc/scripts/install_d3d12_sdk_windows.py b/misc/scripts/install_d3d12_sdk_windows.py index 021419391b6a..d8e43fce781d 100755 --- a/misc/scripts/install_d3d12_sdk_windows.py +++ b/misc/scripts/install_d3d12_sdk_windows.py @@ -47,25 +47,8 @@ if not os.path.exists(deps_folder): os.makedirs(deps_folder) -# DirectX Shader Compiler -print(f"{Ansi.BOLD}[1/4] DirectX Shader Compiler{Ansi.RESET}") -if os.path.isfile(dxc_archive): - os.remove(dxc_archive) -print(f"Downloading DirectX Shader Compiler {dxc_filename} ...") -urllib.request.urlretrieve( - f"https://github.com/microsoft/DirectXShaderCompiler/releases/download/{dxc_version}/{dxc_filename}", - dxc_archive, -) -if os.path.exists(dxc_folder): - print(f"Removing existing local DirectX Shader Compiler installation in {dxc_folder} ...") - shutil.rmtree(dxc_folder) -print(f"Extracting DirectX Shader Compiler {dxc_filename} to {dxc_folder} ...") -shutil.unpack_archive(dxc_archive, dxc_folder) -os.remove(dxc_archive) -print(f"DirectX Shader Compiler {dxc_filename} installed successfully.\n") - -# Mesa NIR -print(f"{Ansi.BOLD}[2/4] Mesa NIR{Ansi.RESET}") +## Mesa NIR +print("\x1b[1m[1/3] Mesa NIR\x1b[0m") if os.path.isfile(mesa_archive): os.remove(mesa_archive) print(f"Downloading Mesa NIR {mesa_filename} ...") @@ -92,7 +75,7 @@ dlltool = shutil.which("x86_64-w64-mingw32-dlltool") or "" has_mingw = gendef != "" and dlltool != "" -print(f"{Ansi.BOLD}[2/3] WinPixEventRuntime{Ansi.RESET}") +print("\x1b[1m[2/3] WinPixEventRuntime\x1b[0m") if os.path.isfile(pix_archive): os.remove(pix_archive) print(f"Downloading WinPixEventRuntime {pix_version} ...") @@ -123,7 +106,7 @@ print(f"WinPixEventRuntime {pix_version} installed successfully.\n") # DirectX 12 Agility SDK -print(f"{Ansi.BOLD}[3/3] DirectX 12 Agility SDK{Ansi.RESET}") +print("\x1b[1m[3/3] DirectX 12 Agility SDK\x1b[0m") if os.path.isfile(agility_sdk_archive): os.remove(agility_sdk_archive) print(f"Downloading DirectX 12 Agility SDK {agility_sdk_version} ...") @@ -139,5 +122,4 @@ print(f"DirectX 12 Agility SDK {agility_sdk_version} installed successfully.\n") # Complete message -print(f'{Ansi.GREEN}All Direct3D 12 SDK components were installed to "{deps_folder}" successfully!{Ansi.RESET}') -print(f'{Ansi.GREEN}You can now build Godot with Direct3D 12 support enabled by running "scons d3d12=yes".{Ansi.RESET}') +print(f'\x1b[92mAll Direct3D 12 SDK components were installed to "{deps_folder}" successfully!\x1b[0m')