-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.ps1
32 lines (29 loc) · 1.23 KB
/
build.ps1
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
$BaseFolder = ".\src\liblsl"
function Get-Dependency {
param (
$TargetFile,
$TargetHash,
$Uri
)
$destinationPath = [System.IO.Path]::GetFileNameWithoutExtension($TargetFile)
$destinationPath = Join-Path -Path "$BaseFolder" -ChildPath $destinationPath
if (Test-Path $destinationPath) { return }
$webclient = New-Object System.Net.WebClient
$webclient.DownloadFile($Uri, $TargetFile)
$fileHash = Get-FileHash $TargetFile -Algorithm MD5
Write-Output $fileHash
if ($TargetHash -eq $fileHash.Hash)
{
Expand-Archive -LiteralPath "$TargetFile" -DestinationPath "$destinationPath"
}
Remove-Item $TargetFile
}
Write-Host ("Downloading Dependencies")
Get-Dependency -TargetFile ".\win-x64.zip" `
-TargetHash "3B53DFE537C057DF1AF35AAE05D79F19" `
-Uri "https://github.com/sccn/liblsl/releases/download/v1.14.0/liblsl-1.14.0-Win_amd64.zip"
Get-Dependency -TargetFile ".\win-x86.zip" `
-TargetHash "359E62226CABEFF98D7646BCED3173DD" `
-Uri "https://github.com/sccn/liblsl/releases/download/v1.14.0/liblsl-1.14.0-Win_i386.zip"
Write-Host ("Building EmotionalCities.Lsl")
& dotnet build -c Release .\src\EmotionalCities.Lsl.sln