Fix pyinstaller data generation

This commit is contained in:
Erwan MATHIEU 2024-09-26 16:38:23 +02:00
parent cee46ae1ea
commit ab96236a8f
2 changed files with 4 additions and 15 deletions

View file

@ -86,14 +86,6 @@ pyinstaller:
package: "fdm_materials" package: "fdm_materials"
src: "res/resources/materials" src: "res/resources/materials"
dst: "share/cura/resources/materials" dst: "share/cura/resources/materials"
tcl:
package: "tcl"
src: "lib/tcl8.6"
dst: "tcl"
tk:
package: "tk"
src: "lib/tk8.6"
dst: "tk"
binaries: binaries:
curaengine: curaengine:
package: "curaengine" package: "curaengine"

View file

@ -199,14 +199,11 @@ class CuraConan(ConanFile):
if "package" in data: # get the paths from conan package if "package" in data: # get the paths from conan package
if data["package"] == self.name: if data["package"] == self.name:
if self.in_local_cache: src_path = str(Path(self.source_folder, data["src"]))
src_path = str(Path(self.package_folder, data["src"]))
else:
src_path = str(Path(self.source_folder, data["src"]))
else: else:
if data["package"] not in self.deps_cpp_info.deps: if data["package"] not in self.dependencies:
continue continue
src_path = os.path.join(self.deps_cpp_info[data["package"]].rootpath, data["src"]) src_path = os.path.join(self.dependencies[data["package"]].package_folder, data["src"])
elif "root" in data: # get the paths relative from the install folder elif "root" in data: # get the paths relative from the install folder
src_path = os.path.join(self.install_folder, data["root"], data["src"]) src_path = os.path.join(self.install_folder, data["root"], data["src"])
else: else:
@ -217,7 +214,7 @@ class CuraConan(ConanFile):
binaries = [] binaries = []
for binary in pyinstaller_metadata["binaries"].values(): for binary in pyinstaller_metadata["binaries"].values():
if "package" in binary: # get the paths from conan package if "package" in binary: # get the paths from conan package
src_path = os.path.join(self.deps_cpp_info[binary["package"]].rootpath, binary["src"]) src_path = os.path.join(self.dependencies[binary["package"]].package_folder, binary["src"])
elif "root" in binary: # get the paths relative from the sourcefolder elif "root" in binary: # get the paths relative from the sourcefolder
src_path = str(Path(self.source_folder, binary["root"], binary["src"])) src_path = str(Path(self.source_folder, binary["root"], binary["src"]))
if self.settings.os == "Windows": if self.settings.os == "Windows":