Commit 517f06ea authored by Stephen Pohl's avatar Stephen Pohl
Browse files

Mac v2 signing - Bug 1047584 - Modify the .app file structure to allow for OSX...

Mac v2 signing - Bug 1047584 - Modify the .app file structure to allow for OSX v2 signing. r=bsmedberg
parent c1d409a0
......@@ -97,12 +97,6 @@ AB := $(firstword $(subst -, ,$(AB_CD)))
clean clobber repackage::
$(RM) -r $(dist_dest)
ifdef LIBXUL_SDK
APPFILES = Resources
else
APPFILES = MacOS
endif
MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/config/buildid)
.PHONY: repackage
......@@ -113,7 +107,8 @@ tools repackage:: $(PROGRAM)
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(dist_dest)/Contents/Resources/$(AB).lproj
sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist
sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(dist_dest)/Contents/Resources/$(AB).lproj/InfoPlist.strings
rsync -a $(DIST)/bin/ $(dist_dest)/Contents/$(APPFILES)
rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(dist_dest)/Contents/Resources
rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(dist_dest)/Contents/MacOS
$(RM) $(dist_dest)/Contents/MacOS/$(PROGRAM)
rsync -aL $(PROGRAM) $(dist_dest)/Contents/MacOS
cp -RL $(DIST)/branding/firefox.icns $(dist_dest)/Contents/Resources/firefox.icns
......
_CodeSignature/CodeResources
\ No newline at end of file
......@@ -147,7 +147,7 @@
<key>CFBundleGetInfoString</key>
<string>%MAC_APP_NAME% %APP_VERSION%</string>
<key>CFBundleIconFile</key>
<string>firefox</string>
<string>firefox.icns</string>
<key>CFBundleIdentifier</key>
<string>%MOZ_MACBUNDLE_ID%</string>
<key>CFBundleInfoDictionaryVersion</key>
......
/*.app/***
/*.dylib
/firefox-bin
/webapprt-stub
/XUL
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>rules</key>
<dict>
<key>^Info.plist$</key>
<true/>
<key>^PkgInfo$</key>
<true/>
<key>^MacOS/</key>
<true/>
<key>^Resources/</key>
<true/>
<key>^MacOS/distribution/.*</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^MacOS/override.ini</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^MacOS/updates/.*</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^MacOS/active-update.xml$</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^MacOS/defaults/.*</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^MacOS/removed-files$</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^MacOS/updates.xml$</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^Updated.app/.*</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^updating/.*</key><dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
</dict>
</dict>
</plist>
......@@ -23,10 +23,9 @@
; Mac bundle stuff
@APPNAME@/Contents/Info.plist
@APPNAME@/Contents/PkgInfo
@APPNAME@/Contents/Resources/
#ifdef MOZ_SIGNING
@APPNAME@/Contents/_CodeSignature/CodeResources
#endif
@APPNAME@/Contents/Resources/firefox.icns
@APPNAME@/Contents/Resources/document.icns
@APPNAME@/Contents/Resources/en.lproj/*
#endif
[@AB_CD@]
......@@ -55,16 +54,32 @@
#ifdef GKMEDIAS_SHARED_LIBRARY
@BINPATH@/@DLL_PREFIX@gkmedias@DLL_SUFFIX@
#endif
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
#else
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
#endif
#ifdef MOZ_SHARED_MOZGLUE
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/@DLL_PREFIX@mozglue@DLL_SUFFIX@
#else
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
#endif
#endif
#ifndef MOZ_STATIC_JS
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/@DLL_PREFIX@mozjs@DLL_SUFFIX@
#else
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif
#endif
#ifdef MOZ_DMD
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/@DLL_PREFIX@dmd@DLL_SUFFIX@
#else
@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
#endif
#endif
#ifndef MOZ_NATIVE_NSPR
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
......@@ -73,13 +88,13 @@
#endif
#endif
#ifdef XP_MACOSX
@BINPATH@/XUL
@APPNAME@/Contents/MacOS/XUL
#else
@BINPATH@/@DLL_PREFIX@xul@DLL_SUFFIX@
#endif
#ifdef XP_MACOSX
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@.app/
@BINPATH@/@DLL_PREFIX@plugin_child_interpose@DLL_SUFFIX@
@APPNAME@/Contents/MacOS/@MOZ_CHILD_PROCESS_NAME@.app/
@APPNAME@/Contents/MacOS/@DLL_PREFIX@plugin_child_interpose@DLL_SUFFIX@
#else
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
#endif
......@@ -109,9 +124,13 @@
#endif
#ifdef MOZ_REPLACE_MALLOC
#ifndef MOZ_JEMALLOC3
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/@DLL_PREFIX@replace_jemalloc@DLL_SUFFIX@
#else
@BINPATH@/@DLL_PREFIX@replace_jemalloc@DLL_SUFFIX@
#endif
#endif
#endif
#ifdef MOZ_GTK3
@BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozgtk2@DLL_SUFFIX@
......@@ -121,6 +140,9 @@
; [Base Browser Files]
#ifndef XP_UNIX
@BINPATH@/@MOZ_APP_NAME@.exe
#elif XP_MACOSX
@APPNAME@/Contents/MacOS/@MOZ_APP_NAME@-bin
@APPNAME@/Contents/MacOS/@MOZ_APP_NAME@
#else
@BINPATH@/@MOZ_APP_NAME@-bin
@BINPATH@/@MOZ_APP_NAME@
......@@ -740,19 +762,33 @@
; meaning their .chk files are created there directly.
;
#ifndef MOZ_NATIVE_NSS
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/@DLL_PREFIX@freebl3@DLL_SUFFIX@
@APPNAME@/Contents/MacOS/@DLL_PREFIX@nss3@DLL_SUFFIX@
@APPNAME@/Contents/MacOS/@DLL_PREFIX@nssckbi@DLL_SUFFIX@
#else
@BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nssckbi@DLL_SUFFIX@
#endif
#ifndef NSS_DISABLE_DBM
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/@DLL_PREFIX@nssdbm3@DLL_SUFFIX@
#else
@BINPATH@/@DLL_PREFIX@nssdbm3@DLL_SUFFIX@
#endif
#endif
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
#endif
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/@DLL_PREFIX@softokn3@DLL_SUFFIX@
#else
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
#endif
#endif
@BINPATH@/chrome/pippki@JAREXT@
@BINPATH@/chrome/pippki.manifest
@BINPATH@/components/pipboot.xpt
......@@ -779,7 +815,7 @@ bin/libfreebl_32int64_3.so
;
#ifdef MOZ_UPDATER
#ifdef XP_MACOSX
@BINPATH@/updater.app/
@APPNAME@/Contents/MacOS/updater.app/
#else
@BINPATH@/updater@BIN_SUFFIX@
#endif
......@@ -799,7 +835,7 @@ bin/libfreebl_32int64_3.so
@BINPATH@/components/CrashService.js
@BINPATH@/components/toolkit_crashservice.xpt
#ifdef XP_MACOSX
@BINPATH@/crashreporter.app/
@APPNAME@/Contents/MacOS/crashreporter.app/
#else
@BINPATH@/crashreporter@BIN_SUFFIX@
@BINPATH@/crashreporter.ini
......@@ -818,7 +854,11 @@ bin/libfreebl_32int64_3.so
#ifdef XP_WIN
@BINPATH@/webapp-uninstaller@BIN_SUFFIX@
#endif
#ifdef XP_MACOSX
@APPNAME@/Contents/MacOS/webapprt-stub@BIN_SUFFIX@
#else
@BINPATH@/webapprt-stub@BIN_SUFFIX@
#endif
@BINPATH@/webapprt/webapprt.ini
@BINPATH@/webapprt/chrome.manifest
@BINPATH@/webapprt/chrome/webapprt@JAREXT@
......
......@@ -45,7 +45,7 @@ def generate_precomplete(root_path):
for the location to enumerate and to create the precomplete file.
"""
# If inside a Mac bundle use the root of the bundle for the path.
if os.path.basename(root_path) == "MacOS":
if os.path.basename(root_path) == "Resources":
root_path = os.path.abspath(os.path.join(root_path, '../../'))
rel_file_path_list, rel_dir_path_list = get_build_entries(root_path)
......
......@@ -36,7 +36,7 @@ endif
ifdef MOZ_CRASHREPORTER
libs:: crashreporter.ini
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/crashreporter.app/Contents/MacOS
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/crashreporter.app/Contents/Resources
else
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
endif
......
......@@ -39,7 +39,7 @@ ifndef _APPNAME
_APPNAME = $(MOZ_MACBUNDLE_NAME)
endif
ifndef _BINPATH
_BINPATH = /$(_APPNAME)/Contents/MacOS
_BINPATH = /$(_APPNAME)/Contents/Resources
endif # _BINPATH
ifdef UNIVERSAL_BINARY
STAGEPATH = universal/
......@@ -536,8 +536,6 @@ endif
ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
ifeq (Darwin, $(OS_ARCH))
MAKE_PACKAGE = cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \
&& rm $(MOZ_MACBUNDLE_NAME)/Contents/CodeResources \
&& cp $(MOZ_MACBUNDLE_NAME)/Contents/_CodeSignature/CodeResources $(MOZ_MACBUNDLE_NAME)/Contents \
&& cd $(PACKAGE_BASE_DIR) \
&& $(INNER_MAKE_PACKAGE)
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment