From: JP Bruyère Date: Sun, 24 Jul 2016 08:15:00 +0000 (+0200) Subject: update appveyor config X-Git-Tag: v0.4~35 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=6adf9683c5fa1e50568cab0d5f9f03f9a51cfe24;p=jp%2Fcrow.git update appveyor config --- diff --git a/appveyor.yml b/appveyor.yml index 5b91ebec..7a4789c7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,58 +10,56 @@ clone_depth: 1 before_build: -- cmd: nuget restore -- ps: | -function Get-KeyPropertyValue($key, $property) -{ - if($key.Property -contains $property) - { - Get-ItemProperty $key.PSPath -name $property | select -expand $property - } -} + - cmd: nuget restore + - ps: | + function Get-KeyPropertyValue($key, $property) + { + if($key.Property -contains $property) + { + Get-ItemProperty $key.PSPath -name $property | select -expand $property + } + } + function Get-VersionName($key) + { + $name = Get-KeyPropertyValue $key Version + $sp = Get-KeyPropertyValue $key SP + $install = Get-KeyPropertyValue $key Install + if($sp) + { + "$($_.PSChildName) $name SP $sp" + }else{ + "$($_.PSChildName) $name" + } + } + function Get-FrameworkVersion{ + dir "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\" |? {$_.PSChildName -like "v*"} |%{ + if( $_.Property -contains "Version") + { + Get-VersionName $_ + }else{ + $parent = $_ + Get-ChildItem $_.PSPath |%{ + $versionName = Get-VersionName $_ + "$($parent.PSChildName) $versionName" -function Get-VersionName($key) -{ - $name = Get-KeyPropertyValue $key Version - $sp = Get-KeyPropertyValue $key SP - $install = Get-KeyPropertyValue $key Install - if($sp) - { - "$($_.PSChildName) $name SP $sp" - }else{ - "$($_.PSChildName) $name" - } -} - -function Get-FrameworkVersion{ - dir "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\" |? {$_.PSChildName -like "v*"} |%{ - if( $_.Property -contains "Version") - { - Get-VersionName $_ - }else{ - $parent = $_ - Get-ChildItem $_.PSPath |%{ - $versionName = Get-VersionName $_ - "$($parent.PSChildName) $versionName" - - } - } -} -$v4Directory = "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -if(Test-Path $v4Directory) -{ - $v4 = Get-Item $v4Directory - $version = Get-KeyPropertyValue $v4 Release - switch($version){ - 378389 {".NET Framework 4.5"; break;} - 378675 {".NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2"; break;} - 378758 {".NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2"; break;} - 379893 {".NET Framework 4.5.2"; break;} - { 393295, 393297 -contains $_} {".NET Framework 4.6"; break;} - { 394254, 394271 -contains $_} {".NET Framework 4.6.1"; break;} - } -} -} + } + } + } + $v4Directory = "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" + if(Test-Path $v4Directory) + { + $v4 = Get-Item $v4Directory + $version = Get-KeyPropertyValue $v4 Release + switch($version){ + 378389 {".NET Framework 4.5"; break;} + 378675 {".NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2"; break;} + 378758 {".NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2"; break;} + 379893 {".NET Framework 4.5.2"; break;} + { 393295, 393297 -contains $_} {".NET Framework 4.6"; break;} + { 394254, 394271 -contains $_} {".NET Framework 4.6.1"; break;} + } + } + } build: project: Crow.sln