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.

Dark GDK / Please say this is a daft and simple question.

Author
Message
Meh
16
Years of Service
User Offline
Joined: 21st Jun 2008
Location:
Posted: 21st Jun 2008 18:00
Redistributing applications made with Visual C++ and the DarkGDK, how?

Using DarkBasic Pro was pretty straightforward. "Make exe". Oh looky it works everywhere. (Assuming the target computer has directx installed anyway)

And now I've finally found where VC++ compiles its executeables to, they don't seem to function anywhere but my own computer. That is ze problem, how is zis fixed? Do I need to redistribute any specific run times? DLLS? if so, how? where do I get them? It's all very confusing. DBPro was much more helpful and forgiving to me :<

I noticed the Dark GDK.net runtimes in a sticky somewhere on this board but there's nothing regarding plain ol' DarkGDK. I also wonder if its even a DarkGDK issue or the fact I need some kind of vital C++ runtimes.

Madness.

Thanks in advance for any help.

-Meh
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 21st Jun 2008 19:00
Are you compiling as a release build? Also, DirectX has to be as new as the August 2007 update. Plus, you will usually need this installed on the target computer:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 21st Jun 2008 19:10
Always compile a release version of the EXE rather than a Debug version, for distribution purposes.

Should the recipiant not have the correct version of DX9c installed but they do have any version of DX9c installed then, if you also always add "d3dx9_35.dll" file in the same folder as your EXE, you will find things should work fine for them.

The latest version of DX9c redistributable should always have the earlier versions of the DLL in it, but on odd occasions Microsoft has left the odd DLL our by mistake.
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 21st Jun 2008 19:19
Quote: "Are you compiling as a release build? Also, DirectX has to be as new as the August 2007 update. Plus, you will usually need this installed on the target computer:"


In order use the program in .exe, no you don't need to have direct X installed. You need a .dll file, which is attached to the post. Put that and all the models in one folder with the .exe in it.

This should make it work fine, or at least it works with me.

Your signature has been erased by a mod - 120 high maximum please

Attachments

Login to view attachments
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 21st Jun 2008 19:22 Edited at: 21st Jun 2008 19:23
I suppose you could do it that way, but I wouldn't recommend relying on that method. Installing the latest DirectX update is a much more reliable method. It is not a large download/install and can be found here:

http://www.microsoft.com/downloads/details.aspx?familyid=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en

It shouldn't be more than about 10MB to download for most computers.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 21st Jun 2008 19:40
Also, compress that file if you do use it. It went from 3.55 MB to 1.56 MB zipped and to 1.19 MB in 7z format.
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 21st Jun 2008 20:01
Installing direct X is more reliable, but I like to use my method because I need to do this stuff on a school computer and you aren't aloud to install anything.

Your signature has been erased by a mod - 120 high maximum please
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 21st Jun 2008 20:10
Yeah. It my be fine for most games. I would just test it on a computer without the update first then distribute it.
Meh
16
Years of Service
User Offline
Joined: 21st Jun 2008
Location:
Posted: 21st Jun 2008 20:59
Alrighty I have got a Dark GDK app to work fine on another machine that has direct x installed the like.

Strangely, it's none GDK applications that seem to struggle and provide the error "This application failed to start because the application configuration is incorrect".

From what I understand installing the file linked above, the ehh, whatsit, Visual C++ 08 redistribution.. thing. Should fix that.

Ive yet to have opportunity to test this, hopefully that will work.
However, what I don't understand is why apps built from the Dark GDK templates work fine on other machines seemingly irrelevant of whether the Redistributable Package is installed or not while a simple command line program I wrote that does nothing but input three numbers and averages them... does not. Strange.

Whats this about a release build and debug build? Could you elaborate on how specifically one compiles as a release build?

Thanks again,

-Meh
Slayer 706
16
Years of Service
User Offline
Joined: 18th May 2008
Location:
Posted: 22nd Jun 2008 19:44
Quote: "However, what I don't understand is why apps built from the Dark GDK templates work fine on other machines seemingly irrelevant of whether the Redistributable Package is installed or not while a simple command line program I wrote that does nothing but input three numbers and averages them... does not. Strange."
Did your command line program use any .NET functions? If so, it will only run on computers that have the .NET Framework installed. DarkGDK (C++) doesn't use the .NET Framework, so it will work on a larger amount of computers.

If you didn't use .NET in your console app, it should work almost anywhere. In which case, you messed something up (either when you wrote it, compiled it, or distributed it).
Quote: "Whats this about a release build and debug build? Could you elaborate on how specifically one compiles as a release build?"
Depending on how your GUI is set up, you should see a little box that says Debug at the top of your C++ project in VC++. Click it, and a drop down menu will come down with three things: Debug, Release, and Configuration Manager. Click Release to compile it as a release build.
Meh
16
Years of Service
User Offline
Joined: 21st Jun 2008
Location:
Posted: 22nd Jun 2008 20:19
Quote: "Did your command line program use any .NET functions? If so, it will only run on computers that have the .NET Framework installed. DarkGDK (C++) doesn't use the .NET Framework, so it will work on a larger amount of computers."


I don't think so. You tell me however, the code is very simple:



I managed to get it working by distributing it with a subfolder containing 3 CRT DLL files. Because handing out the VC++ redist didn't seem to work. What still confuses me is that applications built from the GDK templates do not require these. So nothing is necessarily WRONG anymore, but I still seek better understanding..

Thanks for everyone's helpful comments

-Meh
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 22nd Jun 2008 20:50
Quote: "From what I understand installing the file linked above, the ehh, whatsit, Visual C++ 08 redistribution.. thing. Should fix that."


The redistributable is almost always necessary to run the application on other computers. Unfortunately, XP only comes with the VC++ 6.0 redist. built-in. Vista comes with VC++ 2005.

I'm honestly not sure why that program you posted doesn't work even with the redist. installed and it set to "Release" build. You did get the EXE out of the Release folder, right?
Meh
16
Years of Service
User Offline
Joined: 21st Jun 2008
Location:
Posted: 23rd Jun 2008 16:34
Yep.

And the program itself will work anywhere aslong as I have it sat next to a subfolder with with the CRT DLLs.

But as I'm sure you were also thinking, Why won't it work by itself? I mean look at it!

-Meh

Login to post a reply

Server time is: 2024-09-30 01:35:23
Your offset time is: 2024-09-30 01:35:23