Browse Source

Use BUNDLE app for Macos

Contributes to CURA-9365

Co-authored-by: casperlamboo <c.lamboo@ultimaker.com>
j.spijker@ultimaker.com 2 years ago
parent
commit
5d057db298
2 changed files with 10 additions and 2 deletions
  1. 8 1
      Ultimaker-Cura.spec.jinja
  2. 2 1
      conanfile.py

+ 8 - 1
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 %}

+ 2 - 1
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):