Produce Windows installer, and do l10n repackaging during 'make package'.
authorFlorian Quèze <florian@instantbird.org>
Mon, 15 Mar 2010 21:06:12 +0100
changeset 14310 e7b218b1bf2c068055c4d22c19124feada23ecaa
parent 14309 80137658396615943b7d255ccdf7d8a1969fe824
child 14311 1d4718e5f4e63eef150c2f932e5561603e4537e4
push id9778
push userflorian@queze.net
push dateSun, 12 Jan 2014 18:25:45 +0000
treeherdercomm-central@f81a23bfefcd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
Produce Windows installer, and do l10n repackaging during 'make package'.
im/build.mk
im/config/mozconfigs/linux/mozconfig-release
im/config/mozconfigs/macosx/mozconfig-release
im/config/mozconfigs/win32/mozconfig-release
im/installer/windows/Makefile.in
im/locales/Makefile.in
--- a/im/build.mk
+++ b/im/build.mk
@@ -64,17 +64,23 @@ tier_app_dirs += \
   $(NULL)
 
 endif
 
 
 installer:
 	@$(MAKE) -C instantbird/installer installer
 
+SHIPPED_LOCALES_FILE = $(topsrcdir)/instantbird/locales/shipped-locales
+SHIPPED_LOCALES := $(shell if test -f $(SHIPPED_LOCALES_FILE); then cat $(SHIPPED_LOCALES_FILE); fi)
+
 package:
-	@$(MAKE) -C instantbird/installer
+	@$(MAKE) -C instantbird/installer libs installer
+ifdef L10NBASEDIR
+	$(foreach locale,$(SHIPPED_LOCALES),$(MAKE) -C instantbird/locales/ repack-$(locale) LOCALE_MERGEDIR=mergedir ;)
+endif
 
 install::
 	@$(MAKE) -C instantbird/installer install
 
 ib::
 	@$(MAKE) -C purple export libs
 	@$(MAKE) -C instantbird libs
--- a/im/config/mozconfigs/linux/mozconfig-release
+++ b/im/config/mozconfigs/linux/mozconfig-release
@@ -11,8 +11,9 @@ ac_add_options --enable-application=inst
 ac_add_options --enable-update-channel=release
 ac_add_options --enable-update-packaging
 ac_add_options --enable-optimize
 ac_add_options --disable-debug
 ac_add_options --disable-tests
 ac_add_options --disable-dbus
 ac_add_options --disable-necko-wifi
 ac_add_options --enable-official-branding
+ac_add_options --with-l10n-base=l10n
--- a/im/config/mozconfigs/macosx/mozconfig-release
+++ b/im/config/mozconfigs/macosx/mozconfig-release
@@ -16,8 +16,9 @@ mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/..
 
 ac_add_options --enable-application=instantbird
 ac_add_options --enable-update-channel=release
 ac_add_options --enable-update-packaging
 ac_add_options --enable-optimize
 ac_add_options --disable-debug
 ac_add_options --disable-tests
 ac_add_options --enable-official-branding
+ac_add_options --with-l10n-base=l10n
--- a/im/config/mozconfigs/win32/mozconfig-release
+++ b/im/config/mozconfigs/win32/mozconfig-release
@@ -15,8 +15,9 @@ ac_add_options --enable-application=inst
 ac_add_options --enable-update-channel=release
 ac_add_options --enable-optimize
 ac_add_options --disable-debug
 ac_add_options --disable-tests
 ac_add_options --enable-update-packaging
 ac_add_options --enable-jemalloc
 ac_add_options --with-windows-version=600
 ac_add_options --enable-official-branding
+ac_add_options --with-l10n-base=l10n
--- a/im/installer/windows/Makefile.in
+++ b/im/installer/windows/Makefile.in
@@ -42,16 +42,17 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/package-name.mk
 
+PKG_INST_PATH =
 CONFIG_DIR = instgen
 SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/instantbird/7zSD.sfx
 DEFINES += -DMOZ_APP_VERSION=$(MOZ_APP_VERSION)
 PRE_RELEASE_SUFFIX := $(shell $(PYTHON) $(topsrcdir)/mozilla/config/printprereleasesuffix.py $(MOZ_APP_VERSION))
 DEFINES += -DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)"
 
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
--- a/im/locales/Makefile.in
+++ b/im/locales/Makefile.in
@@ -131,16 +131,17 @@ ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOL
 MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
 MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 
 PACKAGER_NO_LIBS = 1
 include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/packager.mk
+PKG_INST_PATH =
 
 repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
 repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
 	@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
 	$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
 	if test ! -d $(_ABS_DIST)/$(PKG_INST_PATH); then \
 	  $(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH); \
 	fi
@@ -372,8 +373,32 @@ endif
 
 
 merge-%:
 ifdef LOCALE_MERGEDIR
 	$(RM) -rf $(LOCALE_MERGEDIR)
 	MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(srcdir)/l10n.ini $(L10NBASEDIR) $*
 endif
 	@echo
+
+IB_L10N_REPO_BASE = https://hg.instantbird.org/l10n
+MOZ_L10N_REPO_BASE = http://hg.mozilla.org/releases/l10n-mozilla-1.9.2
+
+checkout-%: AB_CD=$*
+checkout-%:
+	mkdir -p $(L10NBASEDIR)
+	if test ! -d $(L10NBASEDIR)/$(AB_CD); then \
+	  hg clone $(IB_L10N_REPO_BASE)/$(AB_CD) $(L10NBASEDIR)/$(AB_CD) ; \
+	else \
+	  hg pull -R $(L10NBASEDIR)/$(AB_CD) $(IB_L10N_REPO_BASE)/$(AB_CD) ; \
+	fi
+	if test ! -d $(L10NBASEDIR)/moz-$(AB_CD); then \
+	  hg clone $(MOZ_L10N_REPO_BASE)/$(AB_CD) $(L10NBASEDIR)/moz-$(AB_CD) ; \
+	else \
+	  hg pull -R $(L10NBASEDIR)/moz-$(AB_CD) $(MOZ_L10N_REPO_BASE)/$(AB_CD) ; \
+	fi
+	cp -r $(L10NBASEDIR)/moz-$(AB_CD)/{dom,extensions,netwerk,security,toolkit} $(L10NBASEDIR)/$(AB_CD)/
+
+repack-%: AB_CD=$*
+repack-%:
+	make checkout-$(AB_CD)
+	make merge-$(AB_CD)
+	make installers-$(AB_CD)