Jump to content
  • Advertisement
Sign in to follow this  
brwarner

Distributing MDX apps

This topic is 4670 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

I am semi-new to MDX programming and have come to a point were I want to distribute a copy of the application. I used C# Express to make an install file and tried to install it on my computer and when it tries to run the application it says "Count not find Media file, ensure DirectX SDK is properlly installed" yet I can run it fine in debug in C# and I have the October 2005 release of DirectX SDK. CAn someone tell me what to do I am new at making setup files [Edited by - brwarner on December 3, 2005 2:37:54 PM]

Share this post


Link to post
Share on other sites
Advertisement
Hmm - try using the publish wizard ( if you didnt already ) and make sure you have the RUNTIME of the DirectX 9.0c not just the SDK

Share this post


Link to post
Share on other sites
I already had DirectX 9.0c Runtime and DirectX SDK October 2005 yet it still wont start. I had used the publish feature in C# the first time. I dont understand why it runs in C# when I debug but not on the computer.

Share this post


Link to post
Share on other sites
The problem is likely that you're using parts of the D3D utilities wrapper library, which looks for files in a folder called "Media" (for example for using with the UI). Do a search across your application AND the distributed framework for the name "Media", and then make sure that the parts you need out of the SDK folder can be found by your application (typically, copied into a Media folder in your applications' install folder).

To see exactly where the problem is coming from, attach the debugger to your process when your application is showing that dialog box, and then Break All, and see where the stack trace is coming from.

Share this post


Link to post
Share on other sites
Quote:
Original post by brwarner
How do I attach a debugger to my process?

Visual C# 2003: Debug->Processes shows a list of active processes. Select one and click "Attach".

Share this post


Link to post
Share on other sites
You could try finding that error message (or better yet, the catches for the MediaNotFoundException) in the sampleframework utility classes using 'find in files'. Once you have the locations, you can add some code to show a message box with the file and line number where the exception was caught or thrown.

It's no elegant solution, but it should work. Now that I read through the sample framework code, you might also want to remove the throw; statements from the catch blocks for the MediaNotFoundException... no reason to crash your app when some media isn't found... Come on Microsoft, that's sooo Win98 ;)

The best solution is probably to roll in some decent logging, which is nearly always a good idea. On codeproject.com you'll find various good solutions, though this one here really stands out... gotta try that too some time as a replacement for my ugly global text file :)

Share this post


Link to post
Share on other sites
Thanks for the help, I found the error. After tracing it with replacing MediaNotFoundExceptions with my own I found that the computer could not find the .fx file Sample Browser makes when u create an empty project. Since it didnt seem to do anything I removed it and the program worked. Thank you all.

Share this post


Link to post
Share on other sites
I have written a small article for Coding4Fun that describes how to create an application template that uses the Sample Framework as the base application. Included in the Article is a way to include media files into the final build, with this when you use the automatic publish inside the Express editions these will all be included.

Coding4Fun - Creating an Application Template

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!