Merge pull request #10847 from penev92/fixWindowsDeps

Fix making dependencies on Windows
This commit is contained in:
Oliver Brakmann
2016-02-28 13:37:08 +01:00

View File

@@ -70,12 +70,22 @@ if (!(Test-Path "nunit.framework.dll"))
if (!(Test-Path "windows/SDL2.dll")) if (!(Test-Path "windows/SDL2.dll"))
{ {
echo "Fetching SDL2 from libsdl.org" echo "Fetching SDL2 from libsdl.org"
$target = Join-Path $pwd.ToString() "SDL2-2.0.4-win32-x86.zip"
(New-Object System.Net.WebClient).DownloadFile("https://www.libsdl.org/release/SDL2-2.0.4-win32-x86.zip", $target) # Download zip:
$destination = Join-Path $pwd.ToString() "windows" $zipFileName = "SDL2-2.0.4-win32-x86.zip"
Add-Type -assembly "system.io.compression.filesystem" $target = Join-Path $pwd.ToString() $zipFileName
[io.compression.zipfile]::ExtractToDirectory($target, $destination) (New-Object System.Net.WebClient).DownloadFile("https://www.libsdl.org/release/" + $zipFileName, $target)
# Extract zip:
$shell_app=new-object -com shell.application
$currentPath = (Get-Location).Path
$zipFile = $shell_app.namespace($currentPath + "\$zipFileName")
$destination = $shell_app.namespace($currentPath + "\windows")
$destination.Copyhere($zipFile.items())
# Remove junk files:
rm SDL2-2.0.4-win32-x86.zip rm SDL2-2.0.4-win32-x86.zip
rm -path "$currentPath\windows\README-SDL.txt"
} }
if (!(Test-Path "Mono.Nat.dll")) if (!(Test-Path "Mono.Nat.dll"))