forked from AliveTeam/alive_reversing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_sdl2_win32.ps1
More file actions
26 lines (22 loc) · 759 Bytes
/
get_sdl2_win32.ps1
File metadata and controls
26 lines (22 loc) · 759 Bytes
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
Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath)
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
}
If(!(test-path build\SDL2))
{
Write-Host Creating build\SDL2
New-Item -ItemType Directory -Force -Path build\SDL2
Write-Host Download ZIP
Invoke-WebRequest -Uri 'https://www.libsdl.org/release/SDL2-devel-2.0.8-VC.zip' -OutFile 'build\SDL2.zip'
Write-Host Extract zip
Unzip "build\SDL2.zip" "build\SDL2"
}
else
{
Write-Host Dir already exists, assuming we also have the extracted zip
}
$item = (Get-ChildItem "build\SDL2" -directory | Select FullName)
Write-Host Run cmake in the root as cmake .. -DSDL2_DIR=($item.FullName)
pause