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.

Work in Progress / DirectX Version Checker wrapper

Author
Message
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 5th Oct 2007 03:56 Edited at: 7th Oct 2007 04:44
Let me start by stating that this is not written in DBPro but it is for people who use DBPro. If 'WIP' is not the correct place, please feel free to move it to 'Geek Culture' or something.

'DirectX Version Checker' is a wrapper application which you run instead of your game. It checks the version of DirectX and will then run your game for you.

It will check which monthly releases of DirectX 9.0c are installed on the machine and can run your program automatically if the required version is present. If it isn't present or you want to see which versions are installed, it will display the necessary info and prompt the user with a button to run the program if they still want to.

It uses several checks to see what is installed but full details are in the readme file. Here is a screenshot of some info it displays:


This is still an early BETA release so please do not distribute it. It is purely for testing purposes right now. Any suggestions for improvement will be welcome. I haven't tested it with Vista yet but would be interested to hear if there are any problems with it. Thanks.

EDIT: I am considering adding another setting to allow you to point the user off to a URL to fetch the required DirectX release if its not present. I think this would be a good feature.

EDIT2: Here is the ReadMe file missing from the ZIP. Right click the link to save it.

EDIT3: New Version Available. See post below.

Attachments

Login to view attachments
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 5th Oct 2007 04:34
I've been looking for something like this. Pretty cool! Yeah a helpful popup with a link to the directx download site would be nice.

I'm not a real programmer but I play one with DBPro!
Ian T
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 5th Oct 2007 07:28 Edited at: 5th Oct 2007 07:30
Looks good here. Well done.



The best application for this plugin would be for it to just check one DLL and continue silently if it passed the test, IMO. I think seeing a startup screen most users wouldn't even understand would get pretty tiresome after a well.

[edit] just saw that it already does that in your above post. Sorry, it's been a really long day-night-thing.

Attachments

Login to view attachments
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 5th Oct 2007 11:48 Edited at: 5th Oct 2007 22:00
Ahhhhhrg! Just realised I have forgotten to include the 'readme.txt' file in the ZIP! It was a long day for me too . I will upload it later as its on my machine at home.

Thanks for the comments tiresius, I will add that feature soon. And thanks Ian T for testing in Vista. The autorun feature so the window doesn't popup can be set in the INI file. I should have put more about the configuration really in my first post but didn't want to cause 'information overload'.
Anyway, here is an example of the INI file supplied with the program for those who cannot wait for the 'readme':

Load it up in your favourite text editor (e.g. Notepad).

The 'Version' setting should be the date of the release required by your game. As far as I know, these are all the possible revisions of DirectX 9.0c:
Feb 2005, Apr 2005, Jun 2005, Aug 2005, Dec 2005, Feb 2006, Apr 2006, Oct 2006, Dec 2006, Apr 2007, Jun 2007, Aug 2007.

The 'Autorun' value can be 0 or 1. If its a 0 then you will get the popup window with diagnostic info and the user has to click the button to run the game. If its set to 1 then if the user had the required DirectX 9.0c revision installed (and the versionnumber or productnumber in that version is not wrong) then it will run the game instantly without popping up with the DXcheck window. If its set to 1 but the required DirectX is not installed then they get the popup window with a warning message but can still choose to run the game if desired.

The 'Program' value is the filename of your game exe to run.

The 'Name' value is the name of your game which will appear on the button the user presses to run it (if the DXcheck window is displayed). I recommend keeping to a maximum of 8 characters due to space limitations, so if your game has a long title you should either shorten it or just call it 'Game' or something.

I hope thats enough to keep you going until I can upload the full readme file. Have fun.

EDIT: Here is the ReadMe file. Right click the link to save it.
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 7th Oct 2007 04:40 Edited at: 7th Oct 2007 04:43
*** New Version Attached ***
Added the URL bit so that the INI file can contain the URL of where to download the required revision of DirectX 9.0c. This can be on the Microsoft site or your own site.
This URL is popped up as a dialog only if the required DX is not installed:


I have also improved the look of the debug window.


Comments or ideas welcome as always.

Attachments

Login to view attachments
H4ck1d
18
Years of Service
User Offline
Joined: 27th Dec 2005
Location: Yes
Posted: 7th Oct 2007 06:06
Wow, I was just thinking about something exactly like this the other day! Thanks so much! I'll definitely be using this.

-H4ck1d

tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 11th Oct 2007 08:07 Edited at: 11th Oct 2007 08:07
Hi Zappo-

I'd like to make a custom request...

Maybe you could have the program just make that confirmation popup, and have a three options:

YES - Go to the dx download webpage
NO - Quit
TRY ANYWAY - Runs the program

And if they pick TRY ANYWAY, perhaps it can just write a quick debug log of the DX versions found, just in case there's problems anyway?

Something like that (more low key) would be a godsend and exactly what I need.

I'm not a real programmer but I play one with DBPro!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 17th Oct 2007 04:26
You can also check through "compress.dll" as well. From there you can control the options and what not.

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 17th Oct 2007 12:28 Edited at: 17th Oct 2007 12:55
H4ck1d: Thanks for your comment. Its good to know it will be used.

Tiresius: Currently the you can tell it to only display the window if the user doesn't have the correct revision installed, but I understand the need for something more low key. I will be returning to this project soon to do more work on it.

Aaron Miller: I don't really understand your comment. Did you post in the wrong thread?!
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 17th Oct 2007 18:49
And that runs before the program executes, and can be used to stop the program executing if the correct DirectX is not present?
Sounds like a very dodgy hack to me.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 18th Oct 2007 07:17
@Zappo
It isn't really a dodgy hack, it's simply a change in the DLL used, besides, how many people actually use the normal compress.dll anyways?

I was on my psp at the time of posting, if you have any questions involving it (Implementation, is it safe to do, etc), do ask and I'll help.

@WindowsKiller
the_winch.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 18th Oct 2007 12:40 Edited at: 18th Oct 2007 12:41
I think we will have to disagree there, but each to their own. Personally I would class the changing of internal resources (especially injecting custom DLLs) to be a 'hack'. Plus, of course, if you do unsupported modifications to your exe files then you are on your own and forfeit any chance of support if things start crashing. Its dangerously close to breaking 'reverse engineering' T&Cs too in my opinion.
Of course, if people want to alter their exe's in that way then thats up to them but I am sure this is an easier, safer and more friendly method.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 19th Oct 2007 03:48
@Zappo
How you classify hacking makes user plugins a hack, so I suppose WinGUI, the Newton wrapper, MultiSync/Tempest, etc, all hacks?

As for the compress.dll thing, it won't cause any damage, unless you consider the exchange of a useless DLL for a useful one damage. It won't damage any other code. DBP itself causes damage with it's loose pointers, and mathematical commands stored in DLLs! <Course, the math commands in DLLs is really only speed... And by math, I mean adding, subtracting, etc> I could rant about how DBP works for a long time, but that is not why I am posting, I'm simply trying to tell you it is very safe, and should not cause any harm! The only reason it would cause any harm is if someone was too stupid to actually put together a working compress.dll mate.



Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 19th Oct 2007 11:55 Edited at: 19th Oct 2007 11:56
Quote: "How you classify hacking makes user plugins a hack, so I suppose WinGUI, the Newton wrapper, MultiSync/Tempest, etc, all hacks?"

Not at all. Including plugin add-ons in the exe when compiling is one thing, changing a DLL provided by the programming language after it has been compiled is very different. The 'compress.dll' would be classed as a core DLL.
This is all academic anyway as I haven't actually seen anyone write a replacement 'compress.dll' which checks your revision of DirectX 9.0c. If you have a link to one please feel free to supply it.
There is another benefit of using my method in that its easy to update it. Dropping a small replacement file into your folder is much easier than having them use a resource editor and replace embedded DLLs. Especially if you provide updates for your games/applications to end users.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 26th Oct 2007 05:41
Actually, you would just place compress.dll into a folder and recompile, which is quite a good benefit considering that they won't have to redistribute a program.

However you wish to go about this (Though you've clearly closed your mind on the idea of compress.dll), this is still a pretty cool idea.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 27th Oct 2007 19:35
Thanks Aaron. Really my point was that end users who download or buy your game won't be recompiling it! If Microsoft decide to change the versioning method of DX9 or you want it do detect newer versions of DirectX, all your end user needs to do is download this small file and drop it into the games folder. Updated and done without the need to download your huge game exe again. I just think this method is much easier and like I say, I have yet to see anyone actually come up with a DX version checker in a compress.dll file anyway.
I also suspect that using the compress.dll method may leave the DLL loaded in memory the whole time your game is running. My program actually tidies up and exits when it runs your game releasing any memory used. That's got to be a good thing.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Oct 2007 00:32
About the memory, DBP should just load the compress.dll to uncompress the memory whilst extracting it's own DBP dlls, and hence is loaded first. After everything is extracted, it should get removed from memory.

I see your point on the big file though.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 28th Oct 2007 01:05 Edited at: 28th Oct 2007 01:06
I thought compress.dll only decompresses the programs included media, not the DBP dlls? If that is the case then I doubt it can be easily replaced anyway
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Oct 2007 01:10
DBPro Exe Information, Including compress.dll


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 28th Oct 2007 01:29
So, according to that, the compress.dll is needed to decompress the necessary DBP dll's unless they have been previously uncompressed.

I can see its uses but not in this case, especially as this 'wrapper' method is easy enough for anyone to implement without messing with the original exe file. The wrapper will also work with DarkBasic, DarkGDK, in fact any program at all!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Oct 2007 01:29
No, I was showing that to show that it compresses and uncompresses.

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 28th Oct 2007 01:36 Edited at: 28th Oct 2007 01:36
Yes, I know. To replace it properly the new DLL would also need to compress and decompress, or at the very least link to already uncompressed versions of the DLLs. All this means it would be overly complicated.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Oct 2007 03:26
Or just not do any compression at all, and just return the HGLOBAL mem.

Either way, lookin' forward to hearing more on this.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums

Login to post a reply

Server time is: 2024-09-29 22:38:54
Your offset time is: 2024-09-29 22:38:54