-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
167 lines (99 loc) · 5.07 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
version: 1.0.{build}
skip_tags: true
os: Windows Server 2012 R2
configuration: Release
init:
- ps: Install-WindowsFeature Server-Media-Foundation
- ps: Restart-Computer -Force
- ps: Start-Sleep -s 10
install:
- ps: >-
Function RemoveIfExists($path) {
if((Test-Path $path) -eq $True) { Remove-Item $path -recurse; }
}
Function RunInstaller($path) {
Start-Process -FilePath msiexec.exe -ArgumentList /i, $path, /quiet -Wait;
}
Function RunInstaller2([String]$path, [String]$extraOption) {
Start-Process -FilePath msiexec.exe -ArgumentList /a, $path, /quiet, $extraOption -Wait;
}
Function InstallXna($appName, $pathToExe, $installLocation, $extensionCacheLocation, $version) {
$vsInstalled = test-path "$pathToExe";
if($vsInstalled -eq $True) {
write-host " $appName is installed on this machine. XNA will be added there.";
write-host " Copying files.";
copy-item $xnaLocation $installLocation -recurse -force;
write-host " Updating configuration for this version.";
$content = Get-Content ($installLocation + "\XNA Game Studio 4.0\extension.vsixmanifest");
$content = $content -replace "Version=`"10.0`">", "Version=`"$version`">`r`n <Edition>WDExpress</Edition>";
$content | Out-File ($installLocation + "\XNA Game Studio 4.0\extension.vsixmanifest") -encoding ASCII;
}
}
# Don't do anything if Visual Studio is already running.
if((Get-Process "WDExpress" -ErrorAction SilentlyContinue) -or (Get-Process "devenv" -ErrorAction SilentlyContinue)) {
write-host "Cannot install XNA while a version of Visual Studio is running. Exiting script...";
return;
}
$currentLocation = (Get-Location).ToString();
$wc = New-Object System.Net.WebClient
Write-Host "`r`n";
Write-Host "Step 1/4: Downloading XNA Installer";
$downloadLocation = ($currentLocation + "\XNAGS40_setup.exe");
if((Test-Path ".\XNAGS40_setup.exe") -eq $False) {
Write-Host " Downloading XNA 4.0 Refresh Installer to $downloadLocation. This may take several minutes.";
$wc.DownloadFile("http://download.microsoft.com/download/E/C/6/EC68782D-872A-4D58-A8D3-87881995CDD4/XNAGS40_setup.exe", $downloadLocation)
Write-Host " Download Complete.";
} else {
Write-Host " XNA 4.0 Refresh Installer already downloaded. Skipping download step.";
}
Write-Host "`r`n";
Write-Host "Step 2/4: Running Installers"
Write-Host " Extracting components from XNA 4.0 Refresh Installer.";
Start-Process -FilePath .\XNAGS40_setup.exe -ArgumentList /extract:XNA, /quiet -Wait;
Write-Host " Running Redists.msi";
RunInstaller("`"$currentLocation\XNA\redists.msi`"");
Write-Host " Running XLiveRedist.msi";
RunInstaller("`"C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Setup\XLiveRedist.msi`"")
Write-Host " Running xnafx40_redist.msi";
RunInstaller("`"C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Redist\XNA FX Redist\xnafx40_redist.msi`"")
Write-Host " Running xnaliveproxy.msi";
RunInstaller("`"C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnaliveproxy.msi`"")
Write-Host " Running xnags_platform_tools.msi";
RunInstaller("`"C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnags_platform_tools.msi`"")
Write-Host " Running xnags_shared.msi";
RunInstaller("`"C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnags_shared.msi`"")
Write-Host " Extracting extension files from xnags_visualstudio.msi";
RunInstaller2 "`"C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnags_visualstudio.msi`"" "TARGETDIR=C:\XNA-temp\ExtractedExtensions\"
Write-Host " Running arpentry.msi";
RunInstaller("`"$currentLocation\XNA\arpentry.msi`"")
$xnaLocation = ("C:\XNA-temp\ExtractedExtensions\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0");
Write-Host "`r`n";
Write-Host "Step 3/4: Adding Extensions to Installed Versions of Visual Studio";
$appName = "Visual Studio 2013 Pro";
$pathToExe = "${Env:VS120COMNTOOLS}..\IDE\devenv.exe";
$installLocation = "${Env:VS120COMNTOOLS}..\IDE\Extensions\Microsoft";
$extensionCacheLocation = "$home\AppData\Local\Microsoft\VisualStudio\12.0\Extensions";
$version = "12.0";
InstallXna $appName $pathToExe $installLocation $extensionCacheLocation $version;
Write-Host "Step 4/4: Cleanup";
Write-Host " Deleting extracted temporary files.";
RemoveIfExists("$currentLocation\XNA");
RemoveIfExists("C:\XNA-temp\");
RemoveIfExists("C:\xnags_visualstudio.msi");
Write-Host "`r`nInstallation Complete.";
before_build:
- nuget restore "breakout.sln"
build:
verbosity: minimal
after_build:
- 7z a breakout.zip .\breakout\breakout\bin\x86\Release\
artifacts:
- path: breakout.zip
name: Breakout
deploy:
- provider: GitHub
auth_token:
secure: Khomm4veUl7efga49YI5mu/jxXInUXB6UY65Q+Occm7koxraiPqmkUSD2PZVy+ZQ
on:
APPVEYOR_REPO_BRANCH: master
artifact: Breakout