Skip to content

Commit

Permalink
Patch windows d3d12 downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiantUwU committed Jul 28, 2024
1 parent 05da488 commit 37c7100
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions misc/scripts/install_d3d12_sdk_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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} ...")
Expand All @@ -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} ...")
Expand Down Expand Up @@ -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} ...")
Expand All @@ -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')

0 comments on commit 37c7100

Please sign in to comment.