Nov 172013
 

So now you have made this sweet little XNA game of yours and you want to distribute it to friends.

Sure you could give them the content of your debug/release folder but thats a lot of files in there may be not needed for simple execution.
Not to mention you would like to distribute the XNA run time with it.
Why not package all this in a friendly setup that allow one to install/deinstall?

Well lets use Inno Setup.

Bere below a script that will allow you to make one standalone package handling it all.

Adapt paths and filenames to your project.


[Files]
Source: XNA_BASE1.exe; DestDir: {app}
Source: *.dll; DestDir: {app}
Source: xnb\*; DestDir: {app}\xnb
Source: xnafx40_redist.msi; DestDir: {tmp}; Flags: deleteafterinstall
[Icons]
Name: "{group}\Shooting"; Filename: "{app}\XNA_BASE1.exe"; WorkingDir: "{app}"
Name: "{group}\Uninstall Shooting"; Filename: "{uninstallexe}"
[Run]
Filename: {tmp}\xnafx40_redist.msi; Check: ask_; Flags: shellexec waituntilterminated; StatusMsg: "running"
[Code]
function Ask_():Boolean;
begin
result:=false;
if MsgBox('Install XNA Runtime? Needed to run the game', mbConfirmation, MB_YESNO) = IDYES then result:=true
end;
[Dirs]
Name: {app}\xnb
[Setup]
AppName=Shooting
AppVersion=1.0
DefaultDirName={pf}\shooting
DefaultGroupName=Shooting
UninstallDisplayIcon={app}\uninstall.exe
Compression=lzma2
SolidCompression=yes
SourceDir=C:\Projects\XNA_DEMO_12_shooting\XNA_BASE1\bin\Debug
OutputDir=C:\Projects\XNA_DEMO_12_shooting\installer

inno1

inno2

inno3

 Posted by at 18 h 34 min

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.