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-03-04 21:29:44 -05:00
parent 02703168a0
commit ee76ceb1da
6 changed files with 619 additions and 590 deletions

View File

@ -44,12 +44,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) \
@ -61,9 +55,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

@ -55,6 +55,9 @@ endif
ifndef _BINPATH
_BINPATH = /$(_APPNAME)/Contents/MacOS
endif
ifndef _RESPATH
_RESPATH = /$(_APPNAME)/Contents/Resources
endif
endif
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
@ -70,12 +73,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

@ -3118,6 +3118,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);
}