Sign in to follow this  
Ninja2008

Deploying C++ DirectX 9 games from XP to 7

Recommended Posts

Ninja2008    112
Hi

I used VC++ 2008 and DX9 to create a simple 2D game on WinXP, then, I used the "new project->setup project" to create a depolyment project for the game, a setup file resulted of this process that installed successfully on my winXP machine...

When installing it on Win7 machine this message appears:
"The application has failed to start because its side-by-side configuration is incorrect, please see the application event log or use the command line sxstrace.exe tool for more details"

anyone can help me with this?

Thanks in advance..

Share this post


Link to post
Share on other sites
Yenian    150
One thing to try is installing the VS2008 C++ Redistributable on the Win7 machine; I remember fixing something similar that way a couple years ago.

If that works, you'll need to bundle that with your installer.

Share this post


Link to post
Share on other sites
Ninja2008    112
Thanks for the quick response : )

I saw that both 2005 and 2008 C++ Redist. versions are installed on the Win7 Machine so I think this is not the problem..

Thanks again...any other suggestion...I am googling but not being able to find anything to solve this..

Share this post


Link to post
Share on other sites
Ninja2008    112
The Win7 machine is equipped with fully functional DirectX 11 (run-time library only)..

do you mean I must distribute the dx9 redistributable version?? this one http://www.freewarefiles.com/DirectX9.0c-Redistributable_program_516.html
it's 95 MB, that would be big for a game of 5 megabytes...

Thanks buddy..

Share this post


Link to post
Share on other sites
Serapth    6671
Hidden
[quote name='Ninja2008' timestamp='1313779351' post='4851318']
The Win7 machine is equipped with fully functional DirectX 11 (run-time library only)..

do you mean I must distribute the dx9 redistributable version?? this one [url="http://www.freewarefiles.com/DirectX9.0c-Redistributable_program_516.html"]http://www.freewaref...rogram_516.html[/url]
it's 95 MB, that would be big for a game of 5 megabytes...

Thanks buddy..
[/quote]

The Dx9 redistributable is [url="http://www.microsoft.com/download/en/details.aspx?id=2730"]actually 33mb.[/url] Still excessive for a 5mb game, but them's the breaks.

Share this post


Link to post
mhagain    13430
Windows 7 by default does not include the most up to date version of DirectX 9. You'll either need to build against a downlevel SDK or instruct your users to upgrade their DirectX.

Share this post


Link to post
Share on other sites
ryan20fun    2635
[quote name='Ninja2008' timestamp='1313779351' post='4851318']
The Win7 machine is equipped with fully functional DirectX 11 (run-time library only)..

do you mean I must distribute the dx9 redistributable version?? this one [url="http://www.freewarefiles.com/DirectX9.0c-Redistributable_program_516.html"]http://www.freewaref...rogram_516.html[/url]
it's 95 MB, that would be big for a game of 5 megabytes...

Thanks buddy..
[/quote]

depends, sometimes it is not needed.
one way it to bundle the webinstaller version with your app.
the other way is to:
copy the d3d redist folder that is in the dx sdk folder.
( optionally, dont know how good this would be on account of WOW64 ) delete the the x64 dlls if your app is only x86
delete the dlls your app dont need, XNA redist does this, a 'lite' version of the dx redist is installed.

that should work.
:) :) :)

Share this post


Link to post
Share on other sites
Ninja2008    112
Hmmm that's so weird. Thanks.

I still think that setting up a 95 MB thing for a simple 2D game is just not appropriate, I miss the days of programming DOS games..

Thanks guys all of you for your efforts..

Share this post


Link to post
Share on other sites
ryan20fun    2635
[quote name='Ninja2008' timestamp='1313781550' post='4851341']
Hmmm that's so weird. Thanks.

I still think that setting up a 95 MB thing for a simple 2D game is just not appropriate, I miss the days of programming DOS games..

Thanks guys all of you for your efforts..
[/quote]

then get the web installer for DX, its about 300k.
they will obviusly require an internet connection though.

or you could look into OpenGL, as far as i know it does not require any redists, other then what should be installed with your graphics drivers.

Share this post


Link to post
Share on other sites
mhagain    13430
[quote name='ryan20fun' timestamp='1313782042' post='4851348']or you could look into OpenGL, as far as i know it does not require any redists, other then what should be installed with your graphics drivers.[/quote]

That's one problem right away - there are a frightening amount of business and low-end "multimedia" PCs and laptops out there with Intel graphics. If they've got OEM drivers (which they most likely do) they very probably don't have OpenGL capabilities at all (blame the OEM for that), and even if they do - well, they're Intel aren't they? Decent enough D3D (for non-demanding rendering) but prepare to enter a world of suck if you're using OpenGL.

Share this post


Link to post
Share on other sites
Ninja2008    112
Thanks guys, all of ya!!

No, I am continuing to use DX and I don't think I'll move to OpenGL for now.

ryan20fun, still, even with the web installer which is very good idea (and thanks for that), even with that, I see it a complex thing for a simple game. I am dealing with non-technical people whom wants just run the game and play.

But, you second idea is interesting
[quote]
copy the d3d redist folder that is in the dx sdk folder.
[/quote]

Can you give me some details on this if possible, where to copy it? should bundle it with the game installer or what? will the user run the "dxsetup.exe" which is in this folder?

Thanks a lot guys, really appreciate this..

Share this post


Link to post
Share on other sites
ryan20fun    2635
[quote name='Ninja2008' timestamp='1313810628' post='4851468']
Thanks guys, all of ya!!

No, I am continuing to use DX and I don't think I'll move to OpenGL for now.

ryan20fun, still, even with the web installer which is very good idea (and thanks for that), even with that, I see it a complex thing for a simple game. I am dealing with non-technical people whom wants just run the game and play.

But, you second idea is interesting
[quote]
copy the d3d redist folder that is in the dx sdk folder.
[/quote]

Can you give me some details on this if possible, where to copy it? should bundle it with the game installer or what? will the user run the "dxsetup.exe" which is in this folder?

Thanks a lot guys, really appreciate this..
[/quote]
what you can do is when your game is installed, ask the user if they want to "update" there directx version and that it requires an inter net connection, you would use the "-Silant"( if i remember correctly ) switch and it will install silently, its how most game installers work.

the dx redist folder( for me ) is located here
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Redist
now if you are using only d3dx9 and d3d9 etc, you should be able to delete the xaudio and xinput etc.
what you can do is delete everything except the d3d and d3dx dlls, then try installing it in a VM( so that if it works, you can undo the install easilly ( theres normally an option so that it will ask you if you want to save changes to it ) ) and if that works, try deleteing other ones you dont think you need, and soon you will have a nice small installer for dx

Share this post


Link to post
Share on other sites
ryan20fun    2635
[quote name='Ninja2008' timestamp='1313949558' post='4851962']
Thanks a lot ryan20fun for the great suggestions and help..

I'll try that and see to what it will get me to..

Thanks : )
[/quote]

your welcome :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this