windowsinstallationdirectxdirectx-11redistributable

Is it necessary to redistribute DirectX from the Windows SDK?


When writing programs using the June 2010 DirectX SDK, it's necessary to include several redistributable cab files in the installer in order to have the program run on fresh Windows installations.

DirectX is now included in the Windows SDK, but I haven't been able to find information about whether any kind of redistributables are required when building the installer. Let's say I use the Windows 10 SDK. Will my program just work on a fresh Windows 7 install? Or is there some kind of redistributable that I'm missing?

Here's what I've found myself:

1) It seems that there's a "Redist" directory in the Windows 10 SDK directory which contains d3dcompiler_47.dll and d3dcsx_47.dll. My assumption is that if the equivalent libs are linked, then I would need to redistribute these dlls with my application, and otherwise I do not. Is this the case?

2) My suspicion is Microsoft has moved away from using dlls for DirectX, and it's now just statically linked. This would explain not needing to redistribute any dlls. I also do not see any d3d11 dlls in my C:\Windows\System32 directory, which seems to support this suspicion. However, d3d11.lib is only 15kb, which leads me to believe that there must be a dll somewhere. Is this somehow included in Windows? Even a fresh Windows 7 install? Was it distributed with a Windows Update?

Can anyone let me know if my concern is valid? I'm just trying to make sure my installer includes everything a user of Windows 7 or newer would need to run my program that uses DirectX 11 from the Windows 10 SDK.


Solution

  • Since 2004, DirectSetup (aka DXSETUP) never installs "DirectX". It does not install Direct3D, DirectDraw, DirectSound, DirectInput, DirectPlay, DirectSound, DirectMusic, DirectShow, etc. Everything you can call "DirectX" is part of the OS as of Windows XP Service Pack 2 and can only be updated by Windows Update, Service Packs, or new versions of the operating system.

    For Direct3D 11 Runtime deployment generally, see Direct3D 11 Deployment for Game Developers. The short answer here is: require Windows 7 as your minimum spec and don't worry about it :)

    The only thing DXSETUP ever installs is 'optional side-by-side' components DLLs such as D3DX9, D3DX10, D3DX11, XInput 1.3, XAudio 2.7, XACT, D3DCompile #43, D3DCSX #43, and the legacy Managed DirectX 1.1 assemblies.

    See Not So DirectSetup and KB179113.

    With Windows 8, XInput 1.4 and XAudio 2.8 were added to the OS as well. XInput 1.4 and XAudio 2.8 are are never installed by DXSETUP, but the old XInput 9.1.0 is included in Windows Vista or later and is usually sufficient for most needs.

    XNAMath is replaced by DirectXMath which is part of the Windows SDK. It's all inline so it has no link library or DLL.

    All versions of D3DX9, D3DX10, and D3DX11 are deprecated, as is XACT. See MSDN and Living without D3DX.

    For the Windows SDK, you have the headers and link libraries for the "DirectX" DLLs which are part of the OS. See A Brief History of Windows SDKs.

    To support Windows 7 development, you can REDIST the D3DCompile #46, D3DCompile #47, D3DCSX #46, and D3DCSX #47 DLLs application-local with your Windows desktop application. Those are the REDIST files you found. See HLSL, FXC, and D3DCompile.

    With Windows 8.1, D3DCompile #47 is also included with the OS. If you require Windows 8.1 or Windows 10 as your minimum spec, then you don't even need to have it application-local.

    So to sum up: You can write and ship a Direct3D 11 application that works on Windows 7 and not make use of the legacy DirectX SDK or the legacy DXSETUP at all. The one exception case here is if you need to use XAudio 2.7, in which case you should trim down the headers and REDIST to the absolute minimum for this case. UPDATE: See the XAudio2Redist for a Windows 7 compatible version of the latest XAudio 2.9.

    See The Zombie DirectX SDK and Where is the DirectX SDK (2015 Edition)?

    As for where the various DirectX SDK samples and tools ended up, see DirectX SDK Samples Catalog and DirectX SDK Tools Catalog.