Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dxsdk-d3dx/directxsdk] Add message to handle the conflicts between these two ports #20286

Merged
merged 2 commits into from
Sep 24, 2021

Conversation

Cheney-W
Copy link
Contributor

@Cheney-W Cheney-W commented Sep 22, 2021

Describe the pull request

  • What does your PR fix?

    In our CI test, dxsdk-d3dx failed with following error:
  The following files are already installed in D:/installed/x64-windows and are in conflict with dxsdk-d3dx:x64-windows
  Installed by directxsdk:x64-windows
      debug/lib/d3dx10d.lib
      debug/lib/d3dx11d.lib
      debug/lib/d3dx9d.lib
      lib/d3dx10.lib
      lib/d3dx11.lib
      lib/d3dx9.lib

For fixing this issue, I add message to handle the conflicts between these two ports .

BTW, directxsdk:x64-windows and directxsdk:x86-windows has been skipped in ci.baseline.txt.

No feature need to be tested.

@Cheney-W Cheney-W added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels Sep 22, 2021
@Neumann-A
Copy link
Contributor

Stupid question: What exactly is the difference between these two ports? Should there even be two ports?

@Cheney-W
Copy link
Contributor Author

@walbourn
Do you know more about Neumann-A's question: What exactly is the difference between dxsdk-d3dx and directxsdk? Thanks in advance!

@walbourn
Copy link
Member

walbourn commented Sep 22, 2021

TL;DR: The dxsdk-d3dx and directxsdk ports are mutually exclusive, and use of directxsdk is strongly discouraged. The directxsdk port was explicitly removed from CI coverage.

The legacy DirectX SDK is deprecated, and many of the headers in it conflict with the modern Windows SDK providing much older versions of the headers. About the only scenario where the legacy directxsdk port is called for is if you are using XAudio 2.7 on Windows XP or the deprecated XACT engine. Using the legacy DirectX SDK adds dependencies on the legacy DirectX End User Redistributable which contains SHA-1 only signed payload DLLs, and XInput 1.3 has a known security bug

See this blog post for the details. This is why the direcxtsdk port contains this line:

message(WARNING "Build ${PORT} is deprecated, untested in CI, and requires the use of the DirectSetup legacy REDIST solution. See https://aka.ms/dxsdk for more information.")

I've done the best I can providing features for the deprecated directxsdk port per the instructions in this blog post for the few scenarios where it's still called for, but by in large developers should move away from using it at all.

The recommendations are that new projects should not use either dxsdk-d3dx or directxsdk, and instead use any of the many open source replacements directxtk, directxtex, directxmesh, uvatlas, directxmath, etc. per this blog post for D3DX. For XAudio2 on Windows 7 or later, the xaudio2redist port is the right choice. For XInput, developers should use the original inbox XInput 9.1.0 for Windows 7 or later, or XInput 1.4 for Windows 8 or later because XInput 1.3 has known security bugs, and the feature differences between 9.1.0 are all focused on unused stuff like Xbox 360 headset audio through a controller.

The dxsdk-d3dx port exists as a compromise for developers who still make use of the legacy D3DX9/D3DX10/D3DX11 because they have older codebases, are using older tutorials, or simply don't want to rewrite for the new solutions. This port contains only the D3DX headers and has no header conflicts with the modern Windows SDK. Furthermore, it includes SHA-256 payload DLLs with a side-by-side license that means the use of this port does not require any use of the legacy DIrectX End User Runtime Redistributable package. See this blog post.

@Cheney-W Cheney-W changed the title [dxsdk-d3dx] Modify the destination path [dxsdk-d3dx/directxsdk] Add message to handle the conflicts between these two ports Sep 23, 2021
@PhoebeHui PhoebeHui added the info:reviewed Pull Request changes follow basic guidelines label Sep 23, 2021
@walbourn
Copy link
Member

My recommendation is to move the FATAL_ERROR about the conflict to after the deprecation message, otherwise looks great to me. Thanks.

@BillyONeal BillyONeal merged commit c6595d7 into microsoft:master Sep 24, 2021
@BillyONeal
Copy link
Member

Looks good, thanks for the better error message!

@Cheney-W Cheney-W deleted the Dev/Cheney/dxsdk-d3dx branch August 30, 2022 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants