Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed Jun 7, 2024
1 parent 3ddcf71 commit a7afdc0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion aqt/archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
10 changes: 5 additions & 5 deletions aqt/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions aqt/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a7afdc0

Please sign in to comment.