Skip to content

Commit

Permalink
fix: installation of android for Qt 6.8.0 (#801)
Browse files Browse the repository at this point in the history
* fix: installation of android for Qt 6.8.0

Signed-off-by: Hiroshi Miura <[email protected]>

* style: wrap a long line

Signed-off-by: Hiroshi Miura <[email protected]>

* style: apply black

Signed-off-by: Hiroshi Miura <[email protected]>

---------

Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr authored Jul 2, 2024
1 parent ac7da38 commit 649c55e
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions aqt/archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,14 @@ def _target_packages(self) -> ModuleToPackage:
return target_packages

def _get_archives(self):
self._get_archives_base(f"qt{self.version.major}_{self._version_str()}{self._arch_ext()}", self._target_packages())
if self.version >= Version("6.8.0"):
name = (
f"qt{self.version.major}_{self._version_str()}"
f"/qt{self.version.major}_{self._version_str()}{self._arch_ext()}"
)
else:
name = f"qt{self.version.major}_{self._version_str()}{self._arch_ext()}"
self._get_archives_base(name, self._target_packages())

def _append_depends_tool(self, arch, tool_name):
os_target_folder = posixpath.join(
Expand All @@ -378,29 +385,19 @@ def _append_depends_tool(self, arch, tool_name):

def _get_archives_base(self, name, target_packages):
os_name = self.os_name
if self.target == "android" and self.version >= Version("6.7.0"):
os_name = "all_os"
if self.os_name == "windows":
os_name += "_x86"
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 in ("windows_x86", "windows_arm64") and self.version >= Version("6.8.0"):
os_target_folder = posixpath.join(
"online/qtsdkrepository",
os_name,
self.target,
name,
name,
)
else:
os_target_folder = posixpath.join(
"online/qtsdkrepository",
os_name,
self.target,
# tools_ifw/
name,
)
os_target_folder = posixpath.join(
"online/qtsdkrepository",
os_name,
self.target,
# tools_ifw/
name,
)
update_xml_url = posixpath.join(os_target_folder, "Updates.xml")
update_xml_text = self._download_update_xml(update_xml_url)
self._parse_update_xml(os_target_folder, update_xml_text, target_packages)
Expand Down

0 comments on commit 649c55e

Please sign in to comment.