XNA Publish [resolved]
by Scott Zarnke · in Torque X 2D · 06/29/2009 (6:52 pm) · 7 replies
Has anyone who is using XNA 3.0 (or 3.1) used the Publish function to create an installer? If so, I'm wondering if the output you get then includes the content from the data directory and in what form, i.e. as-is or in some compiled form, etc.
#2
Previously, I had thought I'd be able to distribute my games to other PCs by just sending the exe, dll, xml, and data folder, but now I know XNA games need, among other things, the XNA Framework. I think usually people who don't have XNA Game Studio installed will not have that framework, so it won't run.
'Publish' apparently uses something called ClickOnce to make a Setup.exe and the needed files to install. I even got the XNA Framework to install with it. Unfortunately, for XNA 2.0, the content does not get installed with the package created, and so the game still doesn't work. Supposedly this is fixed with 3.0+, but I don't have that, yet, because I don't have Torque 3, yet.
I'm hoping someone else has been using this with 3.0 and can confirm that it includes the content in the publish output.
FYI, you can either right-click the Game project and select "Publish" to go through the wizard, or go to the Publish tab on the project properties to have more control. But this is something different from "package as creators club game". It's more intended to produce an installer that could, for instance, be burned to a CD or run through a website.
06/30/2009 (5:50 pm)
Yeah, I've been going back and forth with Serkan on this thread regarding the Visual Studio Publish function. Hadn't even heard of it til I read his posting.Previously, I had thought I'd be able to distribute my games to other PCs by just sending the exe, dll, xml, and data folder, but now I know XNA games need, among other things, the XNA Framework. I think usually people who don't have XNA Game Studio installed will not have that framework, so it won't run.
'Publish' apparently uses something called ClickOnce to make a Setup.exe and the needed files to install. I even got the XNA Framework to install with it. Unfortunately, for XNA 2.0, the content does not get installed with the package created, and so the game still doesn't work. Supposedly this is fixed with 3.0+, but I don't have that, yet, because I don't have Torque 3, yet.
I'm hoping someone else has been using this with 3.0 and can confirm that it includes the content in the publish output.
FYI, you can either right-click the Game project and select "Publish" to go through the wizard, or go to the Publish tab on the project properties to have more control. But this is something different from "package as creators club game". It's more intended to produce an installer that could, for instance, be burned to a CD or run through a website.
#3
06/30/2009 (5:56 pm)
I've also been working today on learning WiX, which is nice in that the latest version automatically integrates with VS when it is installed. It's pretty easy to add a WiX project to make a msi file for the Windows Installer. Some XNA forums had posts about it not supporting bootstrapping, which might be needed for the XNA Framework. I don't know; I'm still going through the manual and tutorial, but it looks promising, too.
#5
i have dual boot pc, xp and vista,
on the vista side i updated my game tools,
xna 3.1, torqueX 2D 3.0 and VS2008 pro,
actually the publish function seems ok on that side,
first i copy my game folder to another location and
open with vs2008 it asks me to upgrade from vs2005,
i said ok, after successful conversion i build the
game, it was ok too,
then i click publish.
after it creates setup.exe i run it and the game started,
only one thing was missing, that is the aspect ratio
was not correct, i was created the game at 1360*768,
but it runs the default aspect ratio ( 1280*1024).
so from the old thread i remember you saying:
and i did it too, after that i published the game again and run setup,
without any problem, and run game without any problem and with correct aspect ratio.
its alive....... ;)
i didnt heart of WiX before, thanks for mentioning. i tried to make
my own installer too with inno setup, thanks to John Kanalakis. i modified the script which can be found here and it works great.
last thing to mention; the setup file that has been created with VS2008 is not working alone, it needs Application Files folder and Game.application file with setup.exe(they has been created too). but with inno setup you can make a setup file working alone.
have a nice day.
Serkan.
07/02/2009 (1:46 am)
Hey Scott,i have dual boot pc, xp and vista,
on the vista side i updated my game tools,
xna 3.1, torqueX 2D 3.0 and VS2008 pro,
actually the publish function seems ok on that side,
first i copy my game folder to another location and
open with vs2008 it asks me to upgrade from vs2005,
i said ok, after successful conversion i build the
game, it was ok too,
then i click publish.
after it creates setup.exe i run it and the game started,
only one thing was missing, that is the aspect ratio
was not correct, i was created the game at 1360*768,
but it runs the default aspect ratio ( 1280*1024).
so from the old thread i remember you saying:
Quote:When I installed my game, I found the install location and found the same files as your picture, but with the addition of "torqueSettings.xml". That is because I clicked the "Application Files..." button on the Publish tab and changed torqueSettings.xml to "include" instead of "data file", as per the instructions of my first linked page
and i did it too, after that i published the game again and run setup,
without any problem, and run game without any problem and with correct aspect ratio.
its alive....... ;)
i didnt heart of WiX before, thanks for mentioning. i tried to make
my own installer too with inno setup, thanks to John Kanalakis. i modified the script which can be found here and it works great.
last thing to mention; the setup file that has been created with VS2008 is not working alone, it needs Application Files folder and Game.application file with setup.exe(they has been created too). but with inno setup you can make a setup file working alone.
have a nice day.
Serkan.
#6
After I get a handle on it, I'll post again, probably a new thread, and maybe add to the TDN.
***EDIT***Looking briefly at Inno, I see it also is a pretty good installation creator. Just need to learn to details of that one. Either way, it and WiX both seem better than the Publish function since the end-user get a more informative and perhaps interactive installation.
07/02/2009 (9:01 am)
Cool, glad to hear it works with 3.0. I'm still working on WiX, only because it allows you to design a GUI, so the user can, for instance, choose which parts to install, or more importantly, choose the location to install the game. Publish doesn't appear to allow end-user customization like that of installation.After I get a handle on it, I'll post again, probably a new thread, and maybe add to the TDN.
***EDIT***Looking briefly at Inno, I see it also is a pretty good installation creator. Just need to learn to details of that one. Either way, it and WiX both seem better than the Publish function since the end-user get a more informative and perhaps interactive installation.
Torque Owner Brian
I'd have to look up some references, but last I checked the publish options are not supported by XNA games. If you're talking about the package as creators club game, I think they have to have XNA SDK installed, it does not work with the redistributable version. If this has changed let me know.
Brian
Edit: Whoops, they might support it now. Here's the MSDN article about it:
msdn.microsoft.com/en-us/library/bb464156.aspx