Including DirectX Runtimes in an installer

Started by
6 comments, last by JDX_John 13 years, 1 month ago
Our application uses D3D 9.0c including HLSL shaders. We've been shipping dxwebsetup.exe with it, a 250Kb app which I though handled downloading the latest DX runtimes. But I notice as it runs it downloads a load of stuff like "SDK updates" and "Managed DX". Also on the download page it says:
[font="Tahoma, Arial, sans-serif"]
  • The DirectX end-user installation includes the D3DX, HLSL Compiler, XInput, XAudio, and Managed DirectX 1.1 components.
  • Note that the DirectX Runtime (Direct3D, DirectInput, DirectSound) is not part of this package as it is included as part of the Windows operating system, and therefore cannot be installed or uninstalled. Updating the DirectX Runtime is achieved by installing the latest Service Pack or obtaining a newer version of Windows.[/quote]
Now I'm feeling confused. I do not need people to have the very latest DX (since we only use 9.0c not 10 or 11) but this installer downloads quite a lot of stuff. I have a 30Mb DX 9.0c installer somewhere which I imagine corresponds to the 95Mb version today but I seem to recall you're not supposed to ship that? I've looked at this a few times in the past and always end up somewhat confused, for a start shouldn't XPSP2/3 and Vista/Windwos7 have DX9.0c installed by default anyway? Yet when I ran our app on a clean Vista machine (with all Windows updates) it was unable to initialize D3D. Is that because I have inadvertently got a newer DX on my build machine which is forcing other machines to need the same?


[/font]

www.simulatedmedicine.com - medical simulation software

Looking to find experienced Ogre & shader developers/artists. PM me or contact through website with a contact email address if interested.

Advertisement
I have started a topic regarding legal issues with distributing DirectX some time ago, so I will not repeat what I have found out, but will just give link to it:
http://www.gamedev.net/topic/585881-directx-setup-and-shareware-problem/page__p__585881#entry585881

Regarding why your applications are not being started correctly:
Please note, that DirectX 9.0c is a version of core DirectX libraries. It is always the same and is included in Windows XP SP2, as well as on newer systems by default. But apart from that there are additional extension libraries (like D3DX etc.) that can vary between DirectX from different dates. What you need is to find out which libraries are being used by your application (you can use Dependency Walker for such things). Next you can create your own small version of the installer by including few files required by it by default and next adding there only libraries of DirectX that your app is using. Generally you take DirectX redist from your DirectX SDK and remove from it all files that are not necessary. This way I was able to reduce size of DirectX installer in my app to around 3 MB (you can assume, that core DirectX 9.0c is already installed - that's what I did).

There is an article about preparing small version of DirectX setup somewhere on MSDN (describing different options of redistributing it), but I do not remember the URL at the moment.

Hope this will help you.
So, if my 3D engine has a dependency on D3DX then the chances are it will automatically be dependent on whichever D3DX version is on my build-PC, basically? I'm pretty sure this is the only extra thing used but you're not allowed to ship D3DX DLLs manually IIRC, you have to use an official MS installer - legally that is, I know people do it but for a commercial project I want to stay within the rules.

Good reminder on checking the dependencies. I have a 3rd-party tool, but is there one supplied with VS/Windows too?

www.simulatedmedicine.com - medical simulation software

Looking to find experienced Ogre & shader developers/artists. PM me or contact through website with a contact email address if interested.


So, if my 3D engine has a dependency on D3DX then the chances are it will automatically be dependent on whichever D3DX version is on my build-PC, basically? I'm pretty sure this is the only extra thing used but you're not allowed to ship D3DX DLLs manually IIRC, you have to use an official MS installer - legally that is, I know people do it but for a commercial project I want to stay within the rules.

Good reminder on checking the dependencies. I have a 3rd-party tool, but is there one supplied with VS/Windows too?


You're not allowed to distribute it manually, but you are allowed to lighten the DirectX SDK Redist installer. If you read the EULA / redist notes you will notice that you may redistribute it and list of files that has to be included - that means that rest can be removed. This approach is mentioned on MSDN:
http://msdn.microsoft.com/en-us/library/ee416805%28v=vs.85%29.aspx
Please read Small Installation Packages section.

Regarding files you will be dependednt, probably it will be the newest version of D3DX for specific D3D version and architecture (32 / 64 bit) - I'm sure that if your application is 32-bit you need no 64-bit version of D3DX, but not sure if your app is 64-bit.

As far as I know Dependency Walker is included in Visual Studio 2005 (but not added to Menu Start). I was not able to find it in VS 2010. Maybe it was renamed (previously the executable was called depends.exe)

So, if my 3D engine has a dependency on D3DX then the chances are it will automatically be dependent on whichever D3DX version is on my build-PC, basically?


Your app will be dependent on whichever version of D3DX that your application links to. If you have the June 2010 DX SDK installed and you link to the d3dx9.lib from that SDK, then your app will depend on the June 2010 version of D3DX.
Do they actually keep adding functionality to the D3DX9 libraries then?

I'd never realised you could customise the installer files in the way mentioned, thanks for the clarification.

www.simulatedmedicine.com - medical simulation software

Looking to find experienced Ogre & shader developers/artists. PM me or contact through website with a contact email address if interested.


Do they actually keep adding functionality to the D3DX9 libraries then?
I'd never realised you could customise the installer files in the way mentioned, thanks for the clarification.


I'm not sure about adding functionality, but there are always some bugs to be fixed etc. so I suppose that's the difference.
It's good to see that my reply was helpfull ;) You're welcome
A little update. We've found we can strip out a load of files from the redist folder, but I'd like to then package these into a single installer .EXE file like MS provide if you download their redist installer. Is there a simple way to do this? Is it a Windows generic thing, or something DX-specific?

www.simulatedmedicine.com - medical simulation software

Looking to find experienced Ogre & shader developers/artists. PM me or contact through website with a contact email address if interested.

This topic is closed to new replies.

Advertisement