From 5d057db29805f20626f6621780e01a0bf2ebde46 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 1 Jul 2022 08:05:32 +0200 Subject: [PATCH] Use BUNDLE app for Macos Contributes to CURA-9365 Co-authored-by: casperlamboo --- Ultimaker-Cura.spec.jinja | 9 ++++++++- conanfile.py | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Ultimaker-Cura.spec.jinja b/Ultimaker-Cura.spec.jinja index ea69eb9efd..3027795d0b 100644 --- a/Ultimaker-Cura.spec.jinja +++ b/Ultimaker-Cura.spec.jinja @@ -46,9 +46,9 @@ exe = EXE( target_arch={{ target_arch }}, codesign_identity=os.getenv('CODESIGN_IDENTITY', None), entitlements_file={{ entitlements_file }}, - bundle_identifier={{ osx_bundle_identifier }}, icon={{ icon }} ) + coll = COLLECT( exe, a.binaries, @@ -59,3 +59,10 @@ coll = COLLECT( upx_exclude=[], name=r'{{ name }}' ) + +{% if macos == 'True' %}app = BUNDLE( + coll, + name='{{ name }}.app', + icon='{{ icon }}', + bundle_identifier='{{ osx_bundle_identifier }}' +){% endif %} diff --git a/conanfile.py b/conanfile.py index 5d919691d6..486ca13a25 100644 --- a/conanfile.py +++ b/conanfile.py @@ -192,7 +192,8 @@ class CuraConan(ConanFile): osx_bundle_identifier = "'nl.ultimaker.cura.dmg'" if self.settings.os == "Macos" else "None", upx = str(self.settings.os == "Windows"), strip = str(self.settings.os != "Windows"), - target_arch = "x86_64" if self.settings.os == "Macos" else "None" # FIXME: Make this dependent on the settings.arch_target + target_arch = "x86_64" if self.settings.os == "Macos" else "None", # FIXME: Make this dependent on the settings.arch_target + macos = "'{}'".format(str(self.settings.os == "Macos")) )) def source(self):