Commit Graph

123 Commits

Author SHA1 Message Date
Pedro J. Estébanez ee2c1584e4 D3D12: Get rid of DXIL.dll! 2024-07-11 17:56:45 +02:00
Thaddeus Crews 47babe860e Style: Relocate godot_gdb_pretty_print.py 2024-06-23 10:54:12 -05:00
Thaddeus Crews 576c9e4fe8 CI: Add pre-commit hook for clang-tidy
• Set to "manual" so it isn't invoked in normal workflow
• Modernize `.clang-tidy` file
2024-06-17 11:27:18 -05:00
Jakub Marcowski d9f8ef68df Update pre-commit hooks configuration to use ruff instead of black 2024-05-21 18:02:29 -05:00
Thaddeus Crews 96d1e61ee6 CI: Fix incorrect executable perms 2024-05-17 10:47:40 -05:00
Rémi Verschelde e63b5ba9e4 Merge pull request #91416 from Calinou/d3d12-sdk-update-install-script
Update dependencies in D3D12 SDK installer script
2024-05-15 13:51:31 +02:00
Thaddeus Crews f4e58691c2 SCons: Consolidate pysettings via pyproject.toml 2024-05-14 12:01:48 -05:00
Mitten Orvan 829c33aed1 Create a GDB pretty printing file for String, StringName, and Vector
GDB supports custom pretty-printers implemented in Python.
When debugging Godot, checking the values of Strings and StringNames
in the debugger was very inconvenient as the data is fairly deep
in the structure. This makes the values immediately visible.

The custom pretty printer can be taken into use manually by calling
`source misc/scripts/godot_gdb_pretty_print.py` in the GDB console.
In VS code, it can be activated by default by adding the source
command to the `setupCommands` of the configuration in launch.json.

Like this:
```json
// launch.json
{
    "configurations": [
        {
            "name": "C/C++: debug,
            "type": "cppdbg",
	    ...
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Load custom pretty-printers for Godot types.",
                    "text": "source ${workspaceRoot}/misc/scripts/godot_gdb_pretty_print.py"
                }
            ],
            "miDebuggerPath": "gdb"
        }
    ],
    "version": "2.0.0"
}
```

Extended the pretty-printer python script to support Vectors.
The printer needs to be uncomfortably aware of CowData
implementation details, but I don't think there is any
way around that.
2024-05-11 12:33:35 +02:00
Thaddeus Crews df969ff742 CI: Overhaul static checks to use pre-commit 2024-05-08 10:30:24 -05:00
Hugo Locurcio 47ac22486d Update dependencies in D3D12 SDK installer script
- Add colored console output.
2024-05-07 19:10:58 +02:00
Rémi Verschelde 4b070e8031 Fix various typos with codespell
Using 2.2.7.dev217+g10c2abcf.

Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +02:00
ajreckof d3d4b2e25e Fix infinite while loop on empty added file. 2024-04-12 19:38:37 +02:00
A Thousand Ships 4933fa8bf5 [Buildsystem] Fix encoding when reading files 2024-03-24 18:02:56 +01:00
Rémi Verschelde e520359147 Pre-commit: Fix copyright_headers.py to run on all relevant files
It was only running on the first file passed by pre-commit, instead of all.
Fixes compatibility with Windows paths to get the basename.
2024-03-15 15:32:50 +01:00
Thaddeus Crews fb299d0fb1 SCons: Ensure with statement where applicable 2024-03-10 12:57:57 -05:00
Thaddeus Crews d9fa40f2df Enforce \n eol for Python writes
• Ensure utf-8 encoding if previously unspecified
2024-03-09 14:29:24 -06:00
Raul Santos 97851f0340 Move dotnet-format script to pre-commit
Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
2024-03-02 08:25:48 +01:00
Aarni Koskela 20c563de40 Replace hand-written pre-commit hooks with pre-commit Python tool
`pre-commit` can be installed with pip, and configured in the Godot repo with
`pre-commit install`. It can then easily be run both locally with
`pre-commit run`, and on CI, in a cross-platform way.

This makes it much easier for contributors to set up pre-commit hooks,
without having to manually copy files to their git folder.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-02-26 14:57:53 +01:00
Rémi Verschelde 5fd9d0891f SCons: Add proper MinGW support to D3D12 deps install script
Fix a couple GCC warnings.
2024-02-23 22:13:22 +01:00
Rémi Verschelde 7223c5b54a Fix various typos with codespell
Using 2.2.7.dev115+g0eb441d6.

Had to add `cancelled` to the ignore list, as it's a Wayland signal which
we're handling in our code, so we don't want codespell to fix that "typo".

Also includes the typo fix from #87927.

Co-authored-by: Divyanshu Shekhar <61140213+divshekhar@users.noreply.github.com>
2024-02-07 11:09:34 +01:00
A Thousand Ships 6da378afea Fix printf for format checks
Prevents errors with input being invalid format strings
2024-02-02 15:10:46 +01:00
Rémi Verschelde b4e519b07f SCons: Fix Windows cross-compilation from Linux after #86717 2024-01-26 12:42:09 +01:00
MrBBBaiXue ea2c6f1d0b Add a python script to install Direct3D 12 SDK components.
This makes it much faster to get started with Direct3D 12 builds,
as you only need to run `python .\misc\scripts\install_d3d12_sdk_windows.py`
then run `scons d3d12=yes`.

This installs DirectX Shader Compiler, Mesa NIR, WinPixEventRuntime
and DirectX 12 Agility SDK.

- Define a default path that uses the locations from the script.
- Now the default path is in "%LOCALAPPDATA%\Godot\build_deps\"
- Updated CI to use this new python script.

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-01-24 20:11:43 +08:00
Thaddeus Crews 8cd984b3cb SCons: Update mypy 2023-12-11 15:59:06 -06:00
Rémi Verschelde ba713c80df Fix various typos with codespell
Using 2.2.7.dev51+geb4a58fe.
2023-11-11 23:01:24 +01:00