-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
21 lines (19 loc) · 920 Bytes
/
Copy pathsetup.ps1
File metadata and controls
21 lines (19 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# setup.ps1 - fetch the vendored single-header dependencies into vendor/.
# Downloads miniaudio.h (audio decode/playback) and stb_image.h (cover-art
# decoding) when missing. build.ps1 calls this automatically on the first
# build, so you rarely need to run it by hand.
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
$vendor = Join-Path $root 'vendor'
New-Item -ItemType Directory -Force -Path $vendor | Out-Null
$files = @{
'miniaudio.h' = 'https://raw.githubusercontent.com/mackron/miniaudio/master/miniaudio.h'
'stb_image.h' = 'https://raw.githubusercontent.com/nothings/stb/master/stb_image.h'
}
foreach ($name in $files.Keys) {
$dest = Join-Path $vendor $name
if (Test-Path $dest) { Write-Output "have $name"; continue }
Write-Output "fetching $name"
Invoke-WebRequest -UseBasicParsing -Uri $files[$name] -OutFile $dest
}
Write-Output 'deps ready'