Bug 346278 - Forward Port l10n nightly changes from comm-1.9.2
authorPhilipp Kewisch <mozilla@kewis.ch>
Mon, 07 Feb 2011 22:23:48 +0100
changeset 7100 4b7dee4ee6d74718348f165f6f50d4ac78589d4e
parent 7099 058149fc39307ee8ed5499ba5a9a9b2419856af0
child 7101 65aed01a5b8d2143d373325e362f4b1ecd9014b0
push idunknown
push userunknown
push dateunknown
bugs346278
Bug 346278 - Forward Port l10n nightly changes from comm-1.9.2
calendar/lightning/lightning-packager.mk
--- a/calendar/lightning/lightning-packager.mk
+++ b/calendar/lightning/lightning-packager.mk
@@ -37,17 +37,20 @@
 _ABS_DIST := $(call core_abspath,$(DIST))
 ZIP_IN ?= $(_ABS_DIST)/xpi-stage/$(XPI_NAME).xpi
 
 # This variable is to allow the wget-en-US target to know which ftp server to download from
 ifndef EN_US_BINARY_URL
 EN_US_BINARY_URL = $(error You must set EN_US_BINARY_URL)
 endif
 
-wget-en-US:
+$(DIST)/xpi-stage:
+	mkdir -p $@
+
+wget-en-US: $(DIST)/xpi-stage
 ifndef WGET
 	$(error wget not installed)
 endif
 	(cd $(DIST)/xpi-stage && $(WGET) -nv -N $(EN_US_BINARY_URL)/$(XPI_NAME).xpi)
 	@echo "Downloaded $(EN_US_BINARY_URL)/$(PACKAGE) to	$(ZIP_IN)"
 
 unpack: $(ZIP_IN)
 # We're unpacking directly into FINAL_TARGET, this keeps code to do manual
@@ -57,22 +60,22 @@ unpack: $(ZIP_IN)
 	fi
 	$(NSINSTALL) -D $(FINAL_TARGET)
 	cd $(FINAL_TARGET) && $(UNZIP) $(ZIP_IN)
 	@echo done unpacking
 
 # Call this target to upload the localized lightning package.
 l10n-upload-%: AB_CD=$*
 l10n-upload-%:
-	$(PYTHON) $(MOZILLA_SRCDIR)/build/upload.py --base-path $(DIST)	"$(DIST)/xpi-stage/$(XPI_NAME)-$(AB_CD)"
+	$(PYTHON) $(MOZILLA_SRCDIR)/build/upload.py --base-path $(DIST)/xpi-stage/  "$(DIST)/xpi-stage/$(XPI_NAME)-$(AB_CD).xpi"
 
 # Call this target to trigger repackaging lightning for a specific language
 # Usage: make AB_CD=<language> repack-l10n
 repack-l10n: L10N_XPI_NAME=$(subst -en-US,,$(XPI_NAME)-$(AB_CD))
-repack-l10n: repack-clobber libs-$(AB_CD) repack-process-extrafiles
+repack-l10n: recreate-platformini repack-clobber libs-$(AB_CD) repack-process-extrafiles
 	@echo "Finished repackaging $(XPI_NAME) locale for Language $(AB_CD)"
 
 # This target should not be called directly
 repack-clobber-all:
 	@echo "Repackaging $(XPI_NAME) locale for Language $(AB_CD)"
 	rm -rf $(DIST)/xpi-stage/$(XPI_NAME)-$(AB_CD)
 	cp -R $(DIST)/xpi-stage/$(XPI_NAME) $(DIST)/xpi-stage/$(XPI_NAME)-$(AB_CD)
 
@@ -98,8 +101,27 @@ libs-%:
 	$(MAKE) -C ../locales libs AB_CD=$* XPI_NAME=$(FINAL_XPI_NAME) XPI_PKGNAME=$(FINAL_XPI_NAME) USE_EXTENSION_MANIFEST=1
 
 # For localized xpis, the install.rdf and lightning-l10n.js need to be
 # reprocessed with some defines from the locale.
 repack-process-extrafiles: LOCALE_BASEDIR=$(call EXPAND_LOCALE_SRCDIR,calendar/locales)
 repack-process-extrafiles:
 	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) -I $(LOCALE_BASEDIR)/defines.inc $(srcdir)/install.rdf > $(DIST)/xpi-stage/$(L10N_XPI_NAME)/install.rdf
 	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $(LOCALE_BASEDIR)/lightning-l10n.js  > $(DIST)/xpi-stage/$(L10N_XPI_NAME)/$(PREF_DIR)/lightning-l10n.js
+
+# When repackaging lightning from the builder, platform.ini is not yet created.i
+# Recreate it from the application.ini bundled with the downloaded xpi.
+$(LIBXUL_DIST)/bin/platform.ini:
+	 echo "[Build]" >> $(LIBXUL_DIST)/bin/platform.ini
+	 
+	 echo -n "Milestone=" >> $(LIBXUL_DIST)/bin/platform.ini
+	 $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(DIST)/xpi-stage/$(XPI_NAME)/application.ini Gecko MaxVersion >> $(LIBXUL_DIST)/bin/platform.ini
+	 
+	 echo -n "SourceStamp=" >> $(LIBXUL_DIST)/bin/platform.ini
+	 $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(DIST)/xpi-stage/$(XPI_NAME)/application.ini Build SourceStamp >> $(LIBXUL_DIST)/bin/platform.ini
+	 
+	 echo -n "SourceRepository=" >> $(LIBXUL_DIST)/bin/platform.ini
+	 $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(DIST)/xpi-stage/$(XPI_NAME)/application.ini Build SourceRepository >> $(LIBXUL_DIST)/bin/platform.ini
+	 
+	 echo -n "BuildID=" >> $(LIBXUL_DIST)/bin/platform.ini
+	 $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(DIST)/xpi-stage/$(XPI_NAME)/application.ini App BuildID >> $(LIBXUL_DIST)/bin/platform.ini
+
+recreate-platformini: $(LIBXUL_DIST)/bin/platform.ini