From 44ee2e8a8c4e8c825e54df46cbf96d9e7555dc04 Mon Sep 17 00:00:00 2001 From: "J.D. Purcell" Date: Wed, 9 Oct 2024 00:10:49 -0400 Subject: [PATCH] fix: installation of 6.8 win64_msvc2022_arm64_cross_compiled --- aqt/installer.py | 4 +++- aqt/metadata.py | 8 ++++++-- aqt/updater.py | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/aqt/installer.py b/aqt/installer.py index cd22c518..85020b2b 100644 --- a/aqt/installer.py +++ b/aqt/installer.py @@ -1050,7 +1050,9 @@ def _get_autodesktop_dir_and_arch( """Returns expected_desktop_arch_dir, desktop_arch_to_install""" is_wasm = arch.startswith("wasm") is_msvc = "msvc" in arch - is_win_desktop_msvc_arm64 = host == "windows" and target == "desktop" and is_msvc and arch.endswith("arm64") + is_win_desktop_msvc_arm64 = ( + host == "windows" and target == "desktop" and is_msvc and arch.endswith(("arm64", "arm64_cross_compiled")) + ) if version < Version("6.0.0") or ( target not in ["ios", "android"] and not is_wasm and not is_win_desktop_msvc_arm64 ): diff --git a/aqt/metadata.py b/aqt/metadata.py index 2d488ccb..92bdd444 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -395,6 +395,8 @@ def get_arch_dir_name(host: str, arch: str, version: Version) -> str: m = re.match(r"win\d{2}_(?Pmsvc\d{4})_(?Pwinrt_x\d{2})", arch) if m: return f"{m.group('winrt')}_{m.group('msvc')}" + elif arch.endswith("_cross_compiled"): + return arch[6:-15] else: return arch[6:] elif host == "mac" and arch == "clang_64": @@ -412,8 +414,10 @@ def default_linux_desktop_arch_dir() -> Tuple[str, str]: @staticmethod def default_win_msvc_desktop_arch_dir(_version: Version) -> str: - """_version is unused, but we expect it to matter for future releases""" - return "msvc2019_64" + if _version >= Version("6.8.0"): + return "msvc2022_64" + else: + return "msvc2019_64" @staticmethod def default_mac_desktop_arch_dir(version: Version) -> str: diff --git a/aqt/updater.py b/aqt/updater.py index e891bd9c..6cb53cc3 100644 --- a/aqt/updater.py +++ b/aqt/updater.py @@ -299,6 +299,7 @@ def update(cls, target: TargetConfig, base_path: Path, installed_desktop_arch_di "android_x86", "android_armv7", "win64_msvc2019_arm64", + "win64_msvc2022_arm64_cross_compiled", ]: # desktop version updater.make_qtconf(base_dir, version_dir, arch_dir) updater.patch_qmake()