summaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/windows
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-20 14:56:52 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-21 11:59:42 +0000
commit9d7437859b2297481db267a5e307e0a3a362c9dd (patch)
treef7e41b93f101872e3f59f8c41a4360238d34cd52 /coin/provisioning/common/windows
parentb53dfe6a8645bf185f3eaa69f2c8b8559ac32143 (diff)
Update vcpkg installation
Use the latest snapshot, fetch the package set from the repo itself and set the VCPKG_ROOT environment variable as that's the vcpkg documented interface. The qt specific triplet defaults to static linkage, which allows removing the %PATH% handling and resembles the same setup as in Qt 5 where we linked the 3rd-party code statically into qt. Change-Id: I789d61b5c7258674c2dd80403efaeb891c8f75c7 Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'coin/provisioning/common/windows')
-rw-r--r--coin/provisioning/common/windows/install-vcpkg.ps141
1 files changed, 21 insertions, 20 deletions
diff --git a/coin/provisioning/common/windows/install-vcpkg.ps1 b/coin/provisioning/common/windows/install-vcpkg.ps1
index 673274da..36b0d826 100644
--- a/coin/provisioning/common/windows/install-vcpkg.ps1
+++ b/coin/provisioning/common/windows/install-vcpkg.ps1
@@ -34,32 +34,33 @@
# This script will install vcpkg
-$version = "08ad9d88ecabf9f8111bd4df0ca74723550503cd"
-$sha1 = "43b471aebc2f46bee00c86710d0311ef6fb7bb19"
-$officialUrl = "https://codeload.github.com/liangqi/vcpkg/zip/qt"
-$cachedUrl = "http://ci-files01-hki.ci.local/input/vcpkg/vcpkg-$version.zip"
-$zip = "C:\Utils\vcpkg-$version.zip"
-$installationFolder = "C:\Utils\vcpkg"
-
Write-Host "Installing vcpkg"
-Download "$officialUrl" "$cachedUrl" "$zip"
-Verify-Checksum "$zip" "$sha1"
-Extract-7Zip "$zip" C:\Utils
-cmd /c mklink /d "$installationFolder" "C:\Utils\vcpkg-qt"
-cd "C:\Utils\vcpkg-qt\"
-cmd /c "`"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Auxiliary\\Build\\vcvars64.bat`" && bootstrap-vcpkg.bat"
+
+$version = "qt-snapshot-2019-06-20"
+$officialUrl = "https://codeload.github.com/tronical/vcpkg/zip/$version"
+$zip = "C:\Utils\vcpkg.zip"
+
+Download "$officialUrl" "" "$zip"
+Extract-7Zip "$zip" c:\utils
+Remove-Item $zip
+
+$installationFolder = "c:\utils\vcpkg-$version"
+
+cd $installationFolder
+
+cmd /c bootstrap-vcpkg.bat
if(![System.IO.File]::Exists("$installationFolder\vcpkg.exe")){
Write-Host "Can't find $installationFolder\vcpkg.exe. Installation probably failed!"
exit 1
}
-Set-EnvironmentVariable VCPKG_DEFAULT_TRIPLET "x64-windows"
-Set-EnvironmentVariable VCPKG_CMAKE_TOOLCHAIN_FILE "$installationFolder\scripts\buildsystems\vcpkg.cmake"
-
-# pcre2-16.dll was used when generating qvulkanfunctions.h
-Add-Path "C:\Utils\vcpkg\installed\x64-windows\bin"
+Set-EnvironmentVariable VCPKG_DEFAULT_TRIPLET "qt-x64-windows-static"
+Set-EnvironmentVariable VCPKG_ROOT "$installationFolder"
-cmd /c "`"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Auxiliary\\Build\\vcvars64.bat`" && $installationFolder\vcpkg.exe --triplet x64-windows install zlib pcre2 double-conversion harfbuzz openssl"
+cmd /c $installationFolder\vcpkg.exe install --triplet qt-x64-windows-static @qt-packages-windows.txt
+cmd /c $installationFolder\vcpkg.exe install --triplet qt-x86-windows-static @qt-packages-windows.txt
-Remove-Item "$zip"
+Remove-Item -Recurse -Force packages
+Remove-Item -Recurse -Force buildtrees
+Remove-Item -Recurse -Force downloads