mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1436662: Package translated uninstaller; r=pike,mshal
The uninstaller was being built as a side-effect of building `setup.exe`. In Bug 1385227, that was moved from "somewhere" to part of the windows installer packaging, which happens after the zip and mar are generated. Since the installer we ship is actually repackaged from the zip[1], we stopped shipping translated uninstallers. This changes things around so that the uninstaller gets translated: - Explicitly build the uninstaller as part of the L10n repack step. - Use the same logic to build the installer locally as we do to create the ones we ship. [1] Except on Thunderbird Differential Revision: https://phabricator.services.mozilla.com/D672 --HG-- extra : rebase_source : 05fe935c1d2a9fbfeef786819bfe5913ed8ef862 extra : source : d6bf22099e2195dcb64c3c3d7700d3edd0850a3a
This commit is contained in:
parent
8e13c56b0c
commit
c8c9d47e92
@ -2,9 +2,6 @@
|
||||
# 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/.
|
||||
|
||||
installer:
|
||||
@$(MAKE) -C browser/installer installer
|
||||
|
||||
package:
|
||||
@$(MAKE) -C browser/installer
|
||||
|
||||
|
@ -173,11 +173,6 @@ package-compare::
|
||||
-diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
|
||||
rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt
|
||||
|
||||
installer::
|
||||
ifdef INSTALLER_DIR
|
||||
$(MAKE) -C $(INSTALLER_DIR)
|
||||
endif
|
||||
|
||||
ifdef ENABLE_MARIONETTE
|
||||
DEFINES += -DENABLE_MARIONETTE=1
|
||||
endif
|
||||
|
@ -44,24 +44,6 @@ else
|
||||
PPL_LOCALE_ARGS=$(call EXPAND_LOCALE_SRCDIR,browser/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 $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/,$(BRANDING_FILES)) $(CONFIG_DIR)
|
||||
$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
|
||||
$(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
|
||||
$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
|
||||
--preprocess-locale $(topsrcdir) \
|
||||
$(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)
|
||||
|
||||
# For building the maintenanceservice installer
|
||||
ifdef MOZ_MAINTENANCE_SERVICE
|
||||
maintenanceservice_installer::
|
||||
|
@ -34,7 +34,6 @@ MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ '
|
||||
endif
|
||||
|
||||
MOZ_SFX_PACKAGE=$(topsrcdir)/other-licenses/7zstub/firefox/7zSD.sfx
|
||||
MOZ_INSTALLER_PATH=$(topsrcdir)/browser/installer/windows
|
||||
|
||||
SEARCHPLUGINS_FILENAMES := $(or $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD))), $(error Missing search plugins))
|
||||
SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD)
|
||||
@ -107,26 +106,8 @@ endif
|
||||
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales chrome AB_CD=$*
|
||||
@$(MAKE) -C ../extensions/webcompat-reporter/locales chrome AB_CD=$*
|
||||
|
||||
package-win32-installer: WIN32_INSTALLER_OUT=$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
|
||||
package-win32-installer: $(SUBMAKEFILES)
|
||||
@echo 'Packaging $(WIN32_INSTALLER_OUT).'
|
||||
$(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'
|
||||
endif
|
||||
|
||||
$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen ZIP_IN='$(ZIP_OUT)' installer
|
||||
|
||||
langpack: langpack-$(AB_CD)
|
||||
|
||||
@ -141,7 +122,7 @@ installers-%:
|
||||
@$(MAKE) package-langpack-$*
|
||||
@$(MAKE) repackage-zip-$*
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
@$(MAKE) package-win32-installer AB_CD=$* MOZ_PKG_FORMAT=SFX7Z
|
||||
@$(MAKE) package-win32-installer AB_CD=$*
|
||||
endif
|
||||
@echo 'repackaging done'
|
||||
|
||||
|
@ -413,8 +413,6 @@ ifdef MOZ_DEBUG
|
||||
JAVAC_FLAGS += -g
|
||||
endif
|
||||
|
||||
CREATE_PRECOMPLETE_CMD = $(PYTHON) $(abspath $(MOZILLA_DIR)/config/createprecomplete.py)
|
||||
|
||||
# MDDEPDIR is the subdirectory where dependency files are stored
|
||||
MDDEPDIR := .deps
|
||||
|
||||
|
@ -129,6 +129,10 @@ ifdef MOZ_CRASHREPORTER
|
||||
'$(STAGEDIST)'/../MacOS/crashreporter.app/Contents/Resources/crashreporter.ini
|
||||
$(RM) -rf '$(STAGEDIST)'/crashreporter.app
|
||||
endif
|
||||
endif
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/helper.exe
|
||||
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
|
||||
endif
|
||||
|
||||
$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
|
||||
|
@ -13,20 +13,6 @@ ifndef PACKAGER_NO_LIBS
|
||||
libs:: make-package
|
||||
endif
|
||||
|
||||
installer-stage: prepare-package
|
||||
ifndef MOZ_PKG_MANIFEST
|
||||
$(error MOZ_PKG_MANIFEST unspecified!)
|
||||
endif
|
||||
@rm -rf $(DEPTH)/installer-stage $(DIST)/xpt
|
||||
@echo 'Staging installer files...'
|
||||
@$(NSINSTALL) -D $(DEPTH)/installer-stage/core
|
||||
@cp -av $(DIST)/$(MOZ_PKG_DIR)$(_BINPATH)/. $(DEPTH)/installer-stage/core
|
||||
@(cd $(DEPTH)/installer-stage/core && $(CREATE_PRECOMPLETE_CMD))
|
||||
ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
|
||||
# The && true is necessary to make sure Pymake spins a shell
|
||||
$(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(DEPTH)/installer-stage && true
|
||||
endif
|
||||
|
||||
export USE_ELF_HACK ELF_HACK_FLAGS
|
||||
|
||||
# Override the value of OMNIJAR_NAME from config.status with the value
|
||||
@ -105,6 +91,11 @@ make-package-internal: prepare-package make-sourcestamp-file make-buildinfo-file
|
||||
|
||||
make-package: FORCE
|
||||
$(MAKE) make-package-internal
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
ifeq ($(MOZ_PKG_FORMAT),ZIP)
|
||||
$(MAKE) -C windows ZIP_IN='$(ABS_DIST)/$(PACKAGE)' installer
|
||||
endif
|
||||
endif
|
||||
$(TOUCH) $@
|
||||
|
||||
GARBAGE += make-package
|
||||
|
@ -48,48 +48,54 @@ $(CONFIG_DIR)/setup.exe::
|
||||
cd $(CONFIG_DIR) && $(MAKENSISU) $(MAKENSISU_FLAGS) installer.nsi
|
||||
ifdef MOZ_STUB_INSTALLER
|
||||
cd $(CONFIG_DIR) && $(MAKENSISU) $(MAKENSISU_FLAGS) stub.nsi
|
||||
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
|
||||
$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) $(CONFIG_DIR)/setup-stub.exe
|
||||
endif
|
||||
$(MAKE) $(CONFIG_DIR)/7zSD.sfx
|
||||
cd $(CONFIG_DIR) && $(CYGWIN_WRAPPER) $(7Z) a -t7z $(ABS_CONFIG_DIR)/stub.7z setup-stub.exe -mx -m0=BCJ2 -m1=LZMA:d21 -m2=LZMA:d17 -m3=LZMA:d17 -mb0:1 -mb0s1:2 -mb0s2:3
|
||||
cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/stub.tag $(CONFIG_DIR)/stub.7z > "$(CONFIG_DIR)/stub.exe"
|
||||
ifdef MOZ_EXTERNAL_SIGNING_FORMAT_STUB
|
||||
$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT_STUB),-f $(f)) $(CONFIG_DIR)/stub.exe
|
||||
endif
|
||||
endif
|
||||
# Support for building the uninstaller when repackaging locales
|
||||
ifeq ($(CONFIG_DIR),l10ngen)
|
||||
cd $(CONFIG_DIR) && $(MAKENSISU) $(MAKENSISU_FLAGS) uninstaller.nsi
|
||||
endif
|
||||
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
|
||||
$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) "$@"
|
||||
endif
|
||||
|
||||
$(CONFIG_DIR)/7zSD.sfx:
|
||||
$(CYGWIN_WRAPPER) upx --best -o $(CONFIG_DIR)/7zSD.sfx $(SFX_MODULE)
|
||||
|
||||
installer::
|
||||
$(INSTALL) $(CONFIG_DIR)/setup.exe $(DEPTH)/installer-stage
|
||||
cd $(DEPTH)/installer-stage && $(CYGWIN_WRAPPER) $(7Z) a -r -t7z $(ABS_CONFIG_DIR)/app.7z -mx -m0=BCJ2 -m1=LZMA:d25 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3
|
||||
$(MAKE) $(CONFIG_DIR)/7zSD.sfx
|
||||
$(NSINSTALL) -D $(DIST)/$(PKG_INST_PATH)
|
||||
cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/app.tag $(CONFIG_DIR)/app.7z > "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
|
||||
chmod 0755 "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
|
||||
ifdef MOZ_STUB_INSTALLER
|
||||
cp $(CONFIG_DIR)/stub.exe "$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"
|
||||
chmod 0755 "$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"
|
||||
endif
|
||||
ifdef ZIP_IN
|
||||
installer:: $(CONFIG_DIR)/setup.exe $(ZIP_IN)
|
||||
@echo 'Packaging $(WIN32_INSTALLER_OUT).'
|
||||
$(NSINSTALL) -D '$(ABS_DIST)/$(PKG_INST_PATH)'
|
||||
$(MOZILLA_DIR)/mach repackage installer \
|
||||
-o '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe' \
|
||||
--package-name firefox \
|
||||
--package '$(ZIP_IN)' \
|
||||
--tag $(topsrcdir)/browser/installer/windows/app.tag \
|
||||
--setupexe $(CONFIG_DIR)/setup.exe \
|
||||
--sfx-stub $(SFX_MODULE)
|
||||
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
|
||||
$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
|
||||
endif
|
||||
ifdef MOZ_STUB_INSTALLER
|
||||
$(MOZILLA_DIR)/mach repackage installer \
|
||||
-o '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe' \
|
||||
--tag $(topsrcdir)/browser/installer/windows/stub.tag \
|
||||
--setupexe $(CONFIG_DIR)/setup-stub.exe \
|
||||
--sfx-stub $(SFX_MODULE)
|
||||
endif
|
||||
else
|
||||
installer::
|
||||
$(error ZIP_IN must be set when building installer)
|
||||
endif
|
||||
|
||||
# For building the uninstaller during the application build so it can be
|
||||
# included for mar file generation.
|
||||
uninstaller::
|
||||
$(CONFIG_DIR)/helper.exe:
|
||||
$(RM) -r $(CONFIG_DIR)
|
||||
$(MKDIR) $(CONFIG_DIR)
|
||||
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
|
||||
$(INSTALL) $(addprefix $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/,$(BRANDING_FILES)) $(CONFIG_DIR)
|
||||
$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
|
||||
$(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
|
||||
$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
|
||||
--preprocess-locale $(topsrcdir) \
|
||||
$(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)
|
||||
$(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR)
|
||||
$(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/Plugins/,$(CUSTOM_NSIS_PLUGINS)) $(CONFIG_DIR)
|
||||
cd $(CONFIG_DIR) && $(MAKENSISU) $(MAKENSISU_FLAGS) uninstaller.nsi
|
||||
|
||||
uninstaller:: $(CONFIG_DIR)/helper.exe
|
||||
$(NSINSTALL) -D $(DIST)/bin/uninstall
|
||||
cp $(CONFIG_DIR)/helper.exe $(DIST)/bin/uninstall
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user