mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 12:18:56 +00:00
Meta+Toolchain: Extract BuildVcpkg to an importable function
This lets ladybird.py import it properly, instead of invoking BuildVcpkg main().
This commit is contained in:
parent
8d4ac42205
commit
d00d49ba2f
Notes:
github-actions[bot]
2025-05-22 16:22:20 +00:00
Author: https://github.com/trflynn89
Commit: d00d49ba2f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4844
4 changed files with 27 additions and 17 deletions
|
@ -4,10 +4,9 @@ import json
|
|||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main() -> int:
|
||||
def build_vcpkg():
|
||||
script_dir = pathlib.Path(__file__).parent.resolve()
|
||||
|
||||
with open(script_dir.parent / "vcpkg.json", "r") as vcpkg_json_file:
|
||||
|
@ -28,7 +27,7 @@ def main() -> int:
|
|||
)
|
||||
|
||||
if bootstrapped_vcpkg_version == git_rev:
|
||||
return 0
|
||||
return
|
||||
|
||||
print(f"Building vcpkg@{git_rev}")
|
||||
|
||||
|
@ -38,8 +37,10 @@ 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)
|
||||
|
||||
return 0
|
||||
|
||||
def main():
|
||||
build_vcpkg()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue