diff options
author | Joey de l'Arago <joeydelarago@gmail.com> | 2022-07-18 12:06:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-18 12:06:53 +0300 |
commit | d1453c5f699c6d9f92cdd4a6afa3e925d2b576f5 (patch) | |
tree | ded9b49e6f3beb95e04054642f9b68cfcd99a2cd | |
parent | aeae08645b910a44c940d58a0c3ccd537b1d0e81 (diff) | |
parent | e62e1e740141febc030810eef7ed3f1055f6564c (diff) |
Merge pull request #12769 from Ultimaker/CURA-9365_add_conan_info_to_log
CURA 9365 add conan info to log
-rw-r--r-- | cura/ApplicationMetadata.py | 11 | ||||
-rwxr-xr-x | cura/CuraApplication.py | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/cura/ApplicationMetadata.py b/cura/ApplicationMetadata.py index 78bda7c3d7..60d9201d8e 100644 --- a/cura/ApplicationMetadata.py +++ b/cura/ApplicationMetadata.py @@ -60,3 +60,14 @@ try: except ImportError: CuraAppDisplayName = DEFAULT_CURA_DISPLAY_NAME + +DEPENDENCY_INFO = {} +try: + from pathlib import Path + conan_install_info = Path(__file__).parent.parent.joinpath("conan_install_info.json") + if conan_install_info.exists(): + import json + with open(conan_install_info, "r") as f: + DEPENDENCY_INFO = json.loads(f.read()) +except: + pass diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index aac1338444..eeaead4f71 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -820,6 +820,12 @@ class CuraApplication(QtApplication): def run(self): super().run() + if len(ApplicationMetadata.DEPENDENCY_INFO) > 0: + Logger.debug("Using Conan managed dependencies: " + ", ".join( + [dep["recipe"]["id"] for dep in ApplicationMetadata.DEPENDENCY_INFO["installed"] if dep["recipe"]["version"] != "latest"])) + else: + Logger.warning("Could not find conan_install_info.json") + Logger.log("i", "Initializing machine error checker") self._machine_error_checker = MachineErrorChecker(self) self._machine_error_checker.initialize() |