diff --git a/CuraVersion.py.jinja b/CuraVersion.py.jinja index 690a1386d3..515293b8af 100644 --- a/CuraVersion.py.jinja +++ b/CuraVersion.py.jinja @@ -1,8 +1,6 @@ # Copyright (c) 2023 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. -from pkg_resources import working_set - CuraAppName = "{{ cura_app_name }}" CuraAppDisplayName = "{{ cura_app_display_name }}" CuraVersion = "{{ cura_version }}" @@ -16,4 +14,4 @@ CuraDigitalFactoryURL = "{{ cura_digital_factory_url }}" CuraLatestURL = "{{ cura_latest_url }}" ConanInstalls = {{ conan_installs }} -PythonInstalls = {package.key: {'version': package.version} for package in working_set} \ No newline at end of file +PythonInstalls = {{ python_installs }} diff --git a/conanfile.py b/conanfile.py index 3a53cbf529..20ded4bc3c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -152,6 +152,23 @@ class CuraConan(ConanFile): } return conan_installs + def _python_installs(self): + python_installs = {} + + # list of python installs + python_ins_cmd = f"python -c \"import pkg_resources; print(';'.join([(s.key+','+ s.version) for s in pkg_resources.working_set]))\"" + from six import StringIO + buffer = StringIO() + self.run(python_ins_cmd, run_environment= True, env = "conanrun", output=buffer) + + packages = str(buffer.getvalue()).split("-----------------\n") + packages = packages[1].strip('\r\n').split(";") + for package in packages: + name, version = package.split(",") + python_installs[name] = {"version": version} + + return python_installs + def _generate_cura_version(self, location): with open(os.path.join(self.recipe_folder, "CuraVersion.py.jinja"), "r") as f: cura_version_py = Template(f.read()) @@ -178,6 +195,7 @@ class CuraConan(ConanFile): cura_digital_factory_url = self.conan_data["urls"][self._urls]["digital_factory_url"], cura_latest_url=self.conan_data["urls"][self._urls]["cura_latest_url"], conan_installs=self._conan_installs(), + python_installs=self._python_installs(), )) def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path, entitlements_file): diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index d687f4a25d..8ea0c01888 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -38,6 +38,8 @@ UM.Dialog width: Math.floor(base.width * 0.85) height: Math.floor(width * UM.Theme.getSize("logo").height / UM.Theme.getSize("logo").width) source: UM.Theme.getImage("logo") + sourceSize.width: width + sourceSize.height: height fillMode: Image.PreserveAspectFit anchors.centerIn: parent @@ -107,9 +109,10 @@ UM.Dialog Flickable { + id: scroll anchors.fill: parent ScrollBar.vertical: UM.ScrollBar { - visible: contentHeight > height + visible: scroll.contentHeight > height } contentHeight: content.height clip: true