Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 18 additions & 4 deletions compile_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,10 +1493,14 @@ def build_swig(self, _=None):

def build_libclang(self, _=None):
"""libclang is provided as a platform-specific download by Qt."""
if self.skip_existing:
if os.path.exists(os.path.join(self.install_dir, "include", "clang")):
print(" Not copying libclang, it is already in the LibPack")
return
# libclang.dll is the runtime library shiboken loads and the only libclang artifact
# FreeCAD ships; path_cleaner never removes it. Its presence is therefore the
# reliable proof of a complete copy: include/clang can survive a stripped or
# partially-extracted tree that is missing the binaries shiboken needs.
libclang_dll = os.path.join(self.install_dir, "bin", "libclang.dll")
if self.skip_existing and os.path.exists(libclang_dll):
print(" Not copying libclang, it is already in the LibPack")
return
print(" (not really building libclang, just copying from a build provided by Qt)")

# Skip libclang's bundled CPython (bin/python3XX.dll and python3XX.zip), which would
Expand All @@ -1512,6 +1516,16 @@ def ignore_bundled_python(directory, names):
"libclang", self.install_dir, dirs_exist_ok=True, ignore=ignore_bundled_python
)

if not os.path.exists(libclang_dll):
print(
"ERROR: libclang.dll is missing from the LibPack after copying libclang. The "
"Qt libclang prebuilt was extracted incompletely: its bin/ executables and "
"DLLs were dropped, which is usually antivirus quarantine or an interrupted "
"extraction. Re-extract the archive, adding an antivirus exclusion for the "
"working directory if necessary, or rebuild libclang with --rebuild libclang."
)
exit(1)

def build_pyside(self, _=None):
# Don't use a pip-install for this, we need the linkable libraries and include files for both PySide and
# Shiboken, which won't get installed by pip, and it needs to be built against the right Python exe
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
},
{
"name":"qt",
"git-repo": "git://code.qt.io/qt/qt5.git",
"git-repo": "https://code.qt.io/qt/qt5.git",
"git-ref": "v6.11.1",
"fallback-build-dir": "G:\\temp"
},
Expand Down
Loading