Fix bug 1130854 - Package Lightning with Thunderbird - Basic Packaging. r=jcranmer
authorPhilipp Kewisch <mozilla@kewis.ch>
Mon, 13 Apr 2015 21:56:20 +0200
changeset 25974 9d9eb9be8ddc7a4498e9f83f9efca72d3a90b9db
parent 25973 80b2e529627d01d416fb5e589af07aa15ecc9dbc
child 25975 e252be6476ccfd0a6536d8ef109617beb3a1c174
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer
bugs1130854
Fix bug 1130854 - Package Lightning with Thunderbird - Basic Packaging. r=jcranmer
calendar/lightning/Makefile.in
calendar/lightning/lightning-packager.mk
calendar/providers/gdata/Makefile.in
mail/installer/Makefile.in
mail/installer/package-manifest.in
mail/locales/Makefile.in
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -66,25 +66,24 @@ ifdef MOZ_SOURCE_STAMP
 DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)'
 endif
 
 MOZ_SOURCE_REPO := $(shell hg -R $(MOZILLA_SRCDIR) showconfig paths.default 2>/dev/null | sed -e 's/^ssh:/http:/')
 ifdef MOZ_SOURCE_REPO
 DEFINES += -DMOZ_SOURCE_REPO='$(MOZ_SOURCE_REPO)'
 endif
 
-# include config.mk here so myconfig or app-config can set DISABLE_LIGHTNING_INSTALL
-include $(topsrcdir)/config/config.mk
-
-# installing lightning in a thunderbird build causes problems on tinderboxes
-# (see bug 406441 and bug 440017), so we need to provide a hook for the
-# tinderboxen to disable that.
-ifndef DISABLE_LIGHTNING_INSTALL
-# install Lightning as a global extension in dist/bin/extensions/
+ifdef NIGHTLY_BUILD
+# On nightly builds, install as a global extension in
+# dist/bin/extensions/
 XPI_INSTALL_EXTENSION = $(XPI_EM_ID)
+else
+# For beta and release builds, install as a distribution extension in
+# dist/bin/distribution/extensions/
+INSTALL_EXTENSION_ID = $(XPI_EM_ID)
 endif
 
 DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
            -DTHUNDERBIRD_MAXVERSION=$(THUNDERBIRD_MAXVERSION) \
            -DAB_CD=$(AB_CD) \
            -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
            -DSEAMONKEY_MAXVERSION=$(SEAMONKEY_MAXVERSION) \
            -DLIGHTNING_VERSION=$(LIGHTNING_VERSION) \
--- a/calendar/lightning/lightning-packager.mk
+++ b/calendar/lightning/lightning-packager.mk
@@ -34,17 +34,17 @@ endif
 
 # This variable is to allow the wget-en-US target to know which ftp server to download from
 ifndef EN_US_BINARY_URL
 ifdef UPLOAD_HOST
 # If this url is missing, and UPLOAD_HOST is defined its probably the release
 # run where we can't influence the download location. Fake it from the env vars
 # we have
 BUILD_NR=$(shell echo $(POST_UPLOAD_CMD) | sed -n -e 's/.*-n \([0-9]*\).*/\1/p')
-CANDIDATE_NR=$(XPI_VERSION)
+CANDIDATE_NR=$(if $(LIGHTNING_VERSION),$(LIGHTNING_VERSION),$(XPI_VERSION))
 EN_US_BINARY_URL=http://$(UPLOAD_HOST)/pub/mozilla.org/calendar/lightning/nightly/$(CANDIDATE_NR)-candidates/build$(BUILD_NR)/$(MOZ_PKG_PLATFORM)
 else
 EN_US_BINARY_URL = $(error You must set EN_US_BINARY_URL)
 endif
 endif
 
 
 XPI_STAGE_PATH = $(DIST)/$(UNIVERSAL_PATH)xpi-stage
--- a/calendar/providers/gdata/Makefile.in
+++ b/calendar/providers/gdata/Makefile.in
@@ -3,19 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 USE_EXTENSION_MANIFEST = 1
 DIST_FILES = install.rdf
 XPI_PKGNAME = gdata-provider-$(GDATA_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
 XPI_VERSION = $(GDATA_VERSION)
 XPI_NO_UNIVERSAL = 1
 XPI_EM_ID = {a62ef8ec-5fdc-40c2-873c-223b8a6925cc}
-ifndef DISABLE_LIGHTNING_INSTALL
 XPI_INSTALL_EXTENSION = $(XPI_EM_ID)
-endif
 
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
 LIGHTNING_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION)))
 GDATA_VERSION = $(shell $(PYTHON) $(srcdir)/makeversion.py $(LIGHTNING_VERSION))
 
 DEFINES += -DAB_CD=$(AB_CD) \
            -DLIGHTNING_VERSION=$(LIGHTNING_VERSION) \
--- a/mail/installer/Makefile.in
+++ b/mail/installer/Makefile.in
@@ -27,16 +27,24 @@ MOZ_NONLOCALIZED_PKG_LIST = \
 	newsblog \
 	offline \
 	$(NULL)
 
 MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
 
 DEFINES += -DAB_CD=$(AB_CD) -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
 
+ifdef NIGHTLY_BUILD
+DEFINES += -DNIGHTLY_BUILD=1
+endif
+
+ifdef MOZ_CALENDAR
+DEFINES += -DMOZ_CALENDAR=1
+endif
+
 ifdef MOZ_DEBUG
 DEFINES += -DMOZ_DEBUG=1
 endif
 
 ifdef MOZ_ENABLE_GNOME_COMPONENT
 DEFINES += -DMOZ_ENABLE_GNOME_COMPONENT=1
 endif
 
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -860,8 +860,17 @@
 @BINPATH@/breakpadinjector.dll
 #endif
 #endif
 
 ; GNOME hooks
 #ifdef MOZ_ENABLE_GNOME_COMPONENT
 @RESPATH@/components/@DLL_PREFIX@mozgnome@DLL_SUFFIX@
 #endif
+
+#ifdef MOZ_CALENDAR
+[calendar]
+#ifdef NIGHTLY_BUILD
+@RESPATH@/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/
+#else
+@RESPATH@/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/
+#endif
+#endif
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -219,16 +219,23 @@ calendar-repackage-zip-%:
 	$(run-calendar-rule)
 calendar-wget-en-US:
 	$(run-calendar-rule)
 calendar-unpack:
 	$(run-calendar-rule)
 calendar-upload:
 	$(MAKE) -C $(LIGHTNING_PATH) upload AB_CD=$(AB_CD)
 
+# Hook into l10n.mk, providing extra arguments to l10n-repack.py
+ifdef NIGHTLY_BUILD
+MOZ_PKG_EXTRAL10N += extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}=$(DIST)/xpi-stage/lightning-$(AB_CD)
+else
+MOZ_PKG_EXTRAL10N += distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}=$(DIST)/xpi-stage/lightning-$(AB_CD)
+endif
+
 # Hook calendar targets to the mail non-pattern rules
 wget-en-US: calendar-wget-en-US
 unpack: calendar-unpack
 upload: calendar-upload
 
 # Hook into the pattern rules, this will be used later on in the installers-% target.
 CALENDAR_INSTALLERS_TARGETS = calendar-merge-% calendar-clobber-% calendar-langpack-% calendar-repackage-zip-%
 endif