1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

Meta: Move the vcpkg installation/cache directories under Build

In addition to changing the build-type dependent build directories, we
can take this opportunity to move the vcpkg cache directory to the Build
folder itself. This probably isn't 100% needed, but it ensures that no
leftover artifacts are used from non-dynamic vcpkg builds, and it's also
generally nice to have all build artifacts under Build.
This commit is contained in:
Timothy Flynn 2024-09-30 12:55:24 -04:00 committed by Andrew Kaster
parent 4ffca2089e
commit 5681dbee64
Notes: github-actions[bot] 2024-11-06 17:40:12 +00:00
10 changed files with 16 additions and 23 deletions

View file

@ -4,7 +4,6 @@ import os
import subprocess
import pathlib
import sys
import shutil
def main() -> int:
@ -13,12 +12,12 @@ def main() -> int:
git_repo = "https://github.com/microsoft/vcpkg.git"
git_rev = "10b7a178346f3f0abef60cecd5130e295afd8da4" # 2024.10.21
tarball_dir = script_dir / "Tarballs"
tarball_dir.mkdir(parents=True, exist_ok=True)
vcpkg_checkout = tarball_dir / "vcpkg"
build_dir = script_dir.parent / "Build"
build_dir.mkdir(parents=True, exist_ok=True)
vcpkg_checkout = build_dir / "vcpkg"
if not vcpkg_checkout.is_dir():
subprocess.check_call(args=["git", "clone", git_repo], cwd=tarball_dir)
subprocess.check_call(args=["git", "clone", git_repo], cwd=build_dir)
else:
bootstrapped_vcpkg_version = subprocess.check_output(
["git", "-C", vcpkg_checkout, "rev-parse", "HEAD"]).strip().decode()
@ -34,12 +33,6 @@ def main() -> int:
bootstrap_script = "bootstrap-vcpkg.bat" if os.name == 'nt' else "bootstrap-vcpkg.sh"
subprocess.check_call(args=[vcpkg_checkout / bootstrap_script, "-disableMetrics"], cwd=vcpkg_checkout, shell=True)
install_dir = script_dir / "Local" / "vcpkg" / "bin"
install_dir.mkdir(parents=True, exist_ok=True)
vcpkg_name = "vcpkg.exe" if os.name == 'nt' else "vcpkg"
shutil.copy(vcpkg_checkout / vcpkg_name, install_dir / vcpkg_name)
return 0