mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Add conan_binaries to pyinstaller
Contributes to CURA-9365
This commit is contained in:
parent
83bad98ea3
commit
cf1e2bd7af
2 changed files with 13 additions and 3 deletions
|
@ -12,9 +12,11 @@ datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
||||||
|
|
||||||
block_cipher = None
|
block_cipher = None
|
||||||
|
|
||||||
|
{% for conan_binary in conan_binaries %}binaries += r'{{ conan_binary }}'
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['{{ entrypoint }}'],
|
[r'{{ entrypoint }}'],
|
||||||
pathex=[],
|
pathex=[],
|
||||||
binaries=binaries,
|
binaries=binaries,
|
||||||
datas=datas,
|
datas=datas,
|
||||||
|
@ -35,7 +37,7 @@ exe = EXE(
|
||||||
a.scripts,
|
a.scripts,
|
||||||
[],
|
[],
|
||||||
exclude_binaries=True,
|
exclude_binaries=True,
|
||||||
name='{{ name }}',
|
name=r'{{ name }}',
|
||||||
debug=False,
|
debug=False,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
|
@ -56,5 +58,5 @@ coll = COLLECT(
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
upx_exclude=[],
|
upx_exclude=[],
|
||||||
name='{{ name }}'
|
name=r'{{ name }}'
|
||||||
)
|
)
|
||||||
|
|
|
@ -168,6 +168,13 @@ 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"]))
|
||||||
|
|
||||||
|
conan_binaries = []
|
||||||
|
for _, dependency in self.dependencies.host.items():
|
||||||
|
for bin_paths in dependency.cpp_info.bin_paths:
|
||||||
|
conan_binaries.extend(Path(bin_paths).glob("**/*.dll"))
|
||||||
|
conan_binaries.extend(Path(bin_paths).glob("**/*.dylib"))
|
||||||
|
conan_binaries.extend(Path(bin_paths).glob("**/*.so"))
|
||||||
|
|
||||||
with open(Path(__file__).parent.joinpath("Ultimaker-Cura.spec.jinja"), "r") as f:
|
with open(Path(__file__).parent.joinpath("Ultimaker-Cura.spec.jinja"), "r") as f:
|
||||||
pyinstaller = Template(f.read())
|
pyinstaller = Template(f.read())
|
||||||
|
|
||||||
|
@ -177,6 +184,7 @@ class CuraConan(ConanFile):
|
||||||
entrypoint = entrypoint_location,
|
entrypoint = entrypoint_location,
|
||||||
datas = datas,
|
datas = datas,
|
||||||
binaries = binaries,
|
binaries = binaries,
|
||||||
|
conan_binaries = conan_binaries,
|
||||||
hiddenimports = pyinstaller_metadata["hiddenimports"],
|
hiddenimports = pyinstaller_metadata["hiddenimports"],
|
||||||
collect_all = pyinstaller_metadata["collect_all"],
|
collect_all = pyinstaller_metadata["collect_all"],
|
||||||
icon = icon_path
|
icon = icon_path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue