Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I created an installer for my XNA demo in the hopes that people could just download it and use it. It runs perfectly on my computer, however on others, it installs fine, but the demo doesn't run and has to close. The included dependencies are:

DotNetFX35 WindowsInstaller3_1 and XnaFxRedist31

The Demo also makes use of a number of text files which contain path lookup tables. Could it be that these are not being included? It seems unlikely that this is the issue though as it runs on my machine. It must be a missing dependency I think but I don't know what...

share|improve this question
2  
For a more specific answer, you might want to tell us more about what install mechanism you're using and whether your text files are included in your XNA content project. –  Elisée Oct 7 '11 at 10:58
add comment

2 Answers

up vote 1 down vote accepted

Install a clean machine to test deploy on, you're really shooting in the dark if you aren't. If you don't have another machine, install a virtual machine. Not all virtual machine solutions have drivers that support the graphics device XNA needs - but some do. And with a virtual machine you can install a trial version of Windows and make use of snapshots to revert to a clean slate every time you do new tests.

Provide useful error reports, catch crashes and display them to the end-user with an option to send and/or copy information to you. If it does automatic updates, you might want them to opt-in for automatic error and crash reports so you get a database of common problems complete with stack traces that you might want to fix. The only case where this won't work as far as I know is if .NET isn't installed on the target machine.

There's a multitude of possible issues from content pipelines not handling decimal point differences in other cultures beside the one they were compiled with to installations missing a vital file or directx and c++ dependencies. It's hard or impossible to answer your question until you've figured out why it's crashing and what the demo thinks is missing (if anything).

share|improve this answer
add comment

XNA games have the following dependencies:

  • .NET Framework 3.5 Redistributable
  • XNA Framework Redistributable (version depends on which version of XNA you use)

To allow people to install your games on their computers without downloading these dependencies themselves, you need to bundle or allow downloading & installing those dependencies right in your installer. There are two ways that I know of to do so, each with its own set of advantages & drawbacks:

  • ClickOnce is the default method included in XNA Game Studio. It packages a very straightforward and pretty nice installer that will take care of installing the dependencies and puts your app under the current user's application data folder (the path is not customisable). It also means your game will only be installed for this user.

    ClickOnce only bundles the files that are part of your XNA Content project, so external text files won't be installed. You could add them in your Content project with the Copy build action (no pipeline processing).

    You can specify an URL in the Publish settings to check for updates everytime your game is launched. You can then upload updated builds of your game at this URL. A very big limitation of this is the URL has to be publicly available. If your game isn't free, then there is no way of providing automatic updates without putting the game up for anyone to download. Worse, people will have to uninstall the game before installing a new version manually, there is no manual upgrade possible. And uninstalling the game will wipe all content stored through IsolatedStorage (basically, saved games are lost).

    This makes ClickOnce mostly unusable for anything but free games.

  • WiX XNA is a preconfigured project for building a WiX installer. You'll need to install SharpDevelop (the site says 3.2 but the latest 4.1 version as of October 2011 works just fine)

    It bundles the redistributables you need and check for them and install them if needed.

    The only drawback is that, in order to set up your game installer, you have to:

    • generate a set of GUIDs and put them in the files
    • create an XML tag soup for each directory and file you want to include. (upside of this is: you can decide exactly what to include, for instance files not included in Content project)
    • the project template is not setup for supporting upgrades, but you can do so yourself. I had to look it up on StackOverflow.

It's really a shame that there is no effortless way of creating a useful installer for XNA, when building games with it is such a breeze. For my own projects I use the WiX XNA template that I customized to allow for upgrades and it took me quite a while to figure it all out.

EDIT: My original answer didn't address the part of your question about your external data files, I updated it.

share|improve this answer
    
I have included the xna and .net frameworks and they install but the demo doesn't run, however it does run on MY computer so it can't be that the text files are missing. –  Asher Einhorn Oct 7 '11 at 12:15
1  
It could still be that the text files are missing, depending on how you access them in code. –  Josh Petrie Oct 7 '11 at 15:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.