From 0ba3c166d76a4484fd4d378dc7367f2794577a20 Mon Sep 17 00:00:00 2001 From: Jens Frederich Date: Wed, 4 Oct 2017 08:19:57 +0200 Subject: Get proxy credentials behind web proxy --- scripts/bootstrap.ps1 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b7bc5afab..fa51de404 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -4,6 +4,10 @@ param( [string]$disableMetrics = "0" ) +$webclient=New-Object System.Net.WebClient +$creds=Get-Credential +$webclient.Proxy.Credentials=$creds + $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root -- cgit v1.2.3 From ab7a1abc93473dc1b7fcb341a4d104e3a77afd87 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 9 Oct 2017 16:38:21 -0700 Subject: [VS detection] Add -products * flag to vswhere. This includes Express and BuildTools SKUs --- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 8c67ef6d6..b2f186478 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -6,7 +6,7 @@ param( $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere" -$output = & $vswhereExe -prerelease -legacy -format xml +$output = & $vswhereExe -prerelease -legacy -products * -format xml [xml]$asXml = $output $results = New-Object System.Collections.ArrayList -- cgit v1.2.3 From b6512bace19d6c28cce71a0c2e8e28ab77d3ef56 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 9 Oct 2017 16:40:13 -0700 Subject: [vswhere.exe] Update to vesrion 2.2.3 (was 2.1.4) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 665376baf..bc58f4436 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -126,11 +126,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.1.4" - $downloadVersion = "2.1.4" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.1.4/vswhere.exe" + $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 = "548fb9dfeed59bc4ddcce739a5729e9c8dd5932cd60ff6f74727ee069e7da458" + $expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From 00d89dbd66a658174233920d6be2a85f282ef29f Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 24 Sep 2017 16:01:37 +0300 Subject: vcpkg: initial ARM64 support --- scripts/cmake/vcpkg_configure_cmake.cmake | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index fe8c97c52..bfb6a19fd 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -78,14 +78,20 @@ function(vcpkg_configure_cmake) set(GENERATOR "Visual Studio 15 2017") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + set(ARCH "ARM64") elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + set(ARCH "ARM64") endif() # If we use Ninja, make sure it's on PATH @@ -139,6 +145,12 @@ function(vcpkg_configure_cmake) "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" ) + if(DEFINED ARCH) + list(APPEND _csc_OPTIONS + "-A${ARCH}" + ) + endif() + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" -- cgit v1.2.3 From 5c66f301b9d7aa27a11059cee970e579f039c66c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 08:22:50 -0700 Subject: [vcpkg-scripts] Remove double expansions --- scripts/cmake/vcpkg_acquire_depot_tools.cmake | 2 +- scripts/cmake/vcpkg_download_distfile.cmake | 2 +- scripts/cmake/vcpkg_find_acquire_program.cmake | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake index 1cc375725..009ba40f1 100644 --- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake +++ b/scripts/cmake/vcpkg_acquire_depot_tools.cmake @@ -26,7 +26,7 @@ function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) set(download_success 1) endif() - if (NOT ${download_success}) + if (NOT download_success) message(FATAL_ERROR "\n" " Failed to download file.\n" diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 006570195..b8acfc823 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -78,7 +78,7 @@ function(vcpkg_download_distfile VAR) endif() endforeach(url) - if (NOT ${download_success}) + if (NOT download_success) message(FATAL_ERROR "\n" " Failed to download file.\n" diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 3c6dfae08..8d167e1c2 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -34,7 +34,8 @@ ## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) ## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) function(vcpkg_find_acquire_program VAR) - if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND") + set(EXPANDED_VAR ${${VAR}}) + if(EXPANDED_VAR) return() endif() @@ -153,7 +154,8 @@ function(vcpkg_find_acquire_program VAR) macro(do_find) if(NOT DEFINED REQUIRED_INTERPRETER) - find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) + find_program(FOUND_PROG ${PROGNAME} PATHS ${PATHS}) + set(${VAR} ${FOUND_PROG}) else() vcpkg_find_acquire_program(${REQUIRED_INTERPRETER}) find_file(SCRIPT ${SCRIPTNAME} PATHS ${PATHS}) @@ -162,7 +164,8 @@ function(vcpkg_find_acquire_program VAR) endmacro() do_find() - if(${VAR} MATCHES "-NOTFOUND") + set(FOUND_PROG ${${VAR}}) + if(FOUND_PROG MATCHES "-NOTFOUND") file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} EXPECTED_HASH SHA512=${HASH} SHOW_PROGRESS @@ -173,7 +176,7 @@ function(vcpkg_find_acquire_program VAR) else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) - if(${ARCHIVE_EXTENSION} STREQUAL ".msi") + if(ARCHIVE_EXTENSION STREQUAL ".msi") file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH) file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH) execute_process( -- cgit v1.2.3 From 9ddc98988fb8d7c886963fa7568395ecd5785eaa Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 10:52:00 -0700 Subject: [vcpkg-scripts] Detect and prompt for proxy in more cases --- scripts/bootstrap.ps1 | 4 ---- scripts/fetchDependency.ps1 | 20 +++++++++++--------- 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index fa51de404..b7bc5afab 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -4,10 +4,6 @@ param( [string]$disableMetrics = "0" ) -$webclient=New-Object System.Net.WebClient -$creds=Get-Credential -$webclient.Proxy.Credentials=$creds - $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b6144d581..2ee87bcff 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -82,17 +82,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] { @@ -106,7 +108,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) } } -- cgit v1.2.3 From 53ad1402514481c581a7b3bd1b0ffbcea9aaa902 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 11:54:47 -0700 Subject: [vcpkg-scripts] Hotpatch revert changes to vcpkg_find_acquire_program.cmake. --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 8d167e1c2..51e394bf1 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -154,8 +154,7 @@ function(vcpkg_find_acquire_program VAR) macro(do_find) if(NOT DEFINED REQUIRED_INTERPRETER) - find_program(FOUND_PROG ${PROGNAME} PATHS ${PATHS}) - set(${VAR} ${FOUND_PROG}) + find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) else() vcpkg_find_acquire_program(${REQUIRED_INTERPRETER}) find_file(SCRIPT ${SCRIPTNAME} PATHS ${PATHS}) @@ -164,8 +163,7 @@ function(vcpkg_find_acquire_program VAR) endmacro() do_find() - set(FOUND_PROG ${${VAR}}) - if(FOUND_PROG MATCHES "-NOTFOUND") + if("${${VAR}}" MATCHES "-NOTFOUND") file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} EXPECTED_HASH SHA512=${HASH} SHOW_PROGRESS @@ -194,5 +192,5 @@ function(vcpkg_find_acquire_program VAR) do_find() endif() - set(${VAR} ${${VAR}} PARENT_SCOPE) + set(${VAR} "${${VAR}}" PARENT_SCOPE) endfunction() -- cgit v1.2.3