From ee3b91f465994a684a98fc1b2f0d8de3990047fb Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 5 Aug 2019 20:02:58 -0700 Subject: [PATCH] Fix vcpkg pre-requisites build for devs using VS2019 --- hifi_vcpkg.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hifi_vcpkg.py b/hifi_vcpkg.py index 764a6270bd..821d9ae0b7 100644 --- a/hifi_vcpkg.py +++ b/hifi_vcpkg.py @@ -71,16 +71,19 @@ endif() if 'Windows' == system: self.exe = os.path.join(self.path, 'vcpkg.exe') + self.bootstrapCmd = 'bootstrap-vcpkg.bat' self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/vcpkg-win32.tar.gz?versionId=YZYkDejDRk7L_hrK_WVFthWvisAhbDzZ' self.vcpkgHash = '3e0ff829a74956491d57666109b3e6b5ce4ed0735c24093884317102387b2cb1b2cd1ff38af9ed9173501f6e32ffa05cc6fe6d470b77a71ca1ffc3e0aa46ab9e' self.hostTriplet = 'x64-windows' elif 'Darwin' == system: self.exe = os.path.join(self.path, 'vcpkg') + self.bootstrapCmd = 'bootstrap-vcpkg.sh' self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/vcpkg-osx.tar.gz?versionId=_fhqSxjfrtDJBvEsQ8L_ODcdUjlpX9cc' self.vcpkgHash = '519d666d02ef22b87c793f016ca412e70f92e1d55953c8f9bd4ee40f6d9f78c1df01a6ee293907718f3bbf24075cc35492fb216326dfc50712a95858e9cbcb4d' self.hostTriplet = 'x64-osx' else: self.exe = os.path.join(self.path, 'vcpkg') + self.bootstrapCmd = 'bootstrap-vcpkg.sh' self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/vcpkg-linux.tar.gz?versionId=97Nazh24etEVKWz33XwgLY0bvxEfZgMU' self.vcpkgHash = '6a1ce47ef6621e699a4627e8821ad32528c82fce62a6939d35b205da2d299aaa405b5f392df4a9e5343dd6a296516e341105fbb2dd8b48864781d129d7fba10d' self.hostTriplet = 'x64-linux' @@ -141,8 +144,14 @@ endif() downloadVcpkg = True if downloadVcpkg: - print("Fetching vcpkg from {} to {}".format(self.vcpkgUrl, self.path)) - hifi_utils.downloadAndExtract(self.vcpkgUrl, self.path, self.vcpkgHash) + if "HIFI_VCPKG_BOOTSTRAP" in os.environ: + print("Cloning vcpkg from github to {}".format(self.path)) + hifi_utils.executeSubprocess(['git', 'clone', 'git@github.com:microsoft/vcpkg.git', self.path]) + print("Bootstrapping vcpkg") + hifi_utils.executeSubprocess([self.bootstrapCmd], folder=self.path) + else: + print("Fetching vcpkg from {} to {}".format(self.vcpkgUrl, self.path)) + hifi_utils.downloadAndExtract(self.vcpkgUrl, self.path, self.vcpkgHash) print("Replacing port files") portsPath = os.path.join(self.path, 'ports')