Sign in to follow this  
Chett2001

Release to install files in DirectX?

Recommended Posts

This is proberbly a pretty newbie question but how exactly do you compile a C++ native DirectX applications into an installation package? do you need some additional software? Im used to having a nice publish option in the build menu not sure what to do without it :D.

Share this post


Link to post
Share on other sites
You can make a visual studio project that builds an installer. You will also need to distribute the directx runtime which can be found in your directx sdk path in a folder called "Redist".

Share this post


Link to post
Share on other sites
Quote:
Original post by Programmer101
You can make a visual studio project that builds an installer. You will also need to distribute the directx runtime which can be found in your directx sdk path in a folder called "Redist".



i can only find a directx redist.txt in my SDK directory, which says this:

Quote:

DirectX Software Development Kit Redistributable Code
-------------------------------------------------------------
Redistributable Code is identified as all of the files in the following
"Redist" directory on the DirectX SDK CD/Download:

redist/

The following files in the above directory must be included in any distribution of
the DirectX Runtime.

DSetup32.dll
DSetup.dll
DXSetup.exe
DXupdate.cab
dxdllreg_x86.cab


But back to your first point ("You can make a visual studio project that builds an installer.") How do i do that exactly? do i actually have to code the windows to install the DirectX stuff above then move the files in my application to the correct place, add it to start-> all programs? is there an easier way?

Share this post


Link to post
Share on other sites
I've not done this myself since the Version 6 days so thought I'd give it a shot.

edit: Oh, by the way, I'm now using Visual Studio .Net 2003 for my projects.

So here goes with what I just did that seemed to do the trick at a basic level.

1. With the initial project still open add a setup project to the solution.
2. With the setup project selected right click and select Add->Project Output.
3. From the list next shown I chose Primary Output from my chosen project.
4. It automatically works out what dependencies are needed for you.
5. Right click on the project again and choose build.
6. It will warn you to exclude one of the dlls so rightclick it and choose exclude and rebuild.
7. Your small setup project is now complete.

Bear in mind that this simple setup doesn't include any extra files you created for the project to use such as textures and objects. These, are what are added using the Add->File option.

By default everything is thrown into the Application folder. But if you rightclick on the Primary Output object in the Application folder section it will let you create a shortcut object which can be moved into the Start Menu section or Desktop section. Don't forget to rename the shortcuts as the setup project doesn't do this for you.

Don't forget to Uninstall before reinstalling during testing though.

Hope that helps somewhat. I'm sure there are more fancy things you can add to the setup project to make it more professional.

Share this post


Link to post
Share on other sites
Cool that worked but it didnt install the directX resources that was mentioned earlier, i dont have for some reason a redist folder anywhere on my hardrive of those fles listed in the readme. Do i have to generate them somehow? im using DirectX SDK 2007 (April), thanks for your help so far guys.

edit: i may have spoke to soon, im installing it on another PC and its downloading 2 sets of files.. Maybe thats the .NET stuff and the DirectX.. Will have to see its going very slowly. OK that PC was to slow and crappy, i installed it on my parents laptop and it worked great, thanks a lot !

[Edited by - Chett2001 on June 7, 2007 3:32:50 PM]

Share this post


Link to post
Share on other sites
As far as I remember from when I installed the April 2007 DirectX SDK, the redistributables are not installed by default. You must specifically tick a box when selecting the features to be installed.

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