mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Fix pyinstaller resources deployment
This commit is contained in:
parent
4fedf332a0
commit
bec1ff1243
@ -82,6 +82,8 @@ pyinstaller:
|
|||||||
package: "cura_binary_data"
|
package: "cura_binary_data"
|
||||||
src: "windows"
|
src: "windows"
|
||||||
dst: "share/windows"
|
dst: "share/windows"
|
||||||
|
oses:
|
||||||
|
- "Windows"
|
||||||
fdm_materials:
|
fdm_materials:
|
||||||
package: "fdm_materials"
|
package: "fdm_materials"
|
||||||
src: "res/resources/materials"
|
src: "res/resources/materials"
|
||||||
|
@ -197,9 +197,12 @@ class CuraConan(ConanFile):
|
|||||||
if not self.options.internal and data.get("internal", False):
|
if not self.options.internal and data.get("internal", False):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if "oses" in data and self.settings.os not in data["oses"]:
|
||||||
|
continue
|
||||||
|
|
||||||
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:
|
||||||
src_path = str(Path(self._base_dir, data["src"]))
|
src_path = str(Path(self.source_folder, data["src"]))
|
||||||
else:
|
else:
|
||||||
if data["package"] not in self.dependencies:
|
if data["package"] not in self.dependencies:
|
||||||
continue
|
continue
|
||||||
@ -219,7 +222,7 @@ class CuraConan(ConanFile):
|
|||||||
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.dependencies[binary["package"]].package_folder, 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._base_dir, 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":
|
||||||
src_path = src_path.replace("\\", "\\\\")
|
src_path = src_path.replace("\\", "\\\\")
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user