Bug 1101331: Modify directory structure of B2G.app to conform with Apple's v2 signature requirements. r=rstrong

This commit is contained in:
Stephen Pohl 2015-01-21 14:40:45 -05:00
parent 7524aba323
commit 0cc45f51d9
6 changed files with 608 additions and 579 deletions

View File

@ -46,12 +46,6 @@ AB := $(firstword $(subst -, ,$(AB_CD)))
clean clobber repackage::
rm -rf $(DIST)/$(APP_NAME).app
ifdef LIBXUL_SDK
APPFILES = Resources
else
APPFILES = MacOS
endif
libs-preqs = \
$(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/MacOS) \
$(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj) \
@ -63,9 +57,8 @@ tools repackage:: $(libs-preqs)
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
sed -e 's/%MOZ_APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MOZ_APP_NAME%/$(MOZ_APP_NAME)/' -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' -e 's/%APP_BINARY%/$(APP_BINARY)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
sed -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
mv $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/dependentlibs.list $(DIST)/$(APP_NAME).app/Contents/Resources
$(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/mangle $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/shlibsign
rsync -a --exclude 'mangle' --exclude 'shlibsign' --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/Resources
rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/MacOS
ifdef LIBXUL_SDK
cp $(LIBXUL_DIST)/bin/xulrunner$(BIN_SUFFIX) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
rsync -a --exclude nsinstall --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(APP_NAME).app/Contents/Frameworks

View File

@ -9,7 +9,7 @@
<key>CFBundleGetInfoString</key>
<string>%APP_NAME% %APP_VERSION%</string>
<key>CFBundleIconFile</key>
<string>%MOZ_APP_NAME%</string>
<string>%MOZ_APP_NAME%.icns</string>
<key>CFBundleIdentifier</key>
<string>org.mozilla.b2g</string>
<key>CFBundleInfoDictionaryVersion</key>

View File

@ -0,0 +1,9 @@
/*.app/***
/*.dylib
/b2g
/certutil
/gtest/***
/pk12util
/ssltunnel
/xpcshell
/XUL

View File

@ -49,6 +49,9 @@ endif
ifndef _BINPATH
_BINPATH = /$(_APPNAME)/Contents/MacOS
endif
ifndef _RESPATH
_RESPATH = /$(_APPNAME)/Contents/Resources
endif
endif
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
@ -64,12 +67,16 @@ endif
ifeq (bundle, $(MOZ_FS_LAYOUT))
BINPATH = $(_BINPATH)
RESPATH = $(_RESPATH)
DEFINES += -DAPPNAME=$(_APPNAME)
else
# Every other platform just winds up in dist/bin
BINPATH = bin
RESPATH = bin
endif
DEFINES += -DBINPATH=$(BINPATH)
DEFINES += -DRESPATH=$(RESPATH)
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
DEFINES += -DMOZ_SHARED_MOZGLUE=1

File diff suppressed because it is too large Load Diff

View File

@ -3102,6 +3102,13 @@ XREMain::XRE_mainInit(bool* aExitFlag)
if (NS_FAILED(rv))
return 2;
#ifdef XP_MACOSX
nsCOMPtr<nsIFile> parent;
greDir->GetParent(getter_AddRefs(parent));
greDir = parent.forget();
greDir->AppendNative(NS_LITERAL_CSTRING("Resources"));
#endif
greDir.forget(&mAppData->xreDirectory);
}