XNA 3.0: How to create an installer!

Making an installer for an XNA 3.0 game was a difficult task. There are some third party software that promise you to create an installer for you, but what those do is just to zip your entire project with source code and everything. That's pretty bad. For that reason, I am going to show you how to create an installer for your XNA 3.0 game in few steps.

Well, let's get started!

First, open Visual Studio. Click on File ---> New ---> Project.

Next, an option window will appear. Click on other "Other Project Types", "Setup and Deployment" and then select "Setup Project"



A new project will be created. So far so good haha. Anyways, in the Explorer window, right click "Setup1" This is under the "Solution Project"


In the properties window, click on the button labeled "Prerequisites" I'm not going to show a screen shot for that because there is a list of prerequisites and you can select whichever you want.

After setting up the prerequisites, you just have to drag and drop the Release folder of your game to the folder in the setup project called "Application Folder". Instead of compiling in "Debug Mode", compile in "Release Mode". It will create a "Release" folder in the "bin/x86" folder.



Then, compile the project and that's it!! Yes, it works and it looks for all the prerequisites that you want to look for. If they are not installed, it will ask you to install them. Neat isn't? It is a shame that in the "XNA Official Forum" make a big deal about the installer. Don't use ClickOnce. It's bad because it creates two copies of the content folder and it is installed in a hidden folder, not in the Program Files. This is the best way you can make an installer for an XNA 3.0, 2.0 or 1.0 Game. Don't botter using WIX Installer or any other script for make an installer. Visual Studio has all what you need to make a powerful and robust installer.

Any questions? Drop a comment and I'll answer then :D

7 comments

Unknown said...

Does this install all the prerequisites for them or do they have to install them?

rjcalifornia said...

Yes. It will automatically install all the prerequisites.

Naveed Ahmad said...

I have free Visual c# installed. I cannot find that project template. What do i need to install to get the install/setup project template?

rjcalifornia said...

You have to install Visual Studio C# 2008 to be able to do that. Installed and follow this agan....

Florian Oeser said...

Hello,
thanks for this post :)

I'm correct that you need also the directx runtimes for xna?If yes, how can i add this to the prerequistes?

thanks

Unknown said...

Can I add to setup project hidden folders? And when install complete on desctop appeared hidden folder.

rjcalifornia said...

well, in theory, yes you can add hidden folders.....

doesn't all computers have directx now?

Powered by Blogger.