mail/installer/windows/Makefile.in
author tbirdbld
Fri, 06 Jan 2017 09:00:50 -0500
branchTHUNDERBIRD510b1_2017010608_RELBRANCH
changeset 26168 aa4091e82224f4ad37c099f7dda6976ce9335080
parent 22976 031248ef4037cf302a696667bddef9d8e2a0b85e
child 29160 84893db274a435ec11faa19c102efc9cd4780391
permissions -rw-r--r--
Added THUNDERBIRD_51_0b1_RELEASE THUNDERBIRD_51_0b1_BUILD5 tag(s) for changeset 87320f336d23. DONTBUILD CLOSED TREE a=release

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/package-name.mk

CONFIG_DIR = instgen
SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/thunderbird/7zSD.sfx

DEFINES += -DMOZ_APP_VERSION=$(MOZ_APP_VERSION)
PRE_RELEASE_SUFFIX := ""
DEFINES += -DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)"

ifdef MOZ_UPDATER
DEFINES += -DMOZ_UPDATER=1
endif

INSTALLER_FILES = \
	app.tag \
	nsis/installer.nsi \
	nsis/uninstaller.nsi \
	nsis/shared.nsh \
	$(NULL)

ifdef MOZ_MAINTENANCE_SERVICE
INSTALLER_FILES += \
	nsis/maintenanceservice_installer.nsi \
	$(NULL)
endif


BRANDING_FILES = \
	branding.nsi \
	wizHeader.bmp \
	wizHeaderRTL.bmp \
	wizWatermark.bmp \
	$(NULL)

DEFINES += \
	-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
	-DMOZ_APP_DISPLAYNAME='${MOZ_APP_DISPLAYNAME}' \
	-DMOZILLA_VERSION=${MOZILLA_VERSION} \
	$(NULL)

include $(topsrcdir)/config/config.mk

ifdef LOCALE_MERGEDIR
PPL_LOCALE_ARGS = \
  --l10n-dir=$(LOCALE_MERGEDIR)/mail/installer \
  --l10n-dir=$(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer \
  --l10n-dir=$(topsrcdir)/mail/locales/en-US/installer \
  $(NULL)
else
PPL_LOCALE_ARGS=$(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer
endif

OVERRIDE_DEFAULT_GOAL := installer
installer::
	$(MAKE) -C .. installer-stage
	$(MAKE) $(CONFIG_DIR)/setup.exe

# For building the uninstaller during the application build so it can be
# included for mar file generation.
uninstaller::
	$(RM) -r $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
	$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
	  --preprocess-locale $(MOZILLA_SRCDIR) \
	  $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)

# For building the maintenanceservice installer
ifdef MOZ_MAINTENANCE_SERVICE
maintenanceservice_installer::
	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
	$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
	  --preprocess-locale $(MOZILLA_SRCDIR) \
	  $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)
endif

$(CONFIG_DIR)/setup.exe::
	$(RM) -r $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
	$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
	  --preprocess-locale $(MOZILLA_SRCDIR) \
	  $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)

include $(topsrcdir)/config/rules.mk
include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/makensis.mk