Add cura_resources as dependency and update resource directories

A new dependency 'cura_resources' has been added to the conandata.yml. The handling of 'cura_resources' has been updated, now including specific sections for definitions, extruders, intent, meshes, quality and variants. GitHub Actions workflows and conan scripts have been adjusted accordingly to include these changes.

Contribute to NP-186
This commit is contained in:
Jelle Spijker 2024-05-06 11:40:39 +02:00
parent 26c4354ac2
commit 0942c35c0a
No known key found for this signature in database
GPG key ID: 0E9129B3096F4E72
5 changed files with 50 additions and 8 deletions

View file

@ -468,6 +468,12 @@ class CuraConan(ConanFile):
copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[0]), str(self._share_dir.joinpath("cura", "resources")), keep_path = True)
copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[1]), str(self._share_dir.joinpath("cura", "plugins")), keep_path = True)
# Copy the cura_resources resources from the package
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 resources of Uranium (keep folder structure)
uranium = self.dependencies["uranium"].cpp_info
copy(self, "*", uranium.resdirs[0], str(self._share_dir.joinpath("uranium", "resources")), keep_path = True)
@ -519,6 +525,12 @@ echo "CURA_APP_NAME={{ cura_app_name }}" >> ${{ env_prefix }}GITHUB_ENV
# Remove the fdm_materials from the package
rmdir(self, os.path.join(self.package_folder, self.cpp.package.resdirs[0], "materials"))
# Remove the cura_resources resources from the package
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))
def package_info(self):
self.user_info.pip_requirements = "requirements.txt"
self.user_info.pip_requirements_git = "requirements-ultimaker.txt"