michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk michael@0: michael@0: CONFIG_DIR = instgen michael@0: SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/firefox/7zSD.sfx michael@0: APP_VERSION := $(shell cat $(srcdir)/../../config/version.txt) michael@0: DEFINES += -DAPP_VERSION=$(APP_VERSION) michael@0: michael@0: INSTALLER_FILES = \ michael@0: app.tag \ michael@0: nsis/installer.nsi \ michael@0: nsis/uninstaller.nsi \ michael@0: nsis/stub.nsi \ michael@0: nsis/shared.nsh \ michael@0: stub.tag \ michael@0: $(NULL) michael@0: michael@0: ifdef MOZ_MAINTENANCE_SERVICE michael@0: INSTALLER_FILES += \ michael@0: nsis/maintenanceservice_installer.nsi \ michael@0: $(NULL) michael@0: endif michael@0: michael@0: BRANDING_FILES = \ michael@0: branding.nsi \ michael@0: appname.bmp \ michael@0: bgintro.bmp \ michael@0: clock.bmp \ michael@0: particles.bmp \ michael@0: pencil.bmp \ michael@0: pencil-rtl.bmp \ michael@0: wizHeader.bmp \ michael@0: wizHeaderRTL.bmp \ michael@0: wizWatermark.bmp \ michael@0: $(NULL) michael@0: michael@0: DEFINES += \ michael@0: -DAB_CD=$(AB_CD) \ michael@0: -DMOZ_APP_NAME=$(MOZ_APP_NAME) \ michael@0: -DMOZ_APP_DISPLAYNAME='${MOZ_APP_DISPLAYNAME}' \ michael@0: -DMOZILLA_VERSION=${MOZILLA_VERSION} \ michael@0: $(NULL) michael@0: michael@0: include $(topsrcdir)/config/config.mk michael@0: michael@0: ifdef LOCALE_MERGEDIR michael@0: PPL_LOCALE_ARGS = \ michael@0: --l10n-dir=$(LOCALE_MERGEDIR)/browser/installer \ michael@0: --l10n-dir=$(call EXPAND_LOCALE_SRCDIR,browser/locales)/installer \ michael@0: --l10n-dir=$(topsrcdir)/browser/locales/en-US/installer \ michael@0: $(NULL) michael@0: else michael@0: PPL_LOCALE_ARGS=$(call EXPAND_LOCALE_SRCDIR,browser/locales)/installer michael@0: endif michael@0: michael@0: OVERRIDE_DEFAULT_GOAL := installer michael@0: installer:: michael@0: $(MAKE) -C .. installer-stage michael@0: $(MAKE) $(CONFIG_DIR)/setup.exe michael@0: michael@0: # For building the uninstaller during the application build so it can be michael@0: # included for mar file generation. michael@0: uninstaller:: michael@0: $(RM) -r $(CONFIG_DIR) michael@0: $(MKDIR) $(CONFIG_DIR) michael@0: $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR) michael@0: $(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR) michael@0: $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \ michael@0: $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi) michael@0: $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ michael@0: --preprocess-locale $(topsrcdir) \ michael@0: $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR) michael@0: michael@0: # For building the maintenanceservice installer michael@0: ifdef MOZ_MAINTENANCE_SERVICE michael@0: maintenanceservice_installer:: michael@0: $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR) michael@0: $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \ michael@0: $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi) michael@0: $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ michael@0: --preprocess-locale $(topsrcdir) \ michael@0: $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR) michael@0: endif michael@0: michael@0: $(CONFIG_DIR)/setup.exe:: michael@0: $(RM) -r $(CONFIG_DIR) michael@0: $(MKDIR) $(CONFIG_DIR) michael@0: $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR) michael@0: $(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR) michael@0: $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \ michael@0: $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi) michael@0: $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ michael@0: --preprocess-locale $(topsrcdir) \ michael@0: $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR) michael@0: $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ michael@0: --preprocess-single-file $(topsrcdir) \ michael@0: $(PPL_LOCALE_ARGS) $(CONFIG_DIR) \ michael@0: nsisstrings.properties nsisstrings.nlf michael@0: $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ michael@0: --convert-utf8-utf16le \ michael@0: $(srcdir)/nsis/oneoff_en-US.nsh $(CONFIG_DIR)/oneoff_en-US.nsh michael@0: michael@0: GARBARGE_DIRS += instgen michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk