Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XNA Windows Setup project not including my content project

I'm using XNA 4.0, and I've built a game which will be released for Steam, Impulse and others as well. Now, the thing is that they don't accept ClickOnce deployments since they can't (or can they?) be installed silently.

So I went back to the drawing board, building a Windows Setup project for my XNA project. This works just fine, but when I build the installer, all the content in my content project has been excluded for some reason.

Screenshot of my installation configuration

Now, my content project's content normally changes once in a while as I update the game. Therefore, I would hate to add all the content to the setup project manually.

Is it possible to solve this problem by somehow allowing a content project's output files to automatically be included in the installer?

Edit

It's important to keep in mind that I want prerequisites to be installed automatically. It is also a requirement that the installation can run in silent mode.

like image 695
Mathias Lykkegaard Lorenzen Avatar asked Nov 22 '11 08:11

Mathias Lykkegaard Lorenzen


2 Answers

These links may help you:

Creating an MSI-based installer for the XNA Game Studio 3.0 platformer starter kit

Creating an installer that includes a Visual Studio bootstrapper package and an MSI built with WiX 3.0

Found here:

App Hub: Windows Installer and XNA Content

like image 160
George Duckett Avatar answered Oct 20 '22 22:10

George Duckett


I was never able to get the setup project to discover the XNA content automatically. To get it to work I had to manually create folders in the setup project and add the content files. It was tedious to add all the files because you have to add them one folder at a time, although you can multi-select and add all the files in one folder with a single action. Once I had all the content files the install worked perfectly.

An alternative might be to add the content files to your main XNA project as Visual Studio "Content", not just XNA content. I found that difficult to do because Visual Studio tries to enforce a certain folder structure that doesn't necesarily match your content folder structure. However, if you can adjust your content to match this structure then you just have to mark the files as content by setting their "Build Action" to "Content". Once you've done that, go to your Setup project and choose "Add" -> "Project Output..." and select "Content Files" from your main XNA projct.

like image 38
kinect_dev Avatar answered Oct 20 '22 21:10

kinect_dev