mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix adding all shared libs managed by Conan to pyinstaller
Closes #13422 Contributes to CURA-9711
This commit is contained in:
parent
73c8bf5c66
commit
ca90ac7787
2 changed files with 9 additions and 17 deletions
|
@ -220,7 +220,6 @@
|
||||||
Windows: "./icons/Cura.ico"
|
Windows: "./icons/Cura.ico"
|
||||||
Macos: "./icons/cura.icns"
|
Macos: "./icons/cura.icns"
|
||||||
Linux: "./icons/cura-128.png"
|
Linux: "./icons/cura-128.png"
|
||||||
|
|
||||||
"5.2.0-beta.1":
|
"5.2.0-beta.1":
|
||||||
requirements:
|
requirements:
|
||||||
- "pyarcus/5.2.0-beta.1"
|
- "pyarcus/5.2.0-beta.1"
|
||||||
|
@ -298,16 +297,6 @@
|
||||||
src: "bin"
|
src: "bin"
|
||||||
dst: "."
|
dst: "."
|
||||||
binary: "CuraEngine"
|
binary: "CuraEngine"
|
||||||
spdlog:
|
|
||||||
package: "spdlog"
|
|
||||||
src: "lib"
|
|
||||||
dst: "."
|
|
||||||
binary: "libspdlog"
|
|
||||||
fmt:
|
|
||||||
package: "fmt"
|
|
||||||
src: "lib"
|
|
||||||
dst: "."
|
|
||||||
binary: "libfmt"
|
|
||||||
hiddenimports:
|
hiddenimports:
|
||||||
- "pySavitar"
|
- "pySavitar"
|
||||||
- "pyArcus"
|
- "pyArcus"
|
||||||
|
|
15
conanfile.py
15
conanfile.py
|
@ -216,14 +216,17 @@ class CuraConan(ConanFile):
|
||||||
for bin in src_path.glob(binary["binary"]):
|
for bin in src_path.glob(binary["binary"]):
|
||||||
binaries.append((str(bin), binary["dst"]))
|
binaries.append((str(bin), binary["dst"]))
|
||||||
|
|
||||||
for _, dependency in self.dependencies.items():
|
# Make sure all Conan dependencies which are shared are added to the binary list for pyinstaller
|
||||||
for bin_paths in dependency.cpp_info.bindirs:
|
for _, dependency in self.dependencies.host.items():
|
||||||
binaries.extend([(f"{p}", ".") for p in Path(bin_paths).glob("**/*.dll")])
|
if hasattr(dependency.options, "shared") and dependency.options.shared:
|
||||||
binaries.extend([(f"{p}", ".") for p in Path(bin_paths).glob("**/*.dylib")])
|
for bin_paths in dependency.cpp_info.bindirs:
|
||||||
binaries.extend([(f"{p}", ".") for p in Path(bin_paths).glob("**/*.so")])
|
binaries.extend([(f"{p}", ".") for p in Path(bin_paths).glob("**/*")])
|
||||||
|
for lib_paths in dependency.cpp_info.libdirs:
|
||||||
|
binaries.extend([(f"{p}", ".") for p in Path(lib_paths).glob("**/*")])
|
||||||
|
|
||||||
# Copy dynamic libs from lib path
|
# Copy dynamic libs from lib path
|
||||||
binaries.extend([(f"{p}", ".") for p in Path(self._base_dir.joinpath("lib")).glob("**/*.dylib")])
|
binaries.extend([(f"{p}", ".") for p in Path(self._base_dir.joinpath("lib")).glob("**/*.dylib*")])
|
||||||
|
binaries.extend([(f"{p}", ".") for p in Path(self._base_dir.joinpath("lib")).glob("**/*.so*")])
|
||||||
|
|
||||||
# Collect all dll's from PyQt6 and place them in the root
|
# Collect all dll's from PyQt6 and place them in the root
|
||||||
binaries.extend([(f"{p}", ".") for p in Path(self._site_packages, "PyQt6", "Qt6").glob("**/*.dll")])
|
binaries.extend([(f"{p}", ".") for p in Path(self._site_packages, "PyQt6", "Qt6").glob("**/*.dll")])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue