Skip to content

Commit b8f7ed6

Browse files
committed
feat: support list Qt 6.8.0 windows_arm64
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
1 parent 6f2f085 commit b8f7ed6

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

aqt/archives.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,12 @@ def _get_archives_base(self, name, target_packages):
380380
os_name = self.os_name
381381
if self.os_name == "windows":
382382
os_name += "_x86"
383-
elif os_name != "linux_arm64" and os_name != "all_os":
383+
elif os_name != "linux_arm64" and os_name != "all_os" and os_name != "windows_arm64":
384384
os_name += "_x64"
385385
if self.target == "android" and self.version >= Version("6.7.0"):
386386
os_name = "all_os"
387387
#
388-
if os_name == "windows_x86" and self.version >= Version("6.8.0"):
388+
if os_name in ("windows_x86", "windows_arm64") and self.version >= Version("6.8.0"):
389389
os_target_folder = posixpath.join(
390390
"online/qtsdkrepository",
391391
os_name,

aqt/installer.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ def _set_arch(arch: Optional[str], os_name: str, target: str, qt_version_or_spec
280280
return "android"
281281
except ValueError:
282282
pass
283+
elif os_name == "windows_arm64" and target == "desktop":
284+
return "windows_msvc2022_arm64"
283285
raise CliInputError("Please supply a target architecture.", should_show_help=True)
284286

285287
def _check_mirror(self, mirror):
@@ -747,7 +749,7 @@ def _set_install_qt_parser(self, install_qt_parser, *, is_legacy: bool):
747749

748750
def _set_install_tool_parser(self, install_tool_parser, *, is_legacy: bool):
749751
install_tool_parser.set_defaults(func=self.run_install_tool, is_legacy=is_legacy)
750-
install_tool_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name")
752+
install_tool_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name")
751753
if not is_legacy:
752754
install_tool_parser.add_argument(
753755
"target",
@@ -804,7 +806,7 @@ def make_parser_sde(cmd: str, desc: str, is_legacy: bool, action, is_add_kde: bo
804806

805807
def make_parser_list_sde(cmd: str, desc: str, cmd_type: str):
806808
parser = subparsers.add_parser(cmd, description=desc)
807-
parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name")
809+
parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name")
808810
parser.add_argument(
809811
"qt_version_spec",
810812
metavar="(VERSION | SPECIFICATION)",
@@ -852,7 +854,7 @@ def _make_list_qt_parser(self, subparsers: argparse._SubParsersAction):
852854
"$ aqt list-qt mac desktop --archives 5.9.0 clang_64 # list archives in base Qt installation\n"
853855
"$ aqt list-qt mac desktop --archives 5.14.0 clang_64 debug_info # list archives in debug_info module\n",
854856
)
855-
list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name")
857+
list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name")
856858
list_parser.add_argument(
857859
"target",
858860
nargs="?",
@@ -936,7 +938,7 @@ def _make_list_tool_parser(self, subparsers: argparse._SubParsersAction):
936938
"$ aqt list-tool mac desktop tools_ifw --long # print tool variant names with metadata for QtIFW\n"
937939
"$ aqt list-tool mac desktop ifw --long # print tool variant names with metadata for QtIFW\n",
938940
)
939-
list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name")
941+
list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name")
940942
list_parser.add_argument(
941943
"target",
942944
nargs="?",
@@ -1023,7 +1025,7 @@ def _set_common_arguments(self, subparser, *, is_legacy: bool, is_target_depreca
10231025
"""
10241026
if is_legacy:
10251027
subparser.add_argument("qt_version", help='Qt version in the format of "5.X.Y"')
1026-
subparser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows"], help="host os name")
1028+
subparser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name")
10271029
if is_target_deprecated:
10281030
subparser.add_argument(
10291031
"target",

aqt/metadata.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ def get_semantic_version(qt_ver: str, is_preview: bool) -> Optional[Version]:
199199

200200
class ArchiveId:
201201
CATEGORIES = ("tools", "qt")
202-
HOSTS = ("windows", "mac", "linux", "linux_arm64", "all_os")
202+
HOSTS = ("windows", "windows_arm64", "mac", "linux", "linux_arm64", "all_os")
203203
TARGETS_FOR_HOST = {
204204
"windows": ["android", "desktop", "winrt"],
205+
"windows_arm64": ["desktop"],
205206
"mac": ["android", "desktop", "ios"],
206207
"linux": ["android", "desktop"],
207208
"linux_arm64": ["desktop"],
@@ -233,7 +234,7 @@ def is_tools(self) -> bool:
233234
def to_url(self) -> str:
234235
return "online/qtsdkrepository/{os}{arch}/{target}/".format(
235236
os=self.host,
236-
arch=("_x86" if self.host == "windows" else ("" if self.host in ("linux_arm64", "all_os") else "_x64")),
237+
arch=("_x86" if self.host == "windows" else ("" if self.host in ("linux_arm64", "all_os", "windows_arm64") else "_x64")),
237238
target=self.target,
238239
)
239240

@@ -957,7 +958,10 @@ def fetch_default_desktop_arch(self, version: Version, is_msvc: bool = False) ->
957958
elif self.archive_id.host == "mac":
958959
return "clang_64"
959960
elif self.archive_id.host == "windows" and is_msvc:
960-
return "win64_msvc2019_64"
961+
if version >= Version("6.8.0"):
962+
return "win64_msvc2022_64"
963+
else:
964+
return "win64_msvc2019_64"
961965
arches = [arch for arch in self.fetch_arches(version) if QtRepoProperty.MINGW_ARCH_PATTERN.match(arch)]
962966
selected_arch = QtRepoProperty.select_default_mingw(arches, is_dir=False)
963967
if not selected_arch:

0 commit comments

Comments
 (0)