diff --git a/aqt/archives.py b/aqt/archives.py index 14f7bbb..3b715b8 100644 --- a/aqt/archives.py +++ b/aqt/archives.py @@ -380,12 +380,12 @@ class QtArchives: os_name = self.os_name if self.os_name == "windows": os_name += "_x86" - elif os_name != "linux_arm64" and os_name != "all_os": + elif os_name != "linux_arm64" and os_name != "all_os" and os_name != "windows_arm64": os_name += "_x64" if self.target == "android" and self.version >= Version("6.7.0"): os_name = "all_os" # - if os_name == "windows_x86" and self.version >= Version("6.8.0"): + if os_name in ("windows_x86", "windows_arm64") and self.version >= Version("6.8.0"): os_target_folder = posixpath.join( "online/qtsdkrepository", os_name, diff --git a/aqt/installer.py b/aqt/installer.py index 46b8cce..5d8efdd 100644 --- a/aqt/installer.py +++ b/aqt/installer.py @@ -280,6 +280,8 @@ class Cli: return "android" except ValueError: pass + elif os_name == "windows_arm64" and target == "desktop": + return "windows_msvc2022_arm64" raise CliInputError("Please supply a target architecture.", should_show_help=True) def _check_mirror(self, mirror): @@ -747,7 +749,7 @@ class Cli: def _set_install_tool_parser(self, install_tool_parser, *, is_legacy: bool): install_tool_parser.set_defaults(func=self.run_install_tool, is_legacy=is_legacy) - install_tool_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name") + install_tool_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") if not is_legacy: install_tool_parser.add_argument( "target", @@ -804,7 +806,7 @@ class Cli: def make_parser_list_sde(cmd: str, desc: str, cmd_type: str): parser = subparsers.add_parser(cmd, description=desc) - parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name") + parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") parser.add_argument( "qt_version_spec", metavar="(VERSION | SPECIFICATION)", @@ -852,7 +854,7 @@ class Cli: "$ aqt list-qt mac desktop --archives 5.9.0 clang_64 # list archives in base Qt installation\n" "$ aqt list-qt mac desktop --archives 5.14.0 clang_64 debug_info # list archives in debug_info module\n", ) - list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name") + list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") list_parser.add_argument( "target", nargs="?", @@ -936,7 +938,7 @@ class Cli: "$ aqt list-tool mac desktop tools_ifw --long # print tool variant names with metadata for QtIFW\n" "$ aqt list-tool mac desktop ifw --long # print tool variant names with metadata for QtIFW\n", ) - list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name") + list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") list_parser.add_argument( "target", nargs="?", @@ -1023,7 +1025,7 @@ class Cli: """ if is_legacy: subparser.add_argument("qt_version", help='Qt version in the format of "5.X.Y"') - subparser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name") + subparser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") if is_target_deprecated: subparser.add_argument( "target", diff --git a/aqt/metadata.py b/aqt/metadata.py index f42603e..391c888 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -199,9 +199,10 @@ def get_semantic_version(qt_ver: str, is_preview: bool) -> Optional[Version]: class ArchiveId: CATEGORIES = ("tools", "qt") - HOSTS = ("windows", "mac", "linux", "linux_arm64", "all_os") + HOSTS = ("windows", "windows_arm64", "mac", "linux", "linux_arm64", "all_os") TARGETS_FOR_HOST = { "windows": ["android", "desktop", "winrt"], + "windows_arm64": ["desktop"], "mac": ["android", "desktop", "ios"], "linux": ["android", "desktop"], "linux_arm64": ["desktop"], @@ -233,7 +234,7 @@ class ArchiveId: def to_url(self) -> str: return "online/qtsdkrepository/{os}{arch}/{target}/".format( os=self.host, - arch=("_x86" if self.host == "windows" else ("" if self.host in ("linux_arm64", "all_os") else "_x64")), + arch=("_x86" if self.host == "windows" else ("" if self.host in ("linux_arm64", "all_os", "windows_arm64") else "_x64")), target=self.target, ) @@ -957,7 +958,10 @@ class MetadataFactory: elif self.archive_id.host == "mac": return "clang_64" elif self.archive_id.host == "windows" and is_msvc: - return "win64_msvc2019_64" + if version >= Version("6.8.0"): + return "win64_msvc2022_64" + else: + return "win64_msvc2019_64" arches = [arch for arch in self.fetch_arches(version) if QtRepoProperty.MINGW_ARCH_PATTERN.match(arch)] selected_arch = QtRepoProperty.select_default_mingw(arches, is_dir=False) if not selected_arch: