summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/dist/html/editor.html8
-rw-r--r--misc/dist/html/full-size.html5
-rw-r--r--misc/dist/html/service-worker.js12
-rw-r--r--misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj18
-rw-r--r--misc/dist/shell/_godot.zsh-completion3
-rw-r--r--misc/dist/shell/godot.bash-completion1
-rw-r--r--misc/dist/shell/godot.fish3
-rw-r--r--misc/extension_api_validation/4.1-stable_4.2-stable.expected2
-rw-r--r--misc/extension_api_validation/4.2-stable.expected22
-rw-r--r--misc/msvs/props.template21
-rw-r--r--misc/msvs/sln.template20
-rw-r--r--misc/msvs/vcxproj.filters.template30
-rw-r--r--misc/msvs/vcxproj.template42
-rwxr-xr-xmisc/scripts/black_format.sh2
-rwxr-xr-xmisc/scripts/clang_format.sh2
-rwxr-xr-xmisc/scripts/clang_tidy.sh2
-rwxr-xr-xmisc/scripts/dotnet_format.sh2
-rwxr-xr-xmisc/scripts/file_format.sh2
-rwxr-xr-xmisc/scripts/header_guards.sh2
-rw-r--r--misc/scripts/install_d3d12_sdk_windows.py104
20 files changed, 272 insertions, 31 deletions
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index 93afbf085d..e5c68c6338 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -23,7 +23,7 @@
<link id="-gd-engine-icon" rel="icon" type="image/png" href="favicon.png">
<link rel="apple-touch-icon" type="image/png" href="favicon.png">
<link rel="manifest" href="manifest.json">
- <title>Godot Engine Web Editor (@GODOT_VERSION@)</title>
+ <title>Godot Engine Web Editor (___GODOT_VERSION___)</title>
<style>
*:focus {
/* More visible outline for better keyboard navigation. */
@@ -294,7 +294,7 @@ a:active {
<br >
<img src="logo.svg" alt="Godot Engine logo" width="1024" height="414" style="width: auto; height: auto; max-width: min(85%, 50vh); max-height: 250px">
<br >
- @GODOT_VERSION@
+ ___GODOT_VERSION___
<br >
<a href="releases/">Need an old version?</a>
<br >
@@ -384,7 +384,9 @@ window.addEventListener('load', () => {
});
}
- const missing = Engine.getMissingFeatures();
+ const missing = Engine.getMissingFeatures({
+ threads: ___GODOT_THREADS_ENABLED___,
+ });
if (missing.length) {
// Display error dialog as threading support is required for the editor.
document.getElementById('startButton').disabled = 'disabled';
diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html
index 6710cb1533..54571e27c7 100644
--- a/misc/dist/html/full-size.html
+++ b/misc/dist/html/full-size.html
@@ -136,6 +136,7 @@ body {
<script src="$GODOT_URL"></script>
<script>
const GODOT_CONFIG = $GODOT_CONFIG;
+const GODOT_THREADS_ENABLED = $GODOT_THREADS_ENABLED;
const engine = new Engine(GODOT_CONFIG);
(function () {
@@ -213,7 +214,9 @@ const engine = new Engine(GODOT_CONFIG);
initializing = false;
}
- const missing = Engine.getMissingFeatures();
+ const missing = Engine.getMissingFeatures({
+ threads: GODOT_THREADS_ENABLED,
+ });
if (missing.length !== 0) {
const missingMsg = 'Error\nThe following features required to run Godot projects on the Web are missing:\n';
displayFailureNotice(missingMsg + missing.join('\n'));
diff --git a/misc/dist/html/service-worker.js b/misc/dist/html/service-worker.js
index 310574f21d..70e7a399e1 100644
--- a/misc/dist/html/service-worker.js
+++ b/misc/dist/html/service-worker.js
@@ -3,14 +3,14 @@
// that they need an Internet connection to run the project if desired.
// Incrementing CACHE_VERSION will kick off the install event and force
// previously cached resources to be updated from the network.
-const CACHE_VERSION = "@GODOT_VERSION@";
-const CACHE_PREFIX = "@GODOT_NAME@-sw-cache-";
+const CACHE_VERSION = "___GODOT_VERSION___";
+const CACHE_PREFIX = "___GODOT_NAME___-sw-cache-";
const CACHE_NAME = CACHE_PREFIX + CACHE_VERSION;
-const OFFLINE_URL = "@GODOT_OFFLINE_PAGE@";
+const OFFLINE_URL = "___GODOT_OFFLINE_PAGE___";
// Files that will be cached on load.
-const CACHED_FILES = @GODOT_CACHE@;
+const CACHED_FILES = ___GODOT_CACHE___;
// Files that we might not want the user to preload, and will only be cached on first load.
-const CACHABLE_FILES = @GODOT_OPT_CACHE@;
+const CACHABLE_FILES = ___GODOT_OPT_CACHE___;
const FULL_CACHE = CACHED_FILES.concat(CACHABLE_FILES);
self.addEventListener("install", (event) => {
@@ -22,7 +22,7 @@ self.addEventListener("activate", (event) => {
function (keys) {
// Remove old caches.
return Promise.all(keys.filter(key => key.startsWith(CACHE_PREFIX) && key != CACHE_NAME).map(key => caches.delete(key)));
- }).then(function() {
+ }).then(function () {
// Enable navigation preload if available.
return ("navigationPreload" in self.registration) ? self.registration.navigationPreload.enable() : Promise.resolve();
})
diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
index bd2560c280..e9efea8809 100644
--- a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
+++ b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
@@ -255,13 +255,10 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = $min_version;
- "LD_CLASSIC_1000" = "";
- "LD_CLASSIC_1100" = "";
- "LD_CLASSIC_1200" = "";
- "LD_CLASSIC_1300" = "";
- "LD_CLASSIC_1400" = "";
"LD_CLASSIC_1500" = "-ld_classic";
- OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_MAJOR)) $linker_flags";
+ "LD_CLASSIC_1501" = "-ld_classic";
+ "LD_CLASSIC_1510" = "-ld_classic";
+ OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "$targeted_device_family";
};
@@ -300,13 +297,10 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = $min_version;
- "LD_CLASSIC_1000" = "";
- "LD_CLASSIC_1100" = "";
- "LD_CLASSIC_1200" = "";
- "LD_CLASSIC_1300" = "";
- "LD_CLASSIC_1400" = "";
"LD_CLASSIC_1500" = "-ld_classic";
- OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_MAJOR)) $linker_flags";
+ "LD_CLASSIC_1501" = "-ld_classic";
+ "LD_CLASSIC_1510" = "-ld_classic";
+ OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "$targeted_device_family";
VALIDATE_PRODUCT = YES;
diff --git a/misc/dist/shell/_godot.zsh-completion b/misc/dist/shell/_godot.zsh-completion
index 490af0a8a5..f65cf37870 100644
--- a/misc/dist/shell/_godot.zsh-completion
+++ b/misc/dist/shell/_godot.zsh-completion
@@ -51,7 +51,8 @@ _arguments \
'--text-driver[set the text driver]:text driver name' \
'--tablet-driver[set the pen tablet input driver]:tablet driver name' \
'--headless[enable headless mode (--display-driver headless --audio-driver Dummy), useful for servers and with --script]' \
- '--write-movie[writes a video to the specified path (usually with .avi or .png extension)]:path to output video file' \
+ '--log-file[write output/error log to the specified path instead of the default location defined by the project]:path to output log file' \
+ '--write-movie[write a video to the specified path (usually with .avi or .png extension)]:path to output video file' \
'(-f --fullscreen)'{-f,--fullscreen}'[request fullscreen mode]' \
'(-m --maximized)'{-m,--maximized}'[request a maximized window]' \
'(-w --windowed)'{-w,--windowed}'[request windowed mode]' \
diff --git a/misc/dist/shell/godot.bash-completion b/misc/dist/shell/godot.bash-completion
index c78f0a1f33..63efa95c10 100644
--- a/misc/dist/shell/godot.bash-completion
+++ b/misc/dist/shell/godot.bash-completion
@@ -54,6 +54,7 @@ _complete_godot_options() {
--text-driver
--tablet-driver
--headless
+--log-file
--write-movie
--fullscreen
--maximized
diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish
index fbfa7344f1..3f0675fcb2 100644
--- a/misc/dist/shell/godot.fish
+++ b/misc/dist/shell/godot.fish
@@ -67,7 +67,8 @@ complete -c godot -l gpu-index -d "Use a specific GPU (run with --verbose to get
complete -c godot -l text-driver -d "Set the text driver" -x
complete -c godot -l tablet-driver -d "Set the pen tablet input driver" -x
complete -c godot -l headless -d "Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script"
-complete -c godot -l write-movie -d "Writes a video to the specified path (usually with .avi or .png extension). --fixed-fps is forced when enabled" -x
+complete -c godot -l log-file -d "Write output/error log to the specified path instead of the default location defined by the project" -x
+complete -c godot -l write-movie -d "Write a video to the specified path (usually with .avi or .png extension). --fixed-fps is forced when enabled" -x
# Display options:
complete -c godot -s f -l fullscreen -d "Request fullscreen mode"
diff --git a/misc/extension_api_validation/4.1-stable_4.2-stable.expected b/misc/extension_api_validation/4.1-stable_4.2-stable.expected
index d51523bd38..11cf8531c6 100644
--- a/misc/extension_api_validation/4.1-stable_4.2-stable.expected
+++ b/misc/extension_api_validation/4.1-stable_4.2-stable.expected
@@ -91,7 +91,7 @@ Added optional argument. Compatibility methods registered.
GH-80954
--------
-Validate extension JSON: Error: Field 'classes/Font/methods/find_variation/arguments': size changed value in new API, from 4 to 8.
+Validate extension JSON: Error: Field 'classes/Font/methods/find_variation/arguments': size changed value in new API, from 4 to 9.
Added optional arguments. Compatibility method registered.
diff --git a/misc/extension_api_validation/4.2-stable.expected b/misc/extension_api_validation/4.2-stable.expected
index 2c52144896..f6e3661c7b 100644
--- a/misc/extension_api_validation/4.2-stable.expected
+++ b/misc/extension_api_validation/4.2-stable.expected
@@ -51,3 +51,25 @@ Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_u
Barrier arguments have been removed from all relevant functions as they're no longer required.
Draw and compute list overlap no longer needs to be specified.
Initial and final actions have been simplified into fewer options.
+
+
+GH-87115
+--------
+Validate extension JSON: Error: Field 'classes/TileMap/methods/get_collision_visibility_mode': is_const changed value in new API, from false to true.
+Validate extension JSON: Error: Field 'classes/TileMap/methods/get_navigation_visibility_mode': is_const changed value in new API, from false to true.
+
+Two TileMap getters were made const. No adjustments should be necessary.
+
+
+GH-86158
+--------
+Validate extension JSON: Error: Field 'classes/GraphEdit/methods/get_connection_line': is_const changed value in new API, from false to true.
+
+get_connection_line was made const.
+
+
+GH-87668
+--------
+Validate extension JSON: Error: Field 'classes/Font/methods/find_variation/arguments': size changed value in new API, from 8 to 9.
+
+Added optional "baseline_offset" argument. Compatibility method registered.
diff --git a/misc/msvs/props.template b/misc/msvs/props.template
new file mode 100644
index 0000000000..9ecd49a25e
--- /dev/null
+++ b/misc/msvs/props.template
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='%%VSCONF%%'">
+ <NMakeBuildCommandLine>%%BUILD%%</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>%%REBUILD%%</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>%%CLEAN%%</NMakeCleanCommandLine>
+ <NMakeOutput>%%OUTPUT%%</NMakeOutput>
+ <NMakePreprocessorDefinitions>%%DEFINES%%</NMakePreprocessorDefinitions>
+ <NMakeIncludeSearchPath>%%INCLUDES%%</NMakeIncludeSearchPath>
+ <NMakeForcedIncludes>$(NMakeForcedIncludes)</NMakeForcedIncludes>
+ <NMakeAssemblySearchPath>$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
+ <NMakeForcedUsingAssemblies>$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
+ <AdditionalOptions>%%OPTIONS%%</AdditionalOptions>
+ </PropertyGroup>
+ <PropertyGroup Condition="%%CONDITION%%">
+ %%PROPERTIES%%
+ </PropertyGroup>
+ <ItemGroup Condition="%%CONDITION%%">
+ %%EXTRA_ITEMS%%
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/misc/msvs/sln.template b/misc/msvs/sln.template
new file mode 100644
index 0000000000..7d05548c6e
--- /dev/null
+++ b/misc/msvs/sln.template
@@ -0,0 +1,20 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.7.34221.43
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "%%NAME%%", "%%NAME%%.vcxproj", "{%%UUID%%}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ %%SECTION1%%
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ %%SECTION2%%
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {%%SLNUUID%%}
+ EndGlobalSection
+EndGlobal
diff --git a/misc/msvs/vcxproj.filters.template b/misc/msvs/vcxproj.filters.template
new file mode 100644
index 0000000000..d57eeee811
--- /dev/null
+++ b/misc/msvs/vcxproj.filters.template
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>%%UUID1%%</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>%%UUID2%%</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>%%UUID3%%</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Scripts">
+ <UniqueIdentifier>%%UUID4%%</UniqueIdentifier>
+ </Filter>
+ %%FILTERS%%
+ </ItemGroup>
+ <ItemGroup>
+ %%COMPILES%%
+ </ItemGroup>
+ <ItemGroup>
+ %%INCLUDES%%
+ </ItemGroup>
+ <ItemGroup>
+ %%OTHERS%%
+ </ItemGroup>
+</Project>
+<!-- CHECKSUM
+%%HASH%%
+--> \ No newline at end of file
diff --git a/misc/msvs/vcxproj.template b/misc/msvs/vcxproj.template
new file mode 100644
index 0000000000..a1cf22bfb9
--- /dev/null
+++ b/misc/msvs/vcxproj.template
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ %%CONFS%%
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{%%UUID%%}</ProjectGuid>
+ <RootNamespace>godot</RootNamespace>
+ <Keyword>MakeFileProj</Keyword>
+ <VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
+ </PropertyGroup>
+ <PropertyGroup>
+ %%PROPERTIES%%
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ <OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
+ <LayoutDir>$(OutDir)\Layout</LayoutDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <ActiveProjectItemList></ActiveProjectItemList>
+ </PropertyGroup>
+ %%IMPORTS%%
+ <ItemGroup Condition="'$(IncludeListImported)'==''">
+ %%DEFAULT_ITEMS%%
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/misc/scripts/black_format.sh b/misc/scripts/black_format.sh
index 3a64284eb6..48dc14c734 100755
--- a/misc/scripts/black_format.sh
+++ b/misc/scripts/black_format.sh
@@ -20,7 +20,7 @@ fi
# A diff has been created, notify the user, clean up, and exit.
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
-printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
+printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
exit 1
diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh
index 40d94d4276..8b59519606 100755
--- a/misc/scripts/clang_format.sh
+++ b/misc/scripts/clang_format.sh
@@ -47,7 +47,7 @@ fi
# A diff has been created, notify the user, clean up, and exit.
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
-printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
+printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
exit 1
diff --git a/misc/scripts/clang_tidy.sh b/misc/scripts/clang_tidy.sh
index c4811b903c..0c6998b491 100755
--- a/misc/scripts/clang_tidy.sh
+++ b/misc/scripts/clang_tidy.sh
@@ -27,7 +27,7 @@ fi
# A diff has been created, notify the user, clean up, and exit.
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
-printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
+printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
exit 1
diff --git a/misc/scripts/dotnet_format.sh b/misc/scripts/dotnet_format.sh
index cac00f5cb1..e2b4ba5e43 100755
--- a/misc/scripts/dotnet_format.sh
+++ b/misc/scripts/dotnet_format.sh
@@ -31,7 +31,7 @@ fi
# A diff has been created, notify the user, clean up, and exit.
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
-printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
+printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
exit 1
diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh
index 94a3affbd7..ad58657883 100755
--- a/misc/scripts/file_format.sh
+++ b/misc/scripts/file_format.sh
@@ -82,7 +82,7 @@ then
# A diff has been created, notify the user, clean up, and exit.
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
- printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
+ printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
fi
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
diff --git a/misc/scripts/header_guards.sh b/misc/scripts/header_guards.sh
index ce0b3f334d..a79ccd4bee 100755
--- a/misc/scripts/header_guards.sh
+++ b/misc/scripts/header_guards.sh
@@ -81,7 +81,7 @@ fi
# A diff has been created, notify the user, clean up, and exit.
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
-printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
+printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
exit 1
diff --git a/misc/scripts/install_d3d12_sdk_windows.py b/misc/scripts/install_d3d12_sdk_windows.py
new file mode 100644
index 0000000000..8cfa1d399b
--- /dev/null
+++ b/misc/scripts/install_d3d12_sdk_windows.py
@@ -0,0 +1,104 @@
+#!/usr/bin/env python
+
+import os
+import urllib.request
+import shutil
+
+# Base Godot dependencies path
+# If cross-compiling (no LOCALAPPDATA), we install in `bin`
+deps_folder = os.getenv("LOCALAPPDATA")
+if deps_folder:
+ deps_folder = os.path.join(deps_folder, "Godot", "build_deps")
+else:
+ deps_folder = os.path.join("bin", "build_deps")
+
+# DirectX Shader Compiler
+dxc_version = "v1.7.2308"
+dxc_filename = "dxc_2023_08_14.zip"
+dxc_archive = os.path.join(deps_folder, dxc_filename)
+dxc_folder = os.path.join(deps_folder, "dxc")
+# Mesa NIR
+mesa_version = "23.1.0-devel"
+mesa_filename = "godot-nir-23.1.0-1-devel.zip"
+mesa_archive = os.path.join(deps_folder, mesa_filename)
+mesa_folder = os.path.join(deps_folder, "mesa")
+# WinPixEventRuntime
+pix_version = "1.0.231030001"
+pix_archive = os.path.join(deps_folder, f"WinPixEventRuntime_{pix_version}.nupkg")
+pix_folder = os.path.join(deps_folder, "pix")
+# DirectX 12 Agility SDK
+agility_sdk_version = "1.610.4"
+agility_sdk_archive = os.path.join(deps_folder, f"Agility_SDK_{agility_sdk_version}.nupkg")
+agility_sdk_folder = os.path.join(deps_folder, "agility_sdk")
+
+# Create dependencies folder
+if not os.path.exists(deps_folder):
+ os.makedirs(deps_folder)
+
+# DirectX Shader Compiler
+print("[1/4] DirectX Shader Compiler")
+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("[2/4] Mesa NIR")
+if os.path.isfile(mesa_archive):
+ os.remove(mesa_archive)
+print(f"Downloading Mesa NIR {mesa_filename} ...")
+urllib.request.urlretrieve(
+ f"https://github.com/godotengine/godot-nir-static/releases/download/{mesa_version}/{mesa_filename}",
+ mesa_archive,
+)
+if os.path.exists(mesa_folder):
+ print(f"Removing existing local Mesa NIR installation in {mesa_folder} ...")
+ shutil.rmtree(mesa_folder)
+print(f"Extracting Mesa NIR {mesa_filename} to {mesa_folder} ...")
+shutil.unpack_archive(mesa_archive, mesa_folder)
+os.remove(mesa_archive)
+print(f"Mesa NIR {mesa_filename} installed successfully.\n")
+
+# WinPixEventRuntime
+print("[3/4] WinPixEventRuntime")
+if os.path.isfile(pix_archive):
+ os.remove(pix_archive)
+print(f"Downloading WinPixEventRuntime {pix_version} ...")
+urllib.request.urlretrieve(f"https://www.nuget.org/api/v2/package/WinPixEventRuntime/{pix_version}", pix_archive)
+if os.path.exists(pix_folder):
+ print(f"Removing existing local WinPixEventRuntime installation in {pix_folder} ...")
+ shutil.rmtree(pix_folder)
+print(f"Extracting WinPixEventRuntime {pix_version} to {pix_folder} ...")
+shutil.unpack_archive(pix_archive, pix_folder, "zip")
+os.remove(pix_archive)
+print(f"WinPixEventRuntime {pix_version} installed successfully.\n")
+
+# DirectX 12 Agility SDK
+print("[4/4] DirectX 12 Agility SDK")
+if os.path.isfile(agility_sdk_archive):
+ os.remove(agility_sdk_archive)
+print(f"Downloading DirectX 12 Agility SDK {agility_sdk_version} ...")
+urllib.request.urlretrieve(
+ f"https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/{agility_sdk_version}", agility_sdk_archive
+)
+if os.path.exists(agility_sdk_folder):
+ print(f"Removing existing local DirectX 12 Agility SDK installation in {agility_sdk_folder} ...")
+ shutil.rmtree(agility_sdk_folder)
+print(f"Extracting DirectX 12 Agility SDK {agility_sdk_version} to {agility_sdk_folder} ...")
+shutil.unpack_archive(agility_sdk_archive, agility_sdk_folder, "zip")
+os.remove(agility_sdk_archive)
+print(f"DirectX 12 Agility SDK {agility_sdk_version} installed successfully.\n")
+
+# Complete message
+print(f"All Direct3D 12 SDK components were installed to {deps_folder} successfully!")
+print('You can now build Godot with Direct3D 12 support enabled by running "scons d3d12=yes".')