Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Downloading and installing DirectX 9.0c from Microsoft.com

Author
Message
Truthveyor
2
Years of Service
User Offline
Joined: 1st Mar 2016
Location: California
Posted: 2nd Mar 2016 10:38
I made a small game for fun, and when I tried to give it to other people to play, immediately I run into the problem of a computer giving the error message: "d3dx9_35.dll was not found". I learned that it was because DirectX 9.0c was not installed on that computer, which programs made with DBPro needs to function. I learned that just because a computer has DirectX 10 or higher installed, it doesn't mean DirectX 9.0c was installed.

If you don't know what DirectX is, here is Microsoft's description: "Microsoft DirectX is a group of technologies designed to make Windows-based computers an ideal platform for running and displaying applications rich in multimedia elements such as full-color graphics, video, 3D animation, and rich audio. DirectX 9.0 includes security and performance updates, along with many new features across all technologies, which can be accessed by applications using the DirectX 9.0 APIs."

So, if a DBPro application user's computer doesn't have DirectX 9.0c installed, that user needs to download and install DirectX 9.0c. And if that user tries to do that, here is the tricky part: There is an error on Microsoft's website!

When you search "DirectX 9.0c", it will give you a list of download options. The option "DirectX End-User Runtime Web Installer" dated 4/18/2011 used to work, but now it simply takes you to the Windows 10 download page. Where is the "DirectX End-User Runtime Web Installer"? I had to look all over the Microsoft site to finally find it here: https://www.microsoft.com/en-gb/download/details.aspx?id=35&e6b34bbe-475b-1abd-2c51-b5034bcdd6d2=True

Since I had already installed DirectX 9.0c on my computers, and you cannot uninstall DirectX, I haven't been able to test the "DirectX End-User Runtime Web Installer" (dated 4/18/2011) I found.

Is anyone having problem downloading and installing DirectX 9.0c, too? Does the link I found solve the problem for you? Please let me know.

I am planning on letting people download my game from my website, and show them the link to the "DirectX End-User Runtime Web Installer" page on my website for people who do not have DirectX 9.0c. Knowing that this download works or not will help me.

Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 2nd Mar 2016 22:37 Edited at: 2nd Mar 2016 22:38
I cannot test the web installer you provided since I already have it installed on my Windows 8.1 system. Games like Portal / CSGO requires DirectX 9.0, I think they supply the redistributable package and install it in the background via steam. I do not remember having to go through any hastle; but that was a year ago .

Wish I had another machine so I could help test this fully. At least I was able to download it and start the installer with no issue.
Truthveyor
2
Years of Service
User Offline
Joined: 1st Mar 2016
Location: California
Posted: 3rd Mar 2016 06:36
Thanks, Chris Tate. Many slightly older games use DirectX 9.0c, I believe, so for most gamers, they have already installed DirectX 9.0c on their computers, but for non-gamers, and also for, I think, new computers, it's something the users have to go through, and if you make a program with DBPro, and the user hasn't installed DirectX 9.0c yet.... ERROR MESSAGE! That is, unless you as the software developer takes care of installing DirectX 9.0c on the end-user's computer first.

This almost makes me want to learn something beside DBPro just to get away from having to make some end-users install DirectX 9.0c first. Does anyone know whether AppGameKit requires end-users to have DirectX 9.0c installed or not? I think AppGameKit uses Open GL 2.0, but I see DirectX 9.0c in AGK's system requirements (https://www.thegamecreators.com/product/app-game-kit toward the bottom of the page), so I'm wondering whether learning AppGameKit will help with this problem.

And is Open GL 2.0 something a user has to install on his computer? Or is it already installed from factory?

And does anyone know what's the most user-friendly and painless way to install DirectX 9.0c on an end-user's computer? (I'd think there should be a tutorial written on this for DBPro programmers as this becomes a practical problem as soon as the programmer tries to distribute the software created with DBPro.)
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 3rd Mar 2016 13:51 Edited at: 3rd Mar 2016 13:57
I cannot remember clearly, but I think you can run DBPRO without DX9 if you do not use any imaging or 3D commands. It has been a long while since I remember testing that.

If it this is true, then the solution to check if print GET DX VERSION$(), which will return 9.0c if it is installed, or something else if not. IF it is not installed, then prompt the user and auto launch the redistributable DX9 setup program from your setup app. Take this with a grain of salt because this not something I have tested. These people will have to install DX9 one way or another, whether because they are downloading your game or someone elses.

CG has passed its latest peak already, the difference in graphics from games made 10 years ago compared to 5 years ago are way more noticeable than the difference between of 2011 and 2016. All the rage is VR, MOBAs and social media now, so don't let the DX version issue dominate your focus.

What you will have to consider when selecting a programming tool, be it AppGameKit or DBP, is that they all have their pros and cons. You have to judge the pros and cons because in some cases it may be worth sticking with DBP, in other cases you should consider AGK. It depends on what you plan to do in the future; having to keep learning new tools all of the time can be time consuming.
James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 3rd Mar 2016 21:47
I am fairly sure what you need is the june2010 developers redistributable package which is available on the same site as you have linked, go to the download center, select the windows option in popular downloads and then the second option should be what you need to include with your installer - a little less than 100MB: https://www.microsoft.com/en-gb/download/details.aspx?id=8109

Like Chris I haven't tested it, but I would think that a simple enough test would be to go to your system32 folder in the windows installation path, find the d3dx9 dlls(names of files should read d3dx9_xx.dll where xx is replaced by a number ie d3dx9_24.dll through to d3dx9_43.dll). once located, move them out of the install path to a safe place then simply install the redistributable package, then check the system32 folder again to see if the files removed have been installed again. If they have then that is the right redistributable package to include with your end products installer.

I have kept a copy of the redistributable package I use every time I reinstall windows but I renamed the folder a long time ago for some odd reason so cannot confirm the name of the package as such, however the most recent files that installer has are in fact june 2010

It has long been considered not wise to use the web installers for DBP as they change from time to time, if you want a secure method the best way would be to include the redistributable at the installation stage of your product, after all its just less than 100MB and users for modern games often have huge installations by comparison. Hope this helps
wattywatts
9
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 3rd Mar 2016 23:10
I tested the link in the first post today, it is indeed the correct dx package.
Truthveyor
2
Years of Service
User Offline
Joined: 1st Mar 2016
Location: California
Posted: 4th Mar 2016 07:43
Thank you, Chris Tate, James H, and wattywatts! Your words are very useful!!

As a result of reading your words of wisdom, I think I know what to do now. There seems to be three solutions to get DirectX 9.0c installed on the end-users computers:

Solution 1: Provide the end-user the link https://www.microsoft.com/en-gb/download/details.aspx?id=35&e6b34bbe-475b-1abd-2c51-b5034bcdd6d2=True and let him install DirectX 9.0c himself.

Solution 2: Since the link in Solution 1 will download the "dxwebsetup.exe" from Microsoft (only 286 KB file size) for installing DirectX 9.0c, so I suppose I can include "dxwebsetup.exe" with my game, and then make an installer program that checks whether DirectX 9.0c is installed already on the end-user's computer (such as by checking FILE EXIST("c:\windows\system32\d3dx9_35.dll"). ), and if that file does not exist, make the installer program execute "dxwebsetup.exe" by using the DBPro EXECUTE EXECUTABLE command. (***Is there any problem or disadvantage to this solution, anyone?***)

By the way, I'm not sure about using GET DX VERSION$() to check for existence of DirectX9.0c, Chris, because if a person has DirectX 10 or 11, it doesn't mean he has DirectX 9.0c, which DBPro graphics needs. Anyone, please correct me if I'm wrong.

Solution 3: Include DirectX 9.0c Redistributable Package in my game download ( which is about 100 MB size). Then as in Solution 2 check if DirectX 9.0c is already installed or not, and, if not, run the DirectX 9.0c setup file. (The disadvantage is the larger download size, but the advantage is that the files of DirectX 9.0c are now included with the game, so even if Microsoft messes up its website, takes down the web installer, or the Internet went down during the install process, DirectX 9.0c files are still available to the end-user to be installed.)

I haven't tried any of the above solutions yet, so, anyone, please tell me:

a. Did I get my three solutions above right? Any comments?

b. Has anyone already solved installing DirectX 9.0c on end-users' computers? Can you give suggestions or even code snippets?





Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Mar 2016 11:04 Edited at: 4th Mar 2016 11:06
Quote: "By the way, I'm not sure about using GET DX VERSION$() to check for existence of DirectX9.0c, Chris, because if a person has DirectX 10 or 11, it doesn't mean he has DirectX 9.0c, which DBPro graphics needs. Anyone, please correct me if I'm wrong."


The function name is a bit misleading, but it did return '9.0c' even with DX10 and DX11 installed. I have DX9, 10 and 11 installed on my machine.

I haven't gotten far enough to provide evidence of the best solution, but rest assured a 100mb download is small by todays standards. A simple 100 mb high definition YouTube video watch on my mobile phone for instance will take a matter of seconds. I use one of the fastest domestic broadband services available in the UK, which is pretty bad compared to the broadband services available elsewhere, yet it can sometimes take about 5 seconds to download 100mb; as was mentioned by James, that's insignificant compared to the size of most modern games: EG: Age of Conan 35 GB. Star Wars Battlefront, 27 GB.

100 MB is less than 1% of such downloads, which are committed to by millions of gamers. Even for a small game, I am sure only a few of your potential players will complain, but sometimes complaining is just what people do for fun, especially gamers, they will look for the best thing they can think of complaining about. So don't worry about it, focus on making the game good, then any hassle will become more endurable
Truthveyor
2
Years of Service
User Offline
Joined: 1st Mar 2016
Location: California
Posted: 9th Mar 2016 12:29
I just found this page in Microsoft.com: https://msdn.microsoft.com/en-us/library/ee416805%28VS.85%29.aspx#installation_of_directx_by_the_game_s_installer

It answered some more of the questions I posted above.

I'm going to test out all I've learned so far, and see which techniques work best, then I'll post my findings in this thread. I hope my findings will help my fellow DBPro programmers effectively solve the problem of installing DirectX 9.0c on the end-users' computers. After all, sooner or later we'll be faced with this problem when we try to broadly release our DBPro games. I'm sure you don't want to hear complaints from some people like, "When I run your game on my computer, it gave me an error message."

The good thing is, once a DBPro programmer solves this problem, theoretically every DBPro programmer can solve this problem the same way, so this problem will stay solved.

If you've already solved it, or know where there is a tutorial on it, please let me know. Otherwise, I'll try to create a simple tutorial for it myself for people's use.
Truthveyor
2
Years of Service
User Offline
Joined: 1st Mar 2016
Location: California
Posted: 14th Mar 2016 05:33
Found more resource for this. I knew people must already have solved it (making a game installer that will install the game and also the latest DirectX 9.0c if necessary)!

Here is the DBPro Discussion Forum thread that discussed it: https://forum.thegamecreators.com/thread/177471

Apparently Lee Bamber (the creator of DBPro) had a video blog about it. I'm not sure if the Aug 17, 2010's "Lee's Video Blog #2" in YouTube is the video blog referred to in the thread, but that video blog did talk about making an installer for Direct 9.0c. It starts to talk about it in "Lee's Video Blog #2, Part 2" starting around 7:20:
https://www.youtube.com/watch?v=BiP6LTcT4Fk

It also seems the Lee Bamber had suggested using War Setup 3 and Wix to make the game installer:
Quote: "War Setup 3 and Wix as shown in Lee's blog works very well for this. You can make a very professional looking and fully working 'msi' using this."

In case you don't know what an 'msi' is. MSI files have a .msi extension. MSI is an installer package file format used by Windows. Its name comes from the program's original title, Microsoft Installer, which has since changed to Windows Installer. MSI files are used for installation, storage, and removal of programs.

I thought to gather all the resources and info on it into one thread, so people can find the latest information on this topic in one place.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 14th Mar 2016 15:01
Thanks for that. I have been shortlisting procedures for auto updating my game files, so this information is useful for me.
Truthveyor
2
Years of Service
User Offline
Joined: 1st Mar 2016
Location: California
Posted: 15th Mar 2016 09:32
Sure, Chris

By the way, I tried GET DX VERSION$() and it returned an empty string on my computer, so I can only conclude that this DBPro command does not always work. Also, per Microsoft's article "DirectX Installation for Game Developers" (https://msdn.microsoft.com/en-us/library/ee416805%28VS.85%29.aspx#installation_of_directx_by_the_game_s_installer)

Quote: "DirectX Version Number
The DirectX version number, such as 9.0c, refers only to the version of the core components, such as Direct3D, DirectInput, or DirectSound. This number does not cover the versions of the various optional components that are released in the DirectX SDK, such as D3DX, XACT, XINPUT, and so on.
Generally speaking, the DirectX version number is not meaningful except as a quick reference to the core run-time bits. This number should not be used to check if the correct DirectX runtime is already installed, because it doesn't take into account the optional DirectX components.
....
The DirectX redistributable can be configured to contain only those components that your application requires to minimize distribution and media sizes."


A system having DirectX vision number 9.0c does not mean it has the optional DirectX components to run DBPro games.

Specially, I know DBPro graphical commands needs d3dx9_35.dll, and d3dx9_31.dll has been mentioned in DBPro Forum threads to be needed, too. Lee Bamber in "Lee's Video Blog #2, Part 2" starting around 7:20 (https://www.youtube.com/watch?v=BiP6LTcT4Fk) mentioned files after d3dx10_35.dll being unnecessary.

So, to be on the safe side, I'm going to have my installer install the files in the DirectX Redistributable (https://www.microsoft.com/en-gb/download/details.aspx?id=8109) dated up to d3dx10_35.dll, just in case they are needed by DBPro applications.

Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 15th Mar 2016 13:27 Edited at: 15th Mar 2016 13:27
Interesting that it does not return anything with DX9 installed on your machine. That's not useful for anyone.

Thanks again. I will do likewise, and I will also let players know they need DX9 to run the game from the outset on the minimum requirements documents. There are probably other ways to perform a lookup of the DX9 version.

Something along the lines of this C# snippet would be a smooth way to predetermine the context of the installation:

C#


http://stackoverflow.com/a/6159892

One could put together a little C#/VB.NET installer to determine the context, thus finding out if the required directX DLLs are installed by adding a few more searches if necessary. It would be wierd to have a substantial amount of people with a partial DX9 installation as apposed to a complete install of the common redistributables, or no installation performed whatsoever.
Truthveyor
2
Years of Service
User Offline
Joined: 1st Mar 2016
Location: California
Posted: 27th Mar 2016 02:38
SUMMARY OF WHAT I HAVE LEARNED ABOUT DIRECTX, AND RUNNING YOUR GAME/APPLICATION ON THE END-USER'S COMPUTER:

1. Some computers will not run programs made with DBPro if the end-users have not installed certain optional components of DirectX 9.0c.

2. The best way to deal with that problem is by including the Microsoft DirectX Redistributable package with your application.

3. You can download the Microsoft DirectX Redistributable package here: https://www.microsoft.com/en-gb/download/details.aspx?id=8109 You will end up with a folder of .cab files about 100 MB in size.

4. Not all of the .cab files are needed by your application in the Microsoft DirectX Redistributable package. Most of the files in the package are dated. DBPro only needs files up to Aug 2007, so you can trim the size down in that package if you want to make your game smaller.
Quote: "Dark Basic Pro is an open source BASIC programming language for creating Windows applications and games. The solution requires Microsoft DirectX SDK (August 2007)."

But you will need at least these files in that package:
Quote: " dxsetup.exe
dsetup32.dll
dsetup.dll
dxupdate.cab"

More information on that can be found at https://msdn.microsoft.com/en-us/library/ee416805%28VS.85%29.aspx#installation_of_directx_by_the_game_s_installer

5. This seems to be the professional approach: You can have an installer install your game and DirectX. War Setup 3 and Wix (both are need) are recommended free tools. Personally, I downloaded War Setup 3, and in it's help documentation it showed me where to download Wix. However, I did not use War Setup 3 and Wix personally yet because I was just releasing a really small free game, so I didn't really care to learn to use War Setup 3 and Wix.

6. This is a workable approach: What I did was putting the trimmed-down DirectX Redistributable folder which I named "DirectX Redist" in the game folder, and also a small installer that I programmed in DBPro in the game folder. Here is a picture of my game folder:


This small installer (named "RunicGame1nstall.exe" has only the following code:

This code does not use any DBPro's graphical commands, so it ran without needing the DirectX update.

(The small installer is named "RunicGame1nstall.exe" because for some reason, when I named it "RunicGameInstall.exe", running it caused Windows to prompt a warning message. It's as if Windows are wary of .exe files which has the word "install" or "setup" in it, so I used "1nstall" instead of "Install" to avoid the warning message.)

The README.txt file told the end-user to run "RunicGame1nstall.exe" to install the DirectX components which may be needed to run the game.

7. Then I used Winzip to put my game folder into a zip file. (Zip files can be unzipped very easily, such as by Windows Explorer, so I'm not worried that the end-users being unable to unzip the game.) This is a simple way to provide a downloadable file.

8. Then I put the file into Dropbox, I obtained the link to it from Dropbox.com, and I put the link to it in my website. So far, about 15 to 30 people have downloaded my game, and I have heard of some good feedback, and I haven't had even one person having trouble running the game yet.
Ortu
DBPro Master
10
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 28th Mar 2016 20:10
Nice write up, thanks man!
Truthveyor
2
Years of Service
User Offline
Joined: 1st Mar 2016
Location: California
Posted: 8th Apr 2016 13:35
Quote: "Nice write up, thanks man!"


You're welcome! It took me a while to figure out the stuff I learned in this thread. I hope this thread helps other DBPro users to release more games/applications.

Login to post a reply

Server time is: 2018-09-23 18:39:33
Your offset time is: 2018-09-23 18:39:33