diff --git a/aqt/archives.py b/aqt/archives.py index 5bef0f92..8d1cc730 100644 --- a/aqt/archives.py +++ b/aqt/archives.py @@ -367,7 +367,7 @@ def _get_archives(self): def _append_depends_tool(self, arch, tool_name): os_target_folder = posixpath.join( "online/qtsdkrepository", - self.os_name + ("_x86" if self.os_name == "windows" else ("" if self.os_name == "linux_arm64" else "_x64")), + self.os_name + ("_x86" if self.os_name == "windows" else ("" if self.os_name == "linux_arm64" or self.target == "wasm" else "_x64")), self.target, tool_name, ) diff --git a/aqt/installer.py b/aqt/installer.py index d290af8f..c208090b 100644 --- a/aqt/installer.py +++ b/aqt/installer.py @@ -747,12 +747,12 @@ def _set_install_qt_parser(self, install_qt_parser, *, is_legacy: bool): 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", "all_os"], help="host os name") if not is_legacy: install_tool_parser.add_argument( "target", default=None, - choices=["desktop", "winrt", "android", "ios"], + choices=["wasm", "desktop", "winrt", "android", "ios"], help="Target SDK.", ) install_tool_parser.add_argument("tool_name", help="Name of tool such as tools_ifw, tools_mingw") @@ -1027,13 +1027,13 @@ def _set_common_arguments(self, subparser, *, is_legacy: bool, is_target_depreca if is_target_deprecated: subparser.add_argument( "target", - choices=["desktop", "winrt", "android", "ios"], + choices=["desktop", "winrt", "android", "ios", "wasm"], nargs="?", help="Ignored. This parameter is deprecated and marked for removal in a future release. " "It is present here for backwards compatibility.", ) else: - subparser.add_argument("target", choices=["desktop", "winrt", "android", "ios"], help="target sdk") + subparser.add_argument("target", choices=["desktop", "winrt", "android", "ios", "wasm"], help="target sdk") if not is_legacy: subparser.add_argument( "qt_version_spec", @@ -1102,7 +1102,7 @@ def _get_autodesktop_dir_and_arch( self.logger.info(f"Found installed {host}-desktop Qt at {installed_desktop_arch_dir}") return installed_desktop_arch_dir.name, None - default_desktop_arch = MetadataFactory(ArchiveId("qt", host, "desktop")).fetch_default_desktop_arch(version, is_msvc) + default_desktop_arch = MetadataFactory(ArchiveId("qt", host, "desktop")).fetch_default_desktop_arch(version, is_msvc, is_wasm) desktop_arch_dir = QtRepoProperty.get_arch_dir_name(host, default_desktop_arch, version) expected_desktop_arch_path = base_path / dir_for_version(version) / desktop_arch_dir diff --git a/aqt/metadata.py b/aqt/metadata.py index a06e94bc..8da196c3 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -940,9 +940,9 @@ def describe_filters(self) -> str: return str(self.archive_id) return "{} with spec {}".format(self.archive_id, self.spec) - def fetch_default_desktop_arch(self, version: Version, is_msvc: bool = False) -> str: + def fetch_default_desktop_arch(self, version: Version, is_msvc: bool = False, is_wasm: bool = False) -> str: assert self.archive_id.target == "desktop", "This function is meant to fetch desktop architectures" - if self.archive_id.host == "linux": + if self.archive_id.host == "linux" or is_wasm: if version >= Version("6.7.0"): return "linux_gcc_64" else: