diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in index dac4d470e4d48..90854ccded86e 100644 --- a/browser/locales/Makefile.in +++ b/browser/locales/Makefile.in @@ -19,6 +19,8 @@ PWD := $(CURDIR) # These are defaulted to be compatible with the files the wget-en-US target # pulls. You may override them if you provide your own files. ZIP_IN ?= $(ABS_DIST)/$(PACKAGE) +WIN32_INSTALLER_IN ?= $(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe +RETRIEVE_WINDOWS_INSTALLER = 1 MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox.mozilla.org # For Nightly, we know where to get the builds from to do local repacks @@ -41,6 +43,21 @@ endif MOZ_SFX_PACKAGE=$(topsrcdir)/other-licenses/7zstub/firefox/7zSD.sfx MOZ_INSTALLER_PATH=$(topsrcdir)/browser/installer/windows +ifeq (WINNT,$(OS_ARCH)) +UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \ + $(NSINSTALL) -D $(STAGEDIST)/uninstall; \ + cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \ + $(RM) $(ABS_DIST)/l10n-stage/setup.exe; \ + cp ../installer/windows/l10ngen/setup.exe $(ABS_DIST)/l10n-stage; \ + $(NULL) + +STUB_HOOK = $(NSINSTALL) -D '$(ABS_DIST)/$(PKG_INST_PATH)'; \ + $(RM) '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \ + cp ../installer/windows/l10ngen/stub.exe '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \ + chmod 0755 '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \ + $(NULL) +endif + SEARCHPLUGINS_FILENAMES := $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD))) SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD) SEARCHPLUGINS_TARGET := libs searchplugins @@ -118,25 +135,26 @@ ifdef NIGHTLY_BUILD @$(MAKE) -C ../extensions/webcompat-reporter/locales chrome AB_CD=$* endif -package-win32-installer: WIN32_INSTALLER_OUT=$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe -package-win32-installer: MOZ_PKG_FORMAT=SFX7Z -package-win32-installer: $(SUBMAKEFILES) - @echo 'Packaging $(WIN32_INSTALLER_OUT).' +repackage-win32-installer: WIN32_INSTALLER_OUT=$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe +repackage-win32-installer: $(call ESCAPE_WILDCARD,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD) + @echo 'Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT).' + $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx - $(RM) -r $(STAGEDIST)/uninstall - $(NSINSTALL) -D $(STAGEDIST)/uninstall - cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall - $(RM) $(ABS_DIST)/l10n-stage/setup.exe - cp ../installer/windows/l10ngen/setup.exe $(ABS_DIST)/l10n-stage - $(NSINSTALL) -D '$(ABS_DIST)/$(PKG_INST_PATH)' - (cd $(DIST)/l10n-stage; \ - $(MAKE_PACKAGE)) - mv -f '$(DIST)/l10n-stage/$(PACKAGE)' '$(WIN32_INSTALLER_OUT)' - if test -f '$(DIST)/l10n-stage/$(PACKAGE).asc'; then mv -f '$(DIST)/l10n-stage/$(PACKAGE).asc' '$(WIN32_INSTALLER_OUT).asc'; fi -ifdef MOZ_STUB_INSTALLER - $(RM) '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe' - cp ../installer/windows/l10ngen/stub.exe '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe' - chmod 0755 '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe' + $(MAKE) repackage-zip \ + AB_CD=$(AB_CD) \ + MOZ_PKG_FORMAT=SFX7Z \ + ZIP_IN='$(WIN32_INSTALLER_IN)' \ + ZIP_OUT='$(WIN32_INSTALLER_OUT)' \ + SFX_HEADER='$(PWD)/../installer/windows/l10ngen/7zSD.sfx \ + $(topsrcdir)/browser/installer/windows/app.tag' + +ifeq (WINNT,$(OS_ARCH)) +repackage-win32-installer-%: unpack + @$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN='$(WIN32_INSTALLER_IN)' + +repackage-zip-%: repackage-win32-installer-% +else +repackage-win32-installer-%: ; endif @@ -147,14 +165,7 @@ langpack: langpack-$(AB_CD) # tinderbox scripts. Alter it with caution. installers-%: IS_LANGUAGE_REPACK=1 -installers-%: - @$(MAKE) clobber-$* - @$(MAKE) libs-$* - @$(MAKE) package-langpack-$* - @$(MAKE) repackage-zip-$* -ifeq (WINNT,$(OS_ARCH)) - @$(MAKE) package-win32-installer AB_CD=$* -endif +installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-% @echo 'repackaging done' ifdef MOZ_UPDATER @@ -201,7 +212,7 @@ l10n-check:: @# not being reset, overwriting the value they would get with MOZ_SIMPLE_PACKAGE_NAME @# reset. $(MAKE) installers-x-test L10NBASEDIR='$(PWD)' \ - ZIP_IN='$(ZIP_IN)' MOZ_SIMPLE_PACKAGE_NAME= + ZIP_IN='$(ZIP_IN)' WIN32_INSTALLER_IN='$(WIN32_INSTALLER_IN)' MOZ_SIMPLE_PACKAGE_NAME= $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/unpack.py $(DIST)/l10n-stage/$(MOZ_PKG_DIR)$(_RESPATH) (cd $(DIST)/l10n-stage && test $$(cat $(MOZ_PKG_DIR)$(_RESPATH)/update.locale) = x-test) @# package langpack as web extension, too, run some tests on it diff --git a/mobile/android/locales/Makefile.in b/mobile/android/locales/Makefile.in index 39fdf4be971de..19406aeb943ab 100644 --- a/mobile/android/locales/Makefile.in +++ b/mobile/android/locales/Makefile.in @@ -59,10 +59,7 @@ endif # builds. It is called from the tinderbox scripts. Alter it with caution. installers-%: IS_LANGUAGE_REPACK=1 -installers-%: - @$(MAKE) clobber-stage - @$(MAKE) libs-$* - @$(MAKE) repackage-zip-$* +installers-%: clobber-stage repackage-zip-% @echo 'repackaging done' # When we unpack fennec on MacOS X the platform.ini and application.ini are in slightly diff --git a/toolkit/locales/l10n.mk b/toolkit/locales/l10n.mk index fdd5245b578f8..9706b945e36e0 100644 --- a/toolkit/locales/l10n.mk +++ b/toolkit/locales/l10n.mk @@ -111,8 +111,22 @@ endif # may be overridden if necessary. MOZDEPTH ?= $(DEPTH) +ifdef MOZ_MAKE_COMPLETE_MAR +MAKE_COMPLETE_MAR = 1 +ifeq ($(OS_ARCH), WINNT) +ifneq ($(MOZ_PKG_FORMAT), SFX7Z) +MAKE_COMPLETE_MAR = +endif +endif +endif repackage-zip: UNPACKAGE='$(ZIP_IN)' -repackage-zip: +repackage-zip: libs-$(AB_CD) +# call a hook for apps to put their uninstall helper.exe into the package + $(UNINSTALLER_PACKAGE_HOOK) +# call a hook for apps to build the stub installer +ifdef MOZ_STUB_INSTALLER + $(STUB_HOOK) +endif $(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/l10n-repack.py $(STAGEDIST) $(DIST)/xpi-stage/locale-$(AB_CD) \ $(MOZ_PKG_EXTRAL10N) \ $(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES))) @@ -132,9 +146,9 @@ endif endif $(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH) - (cd $(DIST)/l10n-stage; \ - $(MAKE_PACKAGE)) -ifdef MOZ_MAKE_COMPLETE_MAR + cd $(DIST)/l10n-stage; \ + $(MAKE_PACKAGE) +ifdef MAKE_COMPLETE_MAR $(MAKE) -C $(MOZDEPTH)/tools/update-packaging full-update AB_CD=$(AB_CD) \ PACKAGE_BASE_DIR='$(ABS_DIST)/l10n-stage' endif @@ -193,18 +207,13 @@ endif $(RM) -rf $(REAL_LOCALE_MERGEDIR) $(MOZILLA_DIR)/mach compare-locales --l10n-base $(L10NBASEDIR) --merge-dir $(REAL_LOCALE_MERGEDIR) $* +langpack-%: LANGPACK_FILE=$(ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi +langpack-%: AB_CD=$* +langpack-%: XPI_NAME=locale-$* langpack-%: IS_LANGUAGE_REPACK=1 langpack-%: IS_LANGPACK=1 -langpack-%: AB_CD=$* -langpack-%: +langpack-%: libs-% @echo 'Making langpack $(LANGPACK_FILE)' - @$(MAKE) libs-$(AB_CD) - @$(MAKE) package-langpack-$(AB_CD) - -package-langpack-%: LANGPACK_FILE=$(ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi -package-langpack-%: XPI_NAME=locale-$* -package-langpack-%: AB_CD=$* -package-langpack-%: $(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH) ifdef WEBEXT_LANGPACKS $(call py_action,langpack_manifest,--locales $(AB_CD) --min-app-ver $(MOZ_APP_VERSION) --max-app-ver $(MOZ_APP_MAXVERSION) --app-name "$(MOZ_APP_DISPLAYNAME)" --defines $(NEW_APP_DEFINES) --input $(DIST)/xpi-stage/locale-$(AB_CD)) diff --git a/tools/update-packaging/Makefile.in b/tools/update-packaging/Makefile.in index 6f0b019ac251c..2f59a18ecc6b8 100644 --- a/tools/update-packaging/Makefile.in +++ b/tools/update-packaging/Makefile.in @@ -28,6 +28,9 @@ full-update:: complete-patch ifeq ($(OS_TARGET), WINNT) MOZ_PKG_FORMAT := SFX7Z UNPACKAGE = '$(subst $(DIST),$(ABS_DIST),$(INSTALLER_PACKAGE))' +ifdef AB_CD +UNPACKAGE = '$(PACKAGE_BASE_DIR)/$(PACKAGE)' +endif endif include $(topsrcdir)/config/rules.mk @@ -43,13 +46,10 @@ endif dir-stage := $(call mkdir_deps,$(STAGE_DIR)) complete-patch:: $(dir-stage) -# unpack the windows installer, unless we're an l10n repack, we just packed this -ifndef IS_LANGUAGE_REPACK ifeq ($(OS_TARGET), WINNT) test -f $(UNPACKAGE) $(RM) -rf '$(PACKAGE_DIR)' cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE) -endif endif MAR=$(MAR_BIN) \ MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \