Skip to main content
GameDev.net gamedev.net
🔒 Locked

Dll Dependencies

Started by Crazyfool Apr 6, 2009 at 11:28 PM 6 replies 1k views
Original Post
Crazyfool
Crazyfool
Hi, I've had quite a few of 'weird' dependencies for directx, i.e., people play much more demanding games but need to download extra .dlls for mine. Most notably d3dx9_38.dll, d3dx9_39.dll, and d3dx9_41.dll. I do not know why, and the xxx41 has only shown up since I downloaded the latest SDK - not a single change to the code, and a user that could play the game before had to download the new dll after running the newly compiled version. I am trying to reduce the number of dependencies - is there anyway to identify what is triggering this? I don't want to force my players to download the absolute latest SDK if an older SDK will do the job.
Jouei
Jouei
Well that a good question i can at least make a recommendation.

In your code you should be specifying the Version of DirectX you are intending to use if it is not defined it will just use the newest version. Generaly as far as i am aware there is no need to have a new dll for older version so if the version is set to Direct X 8 it should never have a need to get a new dll to download.

needless to say that may solve your problem but i am not 100% sure it is just something you should try if you have not already.

Regards Jouei hope that helps.
Crazyfool
Crazyfool
Thanks for the suggestion, I'll look into changing the version (is it via the createdevice method?)

Edit: According to http://www.directxtutorial.com/Tutorial9/B-Direct3DBasics/dx9B1.aspx, even the Feb 06 version is 32 (the current one on my machine). I would assume the players HAVE to have later than feb 06 if they can play more demanding games.

Edit: using dependency walker seems to show that ONLY 41 is needed now, which I guess is ok, but I'd like to avoid requiring that as well.

[Edited by - Crazyfool on April 7, 2009 12:46:55 AM]
SiS-Shadowman
SiS-Shadowman
As you said, you didn't change your code, but you're using the newest SDK.
There will only be a newer SDK if MS changed something in DirectX (removed bugs, added functions whatever). This requires that a new version of DirectX is required when someone wants to play your game when you're linking against the newest SDK.
It makes no point to circumvent this (neither is it possible). Simply ship the redistributable that matches your SDK with your game and everything will be fine.
Evil Steve
Evil Steve
You should never get your users to install the SDK, the runtime will be sufficient.
Either get them to run the DirectX web installer, or bundle the DirectX redistributable package with your app (It's in the SDK). The best thing to do is to run it as part of your installer.

Those DLL files are the D3DX library DLLs, there's a new version with each version of DirectX. If you want to use D3DX at all, you should be including the DirectX redistributable package with your app, or at least telling the users to go online and get it.

EDIT: I should also point out that it's illegal (And a security concern) to include the DirectX DLLs as part of your download unless they're in the redistributable package.
Crazyfool
Crazyfool
Thanks steve, however I don't understand why they need to run the directx redistributable for my game, but can run many other games fine. Is it because I happen to use a later version than they have (is that really accurate?)? Also, if I include the Directx web installer found here, I should be fine?

Edit: Include it in my zip that I have my users download (no installer at this point)

Edit2: Thanks on the tidbit about it being a security issue
gharen2
gharen2
Quote:
Original post by Crazyfool
Thanks steve, however I don't understand why they need to run the directx redistributable for my game, but can run many other games fine. Is it because I happen to use a later version than they have (is that really accurate?)?


Every commercial directx game I've installed has informed me that it needs to install runtimes during the installation procedure.

Any game that ran for you without installing runtimes was probably using an already installed older version, yes.

Quote:
Original post by Crazyfool
Also, if I include the Directx web installer found here, I should be fine?


If you're using the march 2009 SDK, then yes, that web installer should work.
Crazyfool
Crazyfool
Thanks a bunch everyone, I think its time I look into finally making an installer (its moving from a few friends who are mostly developers to people new to games, new to computers, etc).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.