Jump to content
  • Advertisement
Sign in to follow this  
synth_cat

installing d3dx_30.dll from within standalone app

This topic is 4237 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, I am working as fast as I can on finishing the commercial release of my game CellZenith (recent Image of the Day.) The game requires d3dx_30.dll to run. The exe will fail to start if clicked on, returning an error message about this dll. I do not plan for there to be any installation sequence for this game; I intend for it to be distributable as a standalone exe that can be started straight up. It is important to note that I am unable to have an installation program because I am using Visual C++ 2005 Express, which does not include the ability to make these. But how do I handle the problem that a lot of people don't have d3dx_30.dll? For my demo, I have just been telling testers where to go on msdn to download the necessary file. But would that be acceptable for a commercial game? I can't just put d3dx_30.dll in the folder with my game, of course, because that is prohibited by Microsoft. I wish that I could just have my game exe install the directX runtime on startup if it found it missing. The problem is, of course, that the exe won't start up at all if d3dx_30.dll isn't already installed in the first place . . . Can anyone help me out with an idea of how to handle this problem? Thanks very much for any suggestions! -synth_cat

Share this post


Link to post
Share on other sites
Advertisement
Make an installer. It's the best option. You can use 3rd party installation construction tools, you don't have to rely on the (missing) functionality of your IDE.

You are not allowed to redistribute the D3DX DLL's directly, according to the licensing terms. You can redistribute a small installer package that will install the correct version (the SDK installer itself should have installed this redistributable if you elected to do a complete install; otherwise you can find it on Microsoft's website, etc).

So you have two options: zip up your game with the D3DX installer and require users to run it, or make yourself a real installer that will automatically install the D3DX installer as well as set up your game correctly.

I think the latter option is better, to be honest; it's vastly more user-friendly.

Share this post


Link to post
Share on other sites
My games are meant to work the same way - with no install process and I don't want to bundle a DX installer with my app. I rely on the person having their computer's DX up to date, but if it isn't I need to tell them that and not just fail to run.

What I did was have all of my applications be a dll. I have an exe that doesn't require DX which checks to see if their system is up to date. If it is, it links the dll of the game they want, and launches the game, otherwise it can pop up help.

Share this post


Link to post
Share on other sites
I've heard about using third-party installers. Which one would you recommend?

I'm not exactly sure how these installers work - do they just pack everything into a handly setup.exe which I can distribute on its own (everything except the DX runtime, I mean)?

Share this post


Link to post
Share on other sites
1. Look into the LoadLibrary() and GetProcAddress() [Win32] functions, those allow your application to check for existence of the specific DLL and handle and present the the error to the user in a more user friendly way (i.e. "to run this game you need DirectX 9.abc with D3DX xyz" rather than "missing DLL, D3DXblah.blah" or "missing DLL export D3DX@YAPPQQ@1@XeCreateBlah".

2. Delay loading the D3DX DLL will allow you to do similar - the compiler inserts the LoadLibrary()/GetProcAddress() stuff for you, but you have less control over where the check happens.

3. If you don't find the DLL(s) you require with the above, prompt the user with the relevent URL to download those missing components.

Share this post


Link to post
Share on other sites
Wouldn't it be possible to just get into the third-party installer and tell it to run setup.exe (from within the DX redist folder) as part of its installation routine? This way I wouldn't have to write any DirectSetup code.

Just curious . . .

Share this post


Link to post
Share on other sites
Quote:
Original post by synth_cat
Wouldn't it be possible to just get into the third-party installer and tell it to run setup.exe (from within the DX redist folder) as part of its installation routine? This way I wouldn't have to write any DirectSetup code.
It all depends what "third-party installer" you're referring to.

Every installer I've used has had some form of customization built in - be it simple batch scripts through to a full DLL-based plugin architecture.

Best go check the documentation for whatever installer you want to use [wink]

Richard Thomson (DX MVP) had a good whitepaper on creating an installer for DX using freely available tools. I can't find the URL now, but maybe some google-fu will sort out...

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!