diff --git a/conandata.yml b/conandata.yml index 8fa90458b1..dd81e0dcf5 100644 --- a/conandata.yml +++ b/conandata.yml @@ -100,8 +100,6 @@ pyinstaller: - "pyDulcificum" - "pynest2d" - "PyQt6" - - "PyQt6.Qt" - - "PyQt6.Qt6" - "PyQt6.QtNetwork" - "PyQt6.sip" - "logging.handlers" @@ -112,6 +110,9 @@ pyinstaller: - "win32cred" - "win32timezone" - "pkgutil" + hiddenimports_WINDOWS_ONLY: + - "PyQt6.Qt" + - "PyQt6.Qt6" collect_all: - "cura" - "UM" @@ -120,12 +121,13 @@ pyinstaller: - "sqlite3" - "trimesh" - "win32ctypes" - - "PyQt6.Qt" - - "PyQt6.Qt6" - "PyQt6.QtNetwork" - "PyQt6.sip" - "stl" - "keyrings.alt" + collect_all_WINDOWS_ONLY: + - "PyQt6.Qt" + - "PyQt6.Qt6" icon: Windows: "./icons/Cura.ico" Macos: "./icons/cura.icns" diff --git a/conanfile.py b/conanfile.py index fa15577126..01e2ffb579 100644 --- a/conanfile.py +++ b/conanfile.py @@ -310,6 +310,12 @@ class CuraConan(ConanFile): except Exception as ex: print(f"WARNING: Attempt to delete binary {unwanted_path} results in: {str(ex)}") + hiddenimports = pyinstaller_metadata["hiddenimports"] + collect_all = pyinstaller_metadata["collect_all"] + if self.settings.os == "Windows": + hiddenimports += pyinstaller_metadata["hiddenimports_WINDOWS_ONLY"] + collect_all += pyinstaller_metadata["collect_all_WINDOWS_ONLY"] + # Write the actual file: with open(os.path.join(location, "UltiMaker-Cura.spec"), "w") as f: f.write(pyinstaller.render( @@ -319,8 +325,8 @@ class CuraConan(ConanFile): datas = datas, binaries = filtered_binaries, venv_script_path = str(self._script_dir), - hiddenimports = pyinstaller_metadata["hiddenimports"], - collect_all = pyinstaller_metadata["collect_all"], + hiddenimports = hiddenimports, + collect_all = collect_all, icon = icon_path, entitlements_file = entitlements_file, osx_bundle_identifier = "'nl.ultimaker.cura'" if self.settings.os == "Macos" else "None",