Skip to content

Commit

Permalink
Backed out 2 changesets (bug 1436662) for build bustages on /installe…
Browse files Browse the repository at this point in the history
…r/windows. CLOSED TREE

Backed out changeset fcb756834abb (bug 1436662)
Backed out changeset d6bf22099e21 (bug 1436662)
  • Loading branch information
cristianbrindusan committed Apr 17, 2018
1 parent 77597e1 commit e14d9a2
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 43 deletions.
3 changes: 3 additions & 0 deletions browser/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# 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

Expand Down
1 change: 1 addition & 0 deletions browser/config/mozconfigs/linux64/tup
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_INSTALLER=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_PACKAGE=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
Expand Down
5 changes: 5 additions & 0 deletions browser/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ 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
18 changes: 18 additions & 0 deletions browser/installer/windows/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ 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::
Expand Down
23 changes: 21 additions & 2 deletions browser/locales/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ 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)
Expand Down Expand Up @@ -106,8 +107,26 @@ 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)
$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen ZIP_IN='$(ZIP_OUT)' installer
@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


langpack: langpack-$(AB_CD)

Expand All @@ -122,7 +141,7 @@ installers-%:
@$(MAKE) package-langpack-$*
@$(MAKE) repackage-zip-$*
ifeq (WINNT,$(OS_ARCH))
@$(MAKE) package-win32-installer AB_CD=$*
@$(MAKE) package-win32-installer AB_CD=$* MOZ_PKG_FORMAT=SFX7Z
endif
@echo 'repackaging done'

Expand Down
9 changes: 9 additions & 0 deletions build/moz-automation.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ endif
# corresponding the make target
tier_MOZ_AUTOMATION_BUILD_SYMBOLS = buildsymbols
tier_MOZ_AUTOMATION_L10N_CHECK = l10n-check
tier_MOZ_AUTOMATION_INSTALLER = installer
tier_MOZ_AUTOMATION_PACKAGE = package
tier_MOZ_AUTOMATION_PACKAGE_TESTS = package-tests
tier_MOZ_AUTOMATION_UPDATE_PACKAGING = update-packaging
Expand All @@ -44,6 +45,7 @@ moz_automation_symbols = \
MOZ_AUTOMATION_BUILD_SYMBOLS \
MOZ_AUTOMATION_UPLOAD_SYMBOLS \
MOZ_AUTOMATION_PACKAGE \
MOZ_AUTOMATION_INSTALLER \
MOZ_AUTOMATION_UPDATE_PACKAGING \
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES \
MOZ_AUTOMATION_L10N_CHECK \
Expand All @@ -55,15 +57,22 @@ MOZ_AUTOMATION_TIERS := $(foreach sym,$(moz_automation_symbols),$(if $(filter 1,
automation/uploadsymbols: automation/buildsymbols

automation/update-packaging: automation/package
automation/update-packaging: automation/installer

automation/l10n-check: automation/package
automation/l10n-check: automation/installer

automation/upload: automation/installer
automation/upload: automation/package
automation/upload: automation/package-tests
automation/upload: automation/buildsymbols
automation/upload: automation/update-packaging
automation/upload: automation/package-generated-sources

# The installer and packager all run stage-package, and may conflict
# with each other.
automation/installer: automation/package

automation/build: $(addprefix automation/,$(MOZ_AUTOMATION_TIERS))
@echo Automation steps completed.

Expand Down
1 change: 1 addition & 0 deletions build/mozconfig.automation
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mk_add_options "export MOZ_AUTOMATION_BUILD_SYMBOLS=${MOZ_AUTOMATION_BUILD_SYMBO
mk_add_options "export MOZ_AUTOMATION_L10N_CHECK=${MOZ_AUTOMATION_L10N_CHECK-1}"
mk_add_options "export MOZ_AUTOMATION_PACKAGE=${MOZ_AUTOMATION_PACKAGE-1}"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=${MOZ_AUTOMATION_PACKAGE_TESTS-1}"
mk_add_options "export MOZ_AUTOMATION_INSTALLER=${MOZ_AUTOMATION_INSTALLER-0}"
mk_add_options "export MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-0}"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=${MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES-1}"
mk_add_options "export MOZ_AUTOMATION_UPLOAD=${MOZ_AUTOMATION_UPLOAD-1}"
Expand Down
4 changes: 4 additions & 0 deletions build/mozconfig.win-common
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ if [ "x$IS_NIGHTLY" = "xyes" ]; then
MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-1}
fi

# Some builds (eg: Mulet) don't want the installer, so only set this if it
# hasn't already been set.
MOZ_AUTOMATION_INSTALLER=${MOZ_AUTOMATION_INSTALLER-1}

TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
export MAKECAB=$TOOLTOOL_DIR/makecab.exe
2 changes: 2 additions & 0 deletions config/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ 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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Many things aren't appropriate for a frontend-only build.
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_INSTALLER=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_PACKAGE=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Many things aren't appropriate for a frontend-only build.
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_INSTALLER=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_PACKAGE=0
MOZ_AUTOMATION_PACKAGE_TESTS=0
Expand Down
2 changes: 0 additions & 2 deletions toolkit/locales/l10n.mk
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ ifdef MOZ_CRASHREPORTER
$(RM) -rf '$(STAGEDIST)'/crashreporter.app
endif
endif
$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/helper.exe
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall

$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
(cd $(DIST)/l10n-stage; \
Expand Down
19 changes: 14 additions & 5 deletions toolkit/mozapps/installer/packager.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ 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
Expand Down Expand Up @@ -91,11 +105,6 @@ 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
Expand Down
62 changes: 28 additions & 34 deletions toolkit/mozapps/installer/windows/nsis/makensis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,54 +48,48 @@ $(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

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
$(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
$(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)
cp $(CONFIG_DIR)/stub.exe "$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"
chmod 0755 "$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"
endif
else
installer::
$(error ZIP_IN must be set when building installer)
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

# For building the uninstaller during the application build so it can be
# included for mar file generation.
$(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)
uninstaller::
$(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

Expand Down

0 comments on commit e14d9a2

Please sign in to comment.