From f6be80c7d28bbc620ec52e36a60c2b233ceae9b4 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 4 May 2026 13:27:03 -0500 Subject: [PATCH 1/2] Download Mesa from Qt's CDN --- compile_all.py | 24 ++++++++++++++++++++++++ config.json | 5 +++++ create_libpack.py | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/compile_all.py b/compile_all.py index 21752d5..3b77647 100644 --- a/compile_all.py +++ b/compile_all.py @@ -445,6 +445,30 @@ def _install_python_requirements(self, requirements): print(e.output.decode("utf-8", errors="replace")) exit(1) + def build_opengl32sw(self, _: None): + """Copy Mesa software OpenGL DLL into the LibPack on x64. On ARM64 the DLL is + unavailable from Qt's CDN. Does not actually build anything, just copies it.""" + target = os.path.join(self.install_dir, "bin", "opengl32sw.dll") + if self.skip_existing and os.path.exists(target): + print(" opengl32sw.dll already in the LibPack, not re-copying") + return + if platform.machine() == "ARM64": + print( + " NOTE: opengl32sw.dll is not available for Windows on ARM64 - Skipping" + ) + return + matches = list(pathlib.Path(os.getcwd()).rglob("opengl32sw.dll")) + if not matches: + print( + f"ERROR: opengl32sw.dll not found under {os.getcwd()}. " + "The download or 7z extraction probably failed; check the URL " + "in config.json and retry." + ) + exit(1) + os.makedirs(os.path.dirname(target), exist_ok=True) + shutil.copyfile(str(matches[0]), target) + print(f" Copied {matches[0]} to {target}") + def build_qt(self, options: dict): """Build Qt from source. Always builds qtbase, qtsvg, qtdeclarative, and qttools against the LibPack's own zlib and libpng.""" diff --git a/config.json b/config.json index 3709934..bfe8774 100644 --- a/config.json +++ b/config.json @@ -90,6 +90,11 @@ "git-ref": "v6.11.0", "fallback-build-dir": "G:\\temp" }, + { + "name": "opengl32sw", + "url-x64": "https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt6_6110/qt6_6110_msvc2022_64/qt.qt6.6110.win64_msvc2022_64/6.11.0-0-202603180535opengl32sw-64-mesa_11_2_2-signed_sha256.7z", + "note": "Mesa-based software OpenGL fallback shipped by The Qt Company alongside their precompiled Qt binaries. Required at runtime on systems whose GPU or driver only exposes OpenGL 1.x (common on Windows VMs without GPU passthrough). Qt's from-source build does not produce this DLL, so the LibPack pulls the precompiled file directly from Qt's online installer CDN. The exact archive filename embeds a build timestamp and changes when Qt rebuilds the package; if the URL stops resolving, locate the current archive under the same Updates.xml path. No equivalent prebuilt is published for Windows on ARM64; ARM64 builds skip this entry entirely (see build_opengl32sw)." + }, { "name":"bzip2", "git-repo":"https://gitlab.com/bzip2/bzip2.git", diff --git a/create_libpack.py b/create_libpack.py index 7fc3d6d..e6521ea 100644 --- a/create_libpack.py +++ b/create_libpack.py @@ -135,7 +135,7 @@ def fetch_remote_data(config: dict, skip_existing: bool = False): download(item["name"], item["url"]) elif "url-ARM64" in item and platform.machine() == "ARM64": download(item["name"], item["url-ARM64"]) - elif "url-x64" in item: + elif "url-x64" in item and platform.machine() == "AMD64": download(item["name"], item["url-x64"]) else: # Just make the directory, presumably later code will know what to do From 9edef73f211165f83257676c0c1d60acb3ba4a73 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 23:55:25 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- compile_all.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compile_all.py b/compile_all.py index 3b77647..245b23e 100644 --- a/compile_all.py +++ b/compile_all.py @@ -453,9 +453,7 @@ def build_opengl32sw(self, _: None): print(" opengl32sw.dll already in the LibPack, not re-copying") return if platform.machine() == "ARM64": - print( - " NOTE: opengl32sw.dll is not available for Windows on ARM64 - Skipping" - ) + print(" NOTE: opengl32sw.dll is not available for Windows on ARM64 - Skipping") return matches = list(pathlib.Path(os.getcwd()).rglob("opengl32sw.dll")) if not matches: