aboutsummaryrefslogtreecommitdiff
path: root/scripts/fetchDependency.ps1
diff options
context:
space:
mode:
authormartin-s <webmaster@macside.net>2017-10-15 02:00:19 +0200
committermartin-s <webmaster@macside.net>2017-10-15 02:00:19 +0200
commit9c2fa042ee451f5ec1e5781c8daccd9fd6875de0 (patch)
tree250b18fea62d58e2138de12f78e25d0ed8c69678 /scripts/fetchDependency.ps1
parent630bcd84b8325217c440def11681e375f5ef4652 (diff)
parent561cfe89e653aef903488f7af7d4d17cfb11a26c (diff)
downloadvcpkg-9c2fa042ee451f5ec1e5781c8daccd9fd6875de0.tar.gz
vcpkg-9c2fa042ee451f5ec1e5781c8daccd9fd6875de0.zip
Merge branch 'master' of https://github.com/Microsoft/vcpkg into patch-vs2013
# Conflicts: # toolsrc/include/vcpkg/vcpkgpaths.h # toolsrc/src/vcpkg/vcpkgpaths.cpp
Diffstat (limited to 'scripts/fetchDependency.ps1')
-rw-r--r--scripts/fetchDependency.ps151
1 files changed, 37 insertions, 14 deletions
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index 2a23002a4..773ebeac4 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -36,17 +36,19 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
New-Item -ItemType directory -Path $downloadDir | Out-Null
}
+ $WC = New-Object System.Net.WebClient
+ $ProxyAuth = !$WC.Proxy.IsBypassed($url)
+ if ($ProxyAuth)
+ {
+ $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication"
+ $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
+ $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred)
+ $WC.Proxy.Credentials=$ProxyCred
+ }
+
if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS
{
try {
- $WC = New-Object System.Net.WebClient
- $ProxyAuth = !$WC.Proxy.IsBypassed($url)
- If($ProxyAuth){
- $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication"
- $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
- $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred)
- }
-
Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop
}
catch [System.Exception] {
@@ -60,7 +62,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
if (!(Test-Path $downloadPath))
{
Write-Verbose("Downloading $Dependency...")
- (New-Object System.Net.WebClient).DownloadFile($url, $downloadPath)
+ $WC.DownloadFile($url, $downloadPath)
}
}
@@ -116,11 +118,21 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
}
elseif($Dependency -eq "nuget")
{
- $requiredVersion = "4.1.0"
- $downloadVersion = "4.1.0"
- $url = "https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe"
- $downloadPath = "$downloadsDir\nuget-4.1.0\nuget.exe"
- $expectedDownloadedFileHash = "4c1de9b026e0c4ab087302ff75240885742c0faa62bd2554f913bbe1f6cb63a0"
+ $requiredVersion = "4.3.0"
+ $downloadVersion = "4.3.0"
+ $url = "https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe"
+ $downloadPath = "$downloadsDir\nuget-$downloadVersion\nuget.exe"
+ $expectedDownloadedFileHash = "386da77a8cf2b63d1260b7020feeedabfe3b65ab31d20e6a313a530865972f3a"
+ $executableFromDownload = $downloadPath
+ $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED
+ }
+ elseif($Dependency -eq "vswhere")
+ {
+ $requiredVersion = "2.2.3"
+ $downloadVersion = "2.2.3"
+ $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.3/vswhere.exe"
+ $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe"
+ $expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8"
$executableFromDownload = $downloadPath
$extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED
}
@@ -137,6 +149,17 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
$extractionType = $ExtractionType_ZIP
$extractionFolder = "$downloadsDir\MinGit-2.14.1-32-bit"
}
+ elseif($Dependency -eq "installerbase")
+ {
+ $requiredVersion = "3.1.81"
+ $downloadVersion = "3.1.81"
+ $url = "https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip"
+ $downloadPath = "$downloadsDir\QtInstallerFramework-win-x86.zip"
+ $expectedDownloadedFileHash = "f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8"
+ $executableFromDownload = "$downloadsDir\QtInstallerFramework-win-x86\bin\installerbase.exe"
+ $extractionType = $ExtractionType_ZIP
+ $extractionFolder = $downloadsDir
+ }
else
{
throw "Unknown program requested"