You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a180897
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+39-9Lines changed: 39 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ These instructions define how GitHub Copilot should assist with this project. Th
22
22
-**Code Style**: The project uses an .editorconfig file to enforce coding standards. Follow the rules defined in `.editorconfig` for indentation, line endings, and other formatting. Additional information can be found on the wiki at [Implementation](https://github.com/microsoft/DirectXTK/wiki/Implementation). The library's public API requires C++11, and the project builds with C++17 (`CMAKE_CXX_STANDARD 17`). The command-line tools also use C++17, including `<filesystem>` for long file path support. This code is designed to build with Visual Studio 2022, Visual Studio 2026, clang for Windows v12 or later, or MinGW 12.2.
23
23
> Notable `.editorconfig` rules: C/C++ and HLSL files use 4-space indentation, `crlf` line endings, and `latin1` charset — avoid non-ASCII characters in source files. HLSL files have separate indent/spacing rules defined in `.editorconfig`.
24
24
-**Documentation**: The project provides documentation in the form of wiki pages available at [Documentation](https://github.com/microsoft/DirectXTK/wiki/).
25
-
-**Error Handling**: Use C++ exceptions for error handling and uses RAII smart pointers to ensure resources are properly managed. For some functions that return HRESULT error codes, they are marked `noexcept`, use `std::nothrow` for memory allocation, and should not throw exceptions.
25
+
-**Error Handling**: Use C++ exceptions for error handling and use RAII smart pointers to ensure resources are properly managed. For some functions that return HRESULT error codes, they are marked `noexcept`, use `std::nothrow` for memory allocation, and should not throw exceptions.
26
26
-**Testing**: Unit tests for this project are implemented in this repository [Test Suite](https://github.com/walbourn/directxtktest/) and can be run using CTest per the instructions at [Test Documentation](https://github.com/walbourn/directxtktest/wiki). See [test copilot instructions](https://github.com/walbourn/directxtktest/blob/main/.github/copilot-instructions.md) for additional information on the tests.
27
27
-**Security**: This project uses secure coding practices from the Microsoft Secure Coding Guidelines, and is subject to the `SECURITY.md` file in the root of the repository. Functions that read input from image files, geometry files, and audio files are subject to OneFuzz fuzz testing to ensure they are secure against malformed files.
28
28
-**Dependencies**: The project uses CMake and VCPKG for managing dependencies, making optional use of DirectXMath, GameInput, and XAudio2Redist. The project can be built without these dependencies, relying on the Windows SDK for core functionality. CMake build options include `BUILD_GAMEINPUT`, `BUILD_WGI`, and `BUILD_XINPUT` for alternative input backends.
@@ -58,7 +58,7 @@ wiki/ # Local clone of the GitHub wiki documentation repository.
58
58
- Make use of `assert` for debugging checks, but be sure to validate input parameters in release builds.
59
59
- Make use of the `DebugTrace` helper to log diagnostic messages, particularly at the point of throwing an exception.
60
60
- Explicitly `= delete` copy constructors and copy-assignment operators on all classes that use the pImpl idiom.
61
-
- Explicitly utilize `= default` or `=delete` for copy constructors, assignment operators, move constructors and move-assignment operators where appropriate.
61
+
- Explicitly utilize `= default` or `=delete` for copy constructors, assignment operators, move constructors and move-assignment operators where appropriate.
62
62
- Use 16-byte alignment (`_aligned_malloc` / `_aligned_free`) to support SIMD operations in the implementation, but do not expose this requirement in public APIs.
63
63
- All implementation `.cpp` files include `pch.h` as their first include (precompiled header). MinGW builds skip precompiled headers.
64
64
-`Model` and related classes require RTTI (`/GR` on MSVC, `__GXX_RTTI` on GCC/Clang). The CMake build enables `/GR` automatically; do not disable RTTI when using `Model`.
@@ -163,7 +163,7 @@ Headers that trigger Clang warnings use paired `#pragma clang diagnostic push`/`
163
163
### Patterns to Avoid
164
164
165
165
- Don’t use raw pointers for ownership.
166
-
- Avoid macros for constants—prefer `constexpr` or `inline``const`.
166
+
- Avoid macros for constants—prefer `constexpr` or `inlineconst`.
167
167
- Don’t put implementation logic in header files unless using templates, although the SimpleMath library does use an .inl file for performance.
168
168
- Avoid using `using namespace` in header files to prevent polluting the global namespace.
169
169
- Don't use `[[deprecated]]` or `__declspec(deprecated)` attributes. Feature retirement is communicated via `CHANGELOG.md` notes, not in-source deprecation markers.
@@ -199,7 +199,7 @@ Every source file (`.cpp`, `.h`, `.hlsl`, `.fx`, etc.) must begin with this bloc
199
199
200
200
Section separators within files use:
201
201
- Major sections: `//--------------------------------------------------------------------------------------`
The project does **not** use Doxygen. API documentation is maintained exclusively on the GitHub wiki.
205
205
@@ -225,9 +225,9 @@ Shaders in `Src/Shaders/` are compiled with **FXC**, producing embedded C++ head
225
225
-[Games for Windows and the DirectX SDK blog - December 2013](https://walbourn.github.io/directx-tool-kit-for-audio/)
226
226
-[Games for Windows and the DirectX SDK blog - September 2014](https://walbourn.github.io/directx-tool-kit-now-with-gamepads/)
227
227
-[Games for Windows and the DirectX SDK blog - August 2015](https://walbourn.github.io/directx-tool-kit-keyboard-and-mouse-support/)
228
-
-[Games for Windows and the DirectX SDK blog - October 2021](https://walbourn.github.io/directx-tool-kit-vertex-skinning-update/)
229
-
-[Games for Windows and the DirectX SDK blog - September 2021](https://walbourn.github.io/latest-news-on-directx-tool-kit/)
230
228
-[Games for Windows and the DirectX SDK blog - May 2020](https://walbourn.github.io/directx-tool-kit-for-audio-updates-and-a-direct3d-9-footnote/)
229
+
-[Games for Windows and the DirectX SDK blog - September 2021](https://walbourn.github.io/latest-news-on-directx-tool-kit/)
230
+
-[Games for Windows and the DirectX SDK blog - October 2021](https://walbourn.github.io/directx-tool-kit-vertex-skinning-update/)
231
231
232
232
## No speculation
233
233
@@ -260,11 +260,11 @@ When creating documentation:
260
260
## Cross-platform Support Notes
261
261
262
262
- The code targets Win32 desktop applications for Windows 8.1 or later, legacy Xbox One XDK, and Universal Windows Platform (UWP) apps for Windows 10 and Windows 11.
263
-
- Portability and conformance of the code is validated by building with Visual C++, clang/LLVM for Windows, and MinGW.
263
+
- Portability and conformance of the code are validated by building with Visual C++, clang/LLVM for Windows, and MinGW.
264
264
- For PC development using the *Microsoft GDK*, the project provides MSBuild solution `DirectXTK_GDKW_2022.sln` for the x64 or ARM64 architectures.
265
265
- The MSBuild solution `DirectXTK_GDK_2022.sln` is for *Microsoft GDK with Xbox Extensions* development for PC using the legacy Gaming.Desktop.x64 custom platform. There is no support for the Gaming.Xbox.*.x64 custom platforms since they do not support DirectX 11.
266
266
- The project ships MSBuild projects for Visual Studio 2022 (`.sln` / `.vcxproj`) and Visual Studio 2026 (`.slnx` / `.vcxproj`). VS 2019 projects have been retired.
267
-
- The CMake build supports legacy Xbox One XDK via the `XBOX_CONSOLE_TARGET` variable (`durango`). Xbox Series X|S (`scarlett`) and Xbox One (`xboxone`) via the *Microsoft GDK with Xbox Extensions* only supports DirectX 12, so this version of the library cannot support those platforms.
267
+
- The CMake build supports legacy Xbox One XDK via the `XBOX_CONSOLE_TARGET` variable (`durango`). Xbox Series X|S (`scarlett`) and Xbox One (`xboxone`) via the *Microsoft GDK with Xbox Extensions* only support DirectX 12, so this version of the library cannot support those platforms.
268
268
269
269
### Platform and Compiler `#ifdef` Guards
270
270
@@ -291,7 +291,7 @@ Use these established guards — do not invent new ones:
291
291
|`USING_COREWINDOW`| CoreWindow-based input (UWP) for Keyboard, Mouse |
292
292
|`GAMEINPUT_API_VERSION`| GameInput SDK version detection for API-level feature checks |
293
293
294
-
> `_M_ARM`/ `__arm__` is legacy 32-bit ARM which is deprecated.
294
+
> `_M_ARM`/ `__arm__` is legacy 32-bit ARM which is deprecated.
295
295
296
296
## Code Review Instructions
297
297
@@ -317,3 +317,33 @@ When reviewing documentation, do the following:
317
317
- Review the public interface defined in the `Inc` folder.
318
318
- Read the documentation on the wiki located in [this git repository](https://github.com/microsoft/DirectXTK.wiki.git).
319
319
- Report any specific gaps in the documentation compared to the public interface.
320
+
321
+
## Release Process
322
+
323
+
1. Ensure all changes are merged into the `main` branch and that all tests pass.
324
+
2. Git pull the local repository to ensure it is up to date with the `main` branch.
325
+
3. Run the PowerShell script `build\preparerelease.ps1` which will generate a topic branch for the release, update the version number in `CMakeLists.txt`, the `README.md` file, the release notes in the nuspec files, and create a stub in the `CHANGELOG.md` file for the new release.
326
+
4. Edit the `CHANGELOG.md` file to update it with a summary of changes.
327
+
5. Submit the topic branch for review and merge into `main` once approved. Allow the GitHub Actions workflows and the Azure DevOps pipelines to complete successfully before proceeding.
328
+
6. Run the PowerShell script `build\completerelease.ps1` which will set a tag on the project repo and the test repo, and create a release on GitHub with the release notes from `CHANGELOG.md`. Ensure you have set up GPG signing for your GitHub account so that the tags will be verified.
329
+
7. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`.
330
+
8. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`.
331
+
9. Create a PR on MSCodeHub from the `main` branch to the `release` branch.
332
+
10. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build signed binaries and the NuGet packages.
333
+
11. Run the PowerShell script `build\downloadartifacts.ps1` to download the signed binaries from the Azure DevOps pipeline artifacts.
334
+
12. Edit the GitHub release and upload the signed binaries to the release assets.
335
+
13. Download the GitHub source .zip archive from the release. Unzip and compare to the local repo to ensure it matches — keep in mind there may be some CR/LF differences. Run minisign on the .zip to generate a signature file, and upload the signature file to the release assets.
336
+
14. Validate the NuGet packages with <https://github.com/walbourn/directxtk-tutorials> by pushing the NuGet packages to a local Packages Source folder, and refreshing the NuGet packages from that folder. Then build using BuildAllSolutions.targets.
337
+
15. Run the PowerShell script `build\promotenuget.ps1` with the `-Release` parameter to promote the version to the Release view on the project-scoped ADO feed.
338
+
16. Run the MSCodeHub pipeline to publish the NuGet packages to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org.
339
+
17. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository.
340
+
18. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXTK port in VCPKG with the new release version. This will edit the files in `ports\directxtk`.
341
+
19. Test the VCPKG port using all appropriate triplets and features.
342
+
20. Run `.\vcpkg --x-add-version directxtk` to update the VCPKG versioning history.
343
+
21. Submit a PR to the VCPKG repository to update the DirectXTK port back to the main GitHub repo. The PR will be reviewed and merged by the VCPKG maintainers.
344
+
22. If relevant changes were made to the `xwbtool` or `MakeSpriteFont` tools, update the winget manifests for those tools in the `winget` repository.
345
+
- Git pull a local repository to `D:\winget-pkgs` in sync with the `master` branch of the WinGet repository.
346
+
- Run the PowerShell script `build\updatewinget.ps1` to update the winget manifests for the tools with the new release version.
347
+
- Submit a PR to the `winget` repository to update the manifests for each tool — they must be done as distinct PRs. The PRs will be reviewed and merged by the winget maintainers.
348
+
349
+
> When fully completed, be sure to update the GitHub release with links to the matching NuGet packages, the VCPKG port, and the winget manifests for the tools.
0 commit comments