XNA Windows Setup project not including my content project
Asked Answered
V

2

6

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.

Vagrom answered 22/11, 2011 at 8:46 Comment(0)
O
2

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.

Overlook answered 22/1, 2012 at 16:35 Comment(0)
E
3

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

Epstein answered 22/11, 2011 at 8:51 Comment(5)
Unfortunately these target XNA 3.0. I voted it up though due to the good research work you've done.Vagrom
I noticed that, but hoped that since the xnb files end up in the same place it could apply to xna 4.0.Epstein
Alright, I decided to give it a try anyway. There's another blocking issue. It stops installation if prerequisites have not been installed successfully. I want these to still install automatically. I have updated the question to reflect this need.Vagrom
Maybe you could ask the guys at Terraria nicely how they did did it. It's available on steam and was developed with XNA.Epstein
Good idea! I'll try that while I wait for more answers.Vagrom
O
2

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.

Overlook answered 22/1, 2012 at 16:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.