This repository has been archived by the owner on Dec 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
275 lines (172 loc) · 9.26 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
version: 0.54.1.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
configuration: Release
platform:
- DesktopGL
- XNA
clone_depth: 1
init:
- cmd: git config --global core.autocrlf true
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
GameJolt_API:
secure: pcggN1zw0wEHy8y0s6dDJtK4cJugjJQIE1jsUkK5BM+Y4MWD4PLIrOdj6clXXKR6oYgshYIhDLHIay6oMXsxzbQDtKlQzmJOWxwDy45ki5Y=
install:
- ps: >-
Function DownloadFile($url, $targetFile) {
$uri = New-Object "System.Uri" "$url"
$request = [System.Net.HttpWebRequest]::Create($uri)
$request.set_Timeout(15000)
$response = $request.GetResponse()
$totalLength = [System.Math]::Floor($response.get_ContentLength()/1024)
$responseStream = $response.GetResponseStream()
$targetStream = New-Object -TypeName System.IO.FileStream -ArgumentList $targetFile, Create
$buffer = new-object byte[] 10KB
$count = $responseStream.Read($buffer,0,$buffer.length)
$downloadedBytes = $count
while ($count -gt 0) {
$targetStream.Write($buffer, 0, $count)
$count = $responseStream.Read($buffer,0,$buffer.length)
$downloadedBytes = $downloadedBytes + $count
Write-Progress -activity "Downloading file '$($url.split('/') | Select -Last 1)'" -status "Downloaded ($([System.Math]::Floor($downloadedBytes/1024))K of $($totalLength)K): " -PercentComplete ((([System.Math]::Floor($downloadedBytes/1024)) / $totalLength) * 100)
}
Write-Progress -activity "Finished downloading file '$($url.split('/') | Select -Last 1)'"
$targetStream.Flush()
$targetStream.Close()
$responseStream.Dispose()
}
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;
}
Write-Host "`r`n";
Write-Host "Step 1/5: Downloading XNA Installer";
$currentLocation = (Get-Location).ToString();
$downloadLocation = ($currentLocation + "\XNAGS40_setup.exe");
if((Test-Path $downloadLocation) -eq $False) {
Write-Host " Downloading XNA 4.0 Refresh Installer to $downloadLocation. This may take several minutes.";
DownloadFile("http://download.microsoft.com/download/E/C/6/EC68782D-872A-4D58-A8D3-87881995CDD4/XNAGS40_setup.exe", $downloadLocation)
} else {
Write-Host " XNA 4.0 Refresh Installer already downloaded. Skipping download step.";
}
Write-Host "`r`n";
Write-Host "Step 2/5: Running Installers";
Write-Host " Extracting components from XNA 4.0 Refresh Installer.";
Start-Process -FilePath $downloadLocation -ArgumentList /extract:XNA, /quiet -Wait;
Write-Host " Running Redists.msi";
RunInstaller("`"$currentLocation\XNA\redists.msi`"");
$XnaInProgramFiles = "C:\Program Files (x86)\Microsoft XNA";
Write-Host " Running XLiveRedist.msi";
RunInstaller("`"$XnaInProgramFiles\XNA Game Studio\v4.0\Setup\XLiveRedist.msi`"")
Write-Host " Running xnafx40_redist.msi";
RunInstaller("`"$XnaInProgramFiles\XNA Game Studio\v4.0\Redist\XNA FX Redist\xnafx40_redist.msi`"")
Write-Host " Running xnaliveproxy.msi";
RunInstaller("`"$XnaInProgramFiles\XNA Game Studio\v4.0\Setup\xnaliveproxy.msi`"")
Write-Host " Running xnags_platform_tools.msi";
RunInstaller("`"$XnaInProgramFiles\XNA Game Studio\v4.0\Setup\xnags_platform_tools.msi`"")
Write-Host " Running xnags_shared.msi";
RunInstaller("`"$XnaInProgramFiles\XNA Game Studio\v4.0\Setup\xnags_shared.msi`"")
Write-Host " Extracting extension files from xnags_visualstudio.msi";
RunInstaller2 "`"$XnaInProgramFiles\XNA Game Studio\v4.0\Setup\xnags_visualstudio.msi`"" "TARGETDIR=C:\XNA-temp\ExtractedExtensions\"
Write-Host " Running arpentry.msi";
RunInstaller("`"$currentLocation\XNA\arpentry.msi`"")
Write-Host "`r`n";
Write-Host "Step 3/5: Downloading GameJolt API";
$downloadLocation = ($currentLocation + "\2.5DHero.zip");
if((Test-Path $downloadLocation) -eq $False) {
Write-Host " Downloading GameJolt API Installer to $downloadLocation. This may take several minutes.";
DownloadFile ${env:GameJolt_API} $downloadLocation
} else {
Write-Host " GameJolt API Installer already downloaded. Skipping download step.";
}
Write-Host "`r`n";
Write-Host "Step 4/5: Running Installers"
Write-Host " Extracting components from GameJolt API Installer.";
7z x -y $downloadLocation -o"$currentLocation"
Write-Host "`r`n";
Write-Host "Step 5/5: Restart";
Restart-Computer -Force
cache:
- XNAGS40_setup.exe
- 2.5DHero/2.5DHero/obj/XNA
- 2.5DHero/2.5DHero/obj/MonoGame/DesktopGL
- 2.5DHero/2.5DHero/bin/XNA
- 2.5DHero/2.5DHero/bin/MonoGame/DesktopGL
before_build:
- cmd: >-
git submodule update --init --recursive
nuget restore 2.5DHero.sln
build:
project: 2.5DHero.sln
parallel: true
verbosity: minimal
before_package:
- ps: >-
Function RemoveIfExists($path) {
if((Test-Path $path) -eq $True) { Remove-Item $path -recurse; }
}
Write-Host "`r`n";
Write-Host "Step 1/1: Removing extra build content.";
$currentLocation = (Get-Location).ToString();
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\References")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\2MGFX.exe")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\Assimp64.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\ffmpeg.exe")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\ffprobe.exe")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\FreeImage.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\freetype6.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\libmojoshader_64.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\nvtt.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\pvrtc.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\MonoGame\DesktopGL\Release\PVRTexLibWrapper.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\References")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\2MGFX.exe")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Assimp64.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\ffmpeg.exe")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\ffprobe.exe")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\FreeImage.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\freetype6.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\libmojoshader_64.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\nvtt.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\pvrtc.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\PVRTexLibWrapper.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.xml")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.Game.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.Game.xml")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.GamerServices.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.GamerServices.xml")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.Graphics.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.Graphics.xml")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.Input.Touch.dll")
RemoveIfExists($currentLocation + "\2.5DHero\2.5DHero\bin\XNA\Release\Microsoft.Xna.Framework.Input.Touch.xml")
test: off
artifacts:
- path: 2.5DHero/2.5DHero/bin/MonoGame/DesktopGL
name: MonoGamePokemon
- path: 2.5DHero/2.5DHero/bin/XNA
name: XNAPokemon
deploy:
- provider: GitHub
tag: $(appveyor_build_version)
release: Pokemon 3D Patch Indev $(appveyor_build_version)
auth_token:
secure: WqQZ3A0yfpGhgMsEO5+TVJLgJd7WoO9jLjnnHPJww5e0ikdES8hRY1rZCTbY00l/
artifact: MonoGamePokemon,XNAPokemon
draft: true
prerelease: false
force_update: true
on:
branch: master