Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: fix error when instaling win64_llvm_mingw / Qt 6.7 and 6.8 #826

Merged
merged 8 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions aqt/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ def dir_for_version(ver: Version) -> str:
def get_arch_dir_name(host: str, arch: str, version: Version) -> str:
if arch.startswith("win64_mingw"):
return arch[6:] + "_64"
elif arch.startswith("win64_llvm"):
return "llvm-" + arch[11:] + "_64"
elif arch.startswith("win32_mingw"):
return arch[6:] + "_32"
elif arch.startswith("win"):
Expand Down
2 changes: 1 addition & 1 deletion aqt/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def make_qtenv2(self, base_dir, qt_version, arch_dir):
f.write("echo Remember to call vcvarsall.bat to complete environment setup!\n")

def set_license(self, base_dir: str, qt_version: str, arch_dir: str):
"""Update qtconfig.pri as OpenSource"""
"""Update qconfig.pri as OpenSource"""
with open(os.path.join(base_dir, qt_version, arch_dir, "mkspecs", "qconfig.pri"), "r+") as f:
lines = f.readlines()
f.seek(0)
Expand Down
37 changes: 35 additions & 2 deletions ci/generate_azure_pipelines_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,32 @@ def win_autodesk_qt_bindir(self) -> str:
return self.autodesk_qt_bindir(sep='\\')

def mingw_folder(self) -> str:
"""
Tool variant -> folder name
-------------------- -----------------
win64_llvm_mingw1706 -> llvm-mingw1706_64
win64_mingw1310 -> mingw1310_64
win64_mingw900 -> mingw1120_64 (tool contains mingw 11.2.0 instead of 9.0.0)
win64_mingw810 -> mingw810_64
"""
if not self.mingw_variant:
return ""
match = re.match(r"^win(\d+)_(mingw\d+)$", self.mingw_variant)
return f"{match[2]}_{match[1]}"
match = re.match(r"^win(?P<bits>\d+)_(?P<llvm>llvm_)?(?P<mingw>mingw\d+)$", self.mingw_variant)
if match.group('llvm'):
return f"llvm-{match.group('mingw')}_{match.group('bits')}"
if match.group('mingw') == "mingw900": # tool contains mingw 11.2.0, not 9.0.0
return f"mingw1120_{match.group('bits')}"
return f"{match.group('mingw')}_{match.group('bits')}"

def mingw_tool_name(self) -> str:
if self.mingw_variant == "win64_mingw900":
return "tools_mingw90"
elif self.mingw_variant == "win64_mingw1310":
return "tools_mingw1310"
elif self.mingw_variant == "win64_llvm_mingw1706":
return "tools_llvm_mingw1706"
else:
return "tools_mingw"


class PlatformBuildJobs:
Expand Down Expand Up @@ -136,6 +158,16 @@ def __init__(self, platform, build_jobs):
"desktop",
"win64_msvc2019_arm64",
"msvc2019_arm64",
is_autodesktop=True, # Should install win64_msvc2019_arm64 in parallel
),
BuildJob(
"install-qt",
"6.7.3",
"windows",
"desktop",
"win64_llvm_mingw",
"llvm-mingw_64",
mingw_variant="win64_llvm_mingw1706",
is_autodesktop=True, # Should install win64_msvc2019_arm64 in parallel
miurahr marked this conversation as resolved.
Show resolved Hide resolved
miurahr marked this conversation as resolved.
Show resolved Hide resolved
),
BuildJob(
Expand Down Expand Up @@ -291,6 +323,7 @@ def __init__(self, platform, build_jobs):
("SUBARCHIVES", build_job.subarchives if build_job.subarchives else ""),
("SPEC", build_job.spec if build_job.spec else ""),
("MINGW_VARIANT", build_job.mingw_variant),
("MINGW_TOOL_NAME", build_job.mingw_tool_name()),
("MINGW_FOLDER", build_job.mingw_folder()),
("IS_AUTODESKTOP", str(build_job.is_autodesktop)),
("HAS_WASM", build_job.list_options.get("HAS_WASM", "True")),
Expand Down
4 changes: 2 additions & 2 deletions ci/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ steps:
jom
} elseif ( $env:TOOLCHAIN -eq 'MINGW' ) {
python -m aqt install-tool $(if (($QT_BASE_MIRROR + "") -ne "") { "-b $QT_BASE_MIRROR" } else {""}) `
--outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop tools_mingw qt.tools.$(MINGW_VARIANT)
--outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop $(MINGW_TOOL_NAME) qt.tools.$(MINGW_VARIANT)
if ($?) {
Write-Host 'Successfully installed tools_mingw'
} else {
Expand Down Expand Up @@ -354,7 +354,7 @@ steps:
Write-Host "Path == " + $env:Path
if (![bool] (Get-Command -ErrorAction Ignore -Type Application mingw32-make)) {
python -m aqt install-tool $(if (($QT_BASE_MIRROR + "") -ne "") { "-b $QT_BASE_MIRROR" } else {""}) `
--outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop tools_mingw qt.tools.$(MINGW_VARIANT)
--outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop $(MINGW_TOOL_NAME) qt.tools.$(MINGW_VARIANT)
if ($?) {
Write-Host 'Successfully installed tools_mingw'
} else {
Expand Down
Loading