mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06:00
Update resource directories in Conanfile
Resource directories in the Conanfile have been updated to include full resource paths and also preserve the original directory structure when copying. The 'keep_path' option has been set to true to maintain the original path structure during the copying process. Contribute to NP-186
This commit is contained in:
parent
0942c35c0a
commit
9824c5703c
2 changed files with 3 additions and 2 deletions
|
@ -472,7 +472,7 @@ class CuraConan(ConanFile):
|
|||
rm(self, "conanfile.py", os.path.join(self.package_folder, self.cpp.package.resdirs[0]))
|
||||
cura_resources = self.dependencies["cura_resources"].cpp_info
|
||||
for res_dir in cura_resources.resdirs:
|
||||
copy(self, "*", res_dir, str(self._share_dir.joinpath("cura", "resources", res_dir)))
|
||||
copy(self, "*", res_dir, str(self._share_dir.joinpath("cura", "resources", Path(res_dir).name)), keep_path = True)
|
||||
|
||||
# Copy resources of Uranium (keep folder structure)
|
||||
uranium = self.dependencies["uranium"].cpp_info
|
||||
|
@ -529,7 +529,7 @@ echo "CURA_APP_NAME={{ cura_app_name }}" >> ${{ env_prefix }}GITHUB_ENV
|
|||
rm(self, "conanfile.py", os.path.join(self.package_folder, self.cpp.package.resdirs[0]))
|
||||
cura_resources = self.dependencies["cura_resources"].cpp_info
|
||||
for res_dir in cura_resources.resdirs:
|
||||
rmdir(self, os.path.join(self.package_folder, self.cpp.package.resdirs[0], res_dir))
|
||||
rmdir(self, os.path.join(self.package_folder, self.cpp.package.resdirs[0], Path(res_dir).name))
|
||||
|
||||
def package_info(self):
|
||||
self.user_info.pip_requirements = "requirements.txt"
|
||||
|
|
|
@ -50,6 +50,7 @@ class CuraResource(ConanFile):
|
|||
|
||||
def layout(self):
|
||||
self.cpp.source.resdirs = ["definitions", "extruders", "images", "intent", "meshes", "quality", "variants"]
|
||||
self.cpp.package.resdirs = ["res/definitions", "res/extruders", "res/images", "res/intent", "res/meshes", "res/quality", "res/variants"]
|
||||
|
||||
def package(self):
|
||||
copy(self, "*", os.path.join(self.export_sources_folder),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue