| ; Script generated by the Inno Setup Script Wizard. |
| ; (Then extensively modified by Caliban Darklock.) |
| ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! |
| |
| ; Enter the name of your game here |
| #define MyAppName "Railgun" |
| |
| ; Enter the name of your game and a version number here |
| #define MyAppVerName "Railgun (Alpha) 0.1" |
| |
| ; Enter the name of your company, or just your name |
| #define MyAppPublisher "Darklock Communications" |
| |
| ; Enter the URL of your website |
| #define MyAppURL "http://www.darklock.com/xna/" |
| |
| ; Enter the path to your game project - check Visual Studio properties for the path |
| #define MyAppLocation "C:\Documents and Settings\Caliban\My Documents\Visual Studio 2005\Projects\RailgunAlpha\RailgunAlpha" |
| |
| ; Enter the name of your game executable |
| #define MyAppExeName "RailgunAlpha.exe" |
| |
| ; Enter the location where XNA Game Studio is installed |
| #define MyGameStudioLocation "C:\Program Files\Microsoft XNA\XNA Game Studio\v2.0" |
| |
| ; Enter the name for the correct version of the XNA Framework MSI |
| #define XNARedist "xnafx20_redist.msi" |
| |
| ; Enter the location where you have placed the VC and .NET redistributables |
| #define MyRedistLocation "C:\Documents and Settings\Caliban\My Documents\xnareqs" |
| |
| ; search microsoft.com for "visual c++ sp1 redistributable" to get the VC redist |
| ; enter the name of the executable file here |
| #define VCRedist "vcredist_x86.exe" |
| |
| ; Download latest .NET from http://www.microsoft.com/net/ (download button on menu) |
| ; enter the name of the executable file here |
| #define DotNetSetup "DotNetFX35Setup.exe" |
| |
| ; Once you've filled in all the variables above and downloaded your redist packages, |
| ; everything under this point should JUST WORK for most XNA projects. |
| |
| [Setup] |
| AppName={#MyAppName} |
| AppVerName={#MyAppVerName} |
| AppPublisher={#MyAppPublisher} |
| AppPublisherURL={#MyAppURL} |
| AppSupportURL={#MyAppURL} |
| AppUpdatesURL={#MyAppURL} |
| DefaultDirName={pf}\{#MyAppName} |
| DefaultGroupName={#MyAppName} |
| OutputBaseFilename={#MyAppName}Setup |
| Compression=lzma |
| SolidCompression=yes |
| |
| [Languages] |
| Name: english; MessagesFile: compiler:Default.isl |
| |
| [Tasks] |
| Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked |
| |
| [Files] |
| ; DirectX and XNA Framework redistributables |
| Source: {#MyGameStudioLocation}\Redist\DX Redist\*; DestDir: {tmp} |
| Source: {#MyGameStudioLocation}\Redist\XNA FX Redist\{#XNARedist}; DestDir: {tmp} |
| |
| ; .NET and VC redistributables - VerifyDotNet2 MUST run BEFORE VerifyDotNet2sp1! |
| Source: {#MyRedistLocation}\{#DotNetSetup}; DestDir: {tmp}; AfterInstall: VerifyDotNet2 |
| Source: {#MyRedistLocation}\{#VCRedist}; DestDir: {tmp}; AfterInstall: VerifyDotNet2sp1 |
| |
| ; The game itself |
| Source: {#MyAppLocation}\bin\x86\Release\{#MyAppExeName}; DestDir: {app}; Flags: ignoreversion |
| Source: {#MyAppLocation}\bin\x86\Release\Content\*; DestDir: {app}\Content; Flags: ignoreversion recursesubdirs createallsubdirs |
| |
| [Icons] |
| Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName} |
| Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe} |
| Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon |
| |
| [Run] |
| Filename: {tmp}\{#DotNetSetup}; Flags: skipifdoesntexist; Parameters: "/q /noreboot" |
| Filename: {tmp}\{#VCRedist}; Flags: skipifdoesntexist; Parameters: "/q" |
| Filename: {tmp}\dxsetup.exe; Parameters: /silent |
| Filename: msiexec.exe; Parameters: "/quiet /i ""{tmp}\{#XNARedist}""" |
| Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent |
| |
| ; The code section doesn't like comments for some reason. |
| ; VerifyDotNet2 removes the .NET setup if you already have .NET 2.0 installed. |
| ; VerifyDotNet2sp1 removes the VC redist if you already have .NET 2.0 SP1, -or- |
| ; if you don't have .NET 2.0 at all (it will be installed along with .NET 3.5). |
|
; Using the skipifdoesntexist flag allows the setup to ignore the missing files.
|
| ; The editor here on the forums doesn't like the title of this section to be "Code". |
| ; I've changed it to "CODESECTION". Change it back to "Code" before you compile. |
| [CODESECTION] |
| var |
| hasDotNet2 :Boolean; |
| hasDotNet2sp1 :Boolean; |
| |
| procedure VerifyDotNet2(); |
| begin |
| hasDotNet2 := RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\policy\v2.0'); |
| if hasDotNet2 then |
| DeleteFile(ExpandConstant('{tmp}\{#DotNetSetup}')); |
| end; |
| |
| procedure VerifyDotNet2sp1(); |
| begin |
| hasDotNet2sp1 := RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\v2.0 SP1'); |
| if hasDotNet2sp1 or not hasDotNet2 then |
| DeleteFile(ExpandConstant('{tmp}\{#VCRedist}')); |
| end; |