summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/moz.configure/old.configure1
-rw-r--r--old-configure.in10
-rw-r--r--python/mozbuild/mozpack/dmg.py6
3 files changed, 17 insertions, 0 deletions
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index ae29705608..527384839a 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -274,6 +274,7 @@ def old_configure_options(*options):
'--with-ios-sdk',
'--with-jitreport-granularity',
'--with-macbundlename-prefix',
+ '--with-macbundle-identity',
'--with-macos-private-frameworks',
'--with-macos-sdk',
'--with-nspr-cflags',
diff --git a/old-configure.in b/old-configure.in
index c541b4641e..4d997ba560 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -4743,6 +4743,16 @@ AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID)
AC_SUBST(MOZ_MACBUNDLE_ID)
dnl ========================================================
+dnl = Mac bundle codesign identity
+dnl ========================================================
+MOZ_ARG_WITH_STRING(macbundle-identity,
+[ --with-macbundle-identity=identity
+ Identity to codesign the Mac application bundle],
+[ MOZ_MACBUNDLE_IDENTITY="$withval"])
+
+AC_SUBST(MOZ_MACBUNDLE_IDENTITY)
+
+dnl ========================================================
dnl = Child Process Name for IPC
dnl ========================================================
MOZ_CHILD_PROCESS_NAME="plugin-container${BIN_SUFFIX}"
diff --git a/python/mozbuild/mozpack/dmg.py b/python/mozbuild/mozpack/dmg.py
index 0363022144..ade25aeac3 100644
--- a/python/mozbuild/mozpack/dmg.py
+++ b/python/mozbuild/mozpack/dmg.py
@@ -102,6 +102,7 @@ def create_dmg(source_directory, output_dmg, volume_name, extra_files):
if is_linux:
check_tools('DMG_TOOL', 'GENISOIMAGE')
with mozfile.TemporaryDirectory() as tmpdir:
+ import buildconfig
stagedir = os.path.join(tmpdir, 'stage')
os.mkdir(stagedir)
# Copy the app bundle over using rsync
@@ -118,4 +119,9 @@ def create_dmg(source_directory, output_dmg, volume_name, extra_files):
# Set the folder attributes to use a custom icon
set_folder_icon(stagedir)
chmod(stagedir)
+ if not is_linux:
+ identity = buildconfig.substs['MOZ_MACBUNDLE_IDENTITY']
+ if identity != '':
+ appbundle = os.path.join(stagedir, buildconfig.substs['MOZ_MACBUNDLE_NAME'])
+ subprocess.check_call(['codesign', '--deep', '-s', identity, appbundle])
create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name)