Bug 556644 - 9. Add support for packaging omnijar, r=bsmedberg a=blocking2.0

This commit is contained in:
Michael Wu 2010-08-12 21:33:52 -07:00
Родитель e52a8654b3
Коммит 61ea44fb31
4 изменённых файлов: 59 добавлений и 16 удалений

Просмотреть файл

@ -82,6 +82,12 @@ ifdef _MSC_VER
DEFINES += -D_MSC_VER=$(_MSC_VER)
endif
ifeq ($(MOZ_CHROME_FILE_FORMAT),jar)
DEFINES += -DJAREXT=.jar
else
DEFINES += -DJAREXT=
endif
# Don't ifdef MOZ_IPC this because mac ppc needs it too.
include $(topsrcdir)/ipc/app/defs.mk
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)

Просмотреть файл

@ -19,7 +19,7 @@
#endif
[@AB_CD@]
@BINPATH@/chrome/@AB_CD@.jar
@BINPATH@/chrome/@AB_CD@@JAREXT@
@BINPATH@/chrome/@AB_CD@.manifest
@BINPATH@/@PREF_DIR@/firefox-l10n.js
@BINPATH@/searchplugins/*
@ -401,7 +401,7 @@
#endif
; [Browser Chrome Files]
@BINPATH@/chrome/browser.jar
@BINPATH@/chrome/browser@JAREXT@
@BINPATH@/chrome/browser.manifest
@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
@ -409,7 +409,7 @@
#if MOZ_UPDATE_CHANNEL == beta
@BINPATH@/extensions/testpilot@labs.mozilla.com/*
#endif
@BINPATH@/chrome/toolkit.jar
@BINPATH@/chrome/toolkit@JAREXT@
@BINPATH@/chrome/toolkit.manifest
@BINPATH@/@PREF_DIR@/reporter.js
#ifdef XP_UNIX
@ -508,7 +508,7 @@
@BINPATH@/@DLL_PREFIX@nssdbm3.chk
#endif
#endif
@BINPATH@/chrome/pippki.jar
@BINPATH@/chrome/pippki@JAREXT@
@BINPATH@/chrome/pippki.manifest
; for Solaris SPARC

Просмотреть файл

@ -156,6 +156,9 @@ ifneq (en,$(AB))
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj
endif
endif
ifdef MOZ_OMNIJAR
@(cd $(STAGEDIST) && $(UNPACK_OMNIJAR))
endif
$(MAKE) clobber-zip AB_CD=$(AB_CD)
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)

Просмотреть файл

@ -107,32 +107,32 @@ UNPACK_TAR = tar -xf-
ifeq ($(MOZ_PKG_FORMAT),TAR)
PKG_SUFFIX = .tar
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) > $(PACKAGE)
UNMAKE_PACKAGE = $(UNPACK_TAR) < $(UNPACKAGE)
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) > $(PACKAGE)
INNER_UNMAKE_PACKAGE = $(UNPACK_TAR) < $(UNPACKAGE)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk > $(SDK)
endif
ifeq ($(MOZ_PKG_FORMAT),TGZ)
PKG_SUFFIX = .tar.gz
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | gzip -vf9 > $(PACKAGE)
UNMAKE_PACKAGE = gunzip -c $(UNPACKAGE) | $(UNPACK_TAR)
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | gzip -vf9 > $(PACKAGE)
INNER_UNMAKE_PACKAGE = gunzip -c $(UNPACKAGE) | $(UNPACK_TAR)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | gzip -vf9 > $(SDK)
endif
ifeq ($(MOZ_PKG_FORMAT),BZ2)
PKG_SUFFIX = .tar.bz2
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | bzip2 -vf > $(PACKAGE)
UNMAKE_PACKAGE = bunzip2 -c $(UNPACKAGE) | $(UNPACK_TAR)
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | bzip2 -vf > $(PACKAGE)
INNER_UNMAKE_PACKAGE = bunzip2 -c $(UNPACKAGE) | $(UNPACK_TAR)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > $(SDK)
endif
ifeq ($(MOZ_PKG_FORMAT),ZIP)
PKG_SUFFIX = .zip
MAKE_PACKAGE = $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR)
UNMAKE_PACKAGE = $(UNZIP) $(UNPACKAGE)
INNER_MAKE_PACKAGE = $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR)
INNER_UNMAKE_PACKAGE = $(UNZIP) $(UNPACKAGE)
MAKE_SDK = $(ZIP) -r9D $(SDK) $(MOZ_APP_NAME)-sdk
endif
ifeq ($(MOZ_PKG_FORMAT),CAB)
PKG_SUFFIX = .cab
MAKE_PACKAGE = $(MAKE_CAB)
UNMAKE_PACKAGE = $(error Unpacking CAB files is not supported)
INNER_MAKE_PACKAGE = $(MAKE_CAB)
INNER_UNMAKE_PACKAGE = $(error Unpacking CAB files is not supported)
endif
ifeq ($(MOZ_PKG_FORMAT),DMG)
ifndef _APPNAME
@ -169,11 +169,11 @@ endif
ifndef PKG_DMG_SOURCE
PKG_DMG_SOURCE = $(STAGEPATH)$(MOZ_PKG_DIR)
endif
MAKE_PACKAGE = $(_ABS_MOZSRCDIR)/build/package/mac_osx/pkg-dmg \
INNER_MAKE_PACKAGE = $(_ABS_MOZSRCDIR)/build/package/mac_osx/pkg-dmg \
--source "$(PKG_DMG_SOURCE)" --target "$(PACKAGE)" \
--volname "$(MOZ_APP_DISPLAYNAME)" $(PKG_DMG_FLAGS)
_ABS_DIST = $(call core_abspath,$(DIST))
UNMAKE_PACKAGE = \
INNER_UNMAKE_PACKAGE = \
set -ex; \
rm -rf $(_ABS_DIST)/unpack.tmp; \
mkdir -p $(_ABS_DIST)/unpack.tmp; \
@ -203,6 +203,40 @@ endif
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > $(SDK)
endif
ifdef MOZ_OMNIJAR
OMNIJAR_FILES = \
chrome \
chrome.manifest \
components/*.js \
components/*.xpt \
components/*.manifest \
modules \
res \
defaults \
greprefs.js \
$(NULL)
NON_OMNIJAR_FILES = \
chrome/icons/\* \
res/cursors/\* \
res/MainMenu.nib/\* \
$(NULL)
PACK_OMNIJAR = \
rm -f omni.jar components/binary.manifest && \
grep -h '^binary-component' components/*.manifest > binary.manifest ; \
zip -r9m omni.jar $(OMNIJAR_FILES) -x $(NON_OMNIJAR_FILES) && \
mv binary.manifest components && \
printf "manifest components/binary.manifest\n" > chrome.manifest
UNPACK_OMNIJAR = unzip -o omni.jar && rm -f components/binary.manifest
MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(PACK_OMNIJAR)) && $(INNER_MAKE_PACKAGE)
UNMAKE_PACKAGE = $(INNER_UNMAKE_PACKAGE) && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(UNPACK_OMNIJAR))
else
MAKE_PACKAGE = $(INNER_MAKE_PACKAGE)
UNMAKE_PACKAGE = $(INNER_UNMAKE_PACKAGE)
endif
# dummy macro if we don't have PSM built
SIGN_NSS =
ifneq (1_,$(if $(CROSS_COMPILE),1,0)_$(UNIVERSAL_BINARY))