Bug 1265272 - Generate EME voucher for MacOSX; r?ted draft
authorMike Shal <mshal@mozilla.com>
Thu, 21 Apr 2016 11:09:52 -0400
changeset 356902 41232e48e86fa3a5e74730caa10a05fee3468034
parent 356901 95a086071ff05dc522170a7a1cd631eb82bba69a
child 519515 e1c4143ca29c2e8145f013d21835bf518cbf286c
push id16636
push userbmo:mshal@mozilla.com
push dateWed, 27 Apr 2016 13:28:00 +0000
reviewersted
bugs1265272
milestone48.0a1
Bug 1265272 - Generate EME voucher for MacOSX; r?ted MozReview-Commit-ID: Dct5p9LfkWq
build/virtualenv_packages.txt
toolkit/mozapps/installer/make-eme.mk
toolkit/mozapps/installer/upload-files.mk
--- a/build/virtualenv_packages.txt
+++ b/build/virtualenv_packages.txt
@@ -1,22 +1,24 @@
+altgraph.pth:python/altgraph
 marionette_driver.pth:testing/marionette/client
 browsermobproxy.pth:testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py
 wptserve.pth:testing/web-platform/tests/tools/wptserve
 marionette.pth:testing/marionette/harness
 blessings.pth:python/blessings
 configobj.pth:python/configobj
 jsmin.pth:python/jsmin
 mach.pth:python/mach
 mozbuild.pth:python/mozbuild
 pymake.pth:build/pymake
 optional:setup.py:python/psutil:build_ext:--inplace
 optional:psutil.pth:python/psutil
 which.pth:python/which
 ply.pth:other-licenses/ply/
+macholib.pth:python/macholib
 mock.pth:python/mock-1.0.0
 mozilla.pth:build
 mozilla.pth:config
 mozilla.pth:xpcom/typelib/xpt/tools
 mozilla.pth:dom/bindings
 mozilla.pth:dom/bindings/parser
 mozilla.pth:layout/tools/reftest
 moztreedocs.pth:tools/docs
--- a/toolkit/mozapps/installer/make-eme.mk
+++ b/toolkit/mozapps/installer/make-eme.mk
@@ -1,14 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 include $(MOZILLA_DIR)/toolkit/mozapps/installer/signing.mk
 
 ifdef MOZ_SIGN_CMD
-  ifeq ($(OS_ARCH),WINNT)
-    # The argument to this macro is the directory where plugin-container.exe
-    # exists, and where voucher.bin will be generated.
-    MAKE_SIGN_EME_VOUCHER = $(PYTHON) $(MOZILLA_DIR)/python/eme/gen-eme-voucher.py -input $(1)/plugin-container.exe -output $(1)/voucher.bin && \
-      $(MOZ_SIGN_CMD) -f emevoucher "$(1)/voucher.bin"
+  ifeq (,$(filter-out WINNT Darwin,$(OS_ARCH)))
+    # The first argument to this macro is the directory where the
+    # plugin-container binary exists, and the second is where voucher.bin will
+    # be generated. If the second argument is not specified, it defaults to the
+    # same as the first.
+    MAKE_SIGN_EME_VOUCHER = $(PYTHON) $(MOZILLA_DIR)/python/eme/gen-eme-voucher.py -input $(1)/$(MOZ_CHILD_PROCESS_NAME) -output $(or $(2),$(1))/voucher.bin && \
+      $(MOZ_SIGN_CMD) -f emevoucher "$(or $(2),$(1))/voucher.bin"
   endif
 endif
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -280,17 +280,18 @@ endif
 
 # For final GPG / authenticode signing / dmg signing if required
 ifdef MOZ_EXTERNAL_SIGNING_FORMAT
   MOZ_SIGN_PACKAGE_CMD=$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f))
 endif
 
 ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
   ifeq (Darwin, $(OS_ARCH))
-    MAKE_PACKAGE    = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \
+    MAKE_PACKAGE    = $(or $(call MAKE_SIGN_EME_VOUCHER,$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS,$(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH)),true) \
+                      && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \
                       && cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \
                       && cd $(PACKAGE_BASE_DIR) && $(INNER_MAKE_PACKAGE)
   else
     MAKE_PACKAGE    = $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_PKG_DIR) \
                       && $(or $(call MAKE_SIGN_EME_VOUCHER,$(STAGEPATH)$(MOZ_PKG_DIR)),true) \
                       && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \
                       && $(INNER_MAKE_PACKAGE)
   endif #Darwin