mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 02:41:58 -05:00
da2f2827d1
The only change done here was to move jansson.h one level up
33 lines
975 B
PowerShell
33 lines
975 B
PowerShell
#init
|
|
$libversion = 3
|
|
$path = Split-Path $Script:MyInvocation.MyCommand.Path
|
|
$zip = $path+'\orctlibs.zip'
|
|
$libs = $path+'\lib'
|
|
$libsVFile = $path+'\libversion'
|
|
$libsTest = Test-Path $libs
|
|
|
|
#libs version test
|
|
$libsVersionTest = Test-Path $libsVFile
|
|
$currentVersion = 0
|
|
$needsdownload = $true
|
|
if ($libsVersionTest) {
|
|
$currentVersion = [IO.File]::ReadAllText($libsVFile)
|
|
}
|
|
if ($currentVersion -ge $libversion) {
|
|
$needsdownload = $false
|
|
}
|
|
|
|
#download
|
|
if (!$libsTest -or $needsdownload) {
|
|
if ($libsTest) {
|
|
rm $libs -Recurse -Force
|
|
}
|
|
mkdir $libs
|
|
Invoke-WebRequest https://dl.dropboxusercontent.com/u/1323345/orctlibs_vs.zip -OutFile $path\orctlibs.zip
|
|
[System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
|
|
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $libs)
|
|
rm $path\orctlibs.zip -Force -ErrorAction SilentlyContinue
|
|
$libversion | Set-Content $libsVFile
|
|
} else {
|
|
echo 'All libs up to date'
|
|
}
|