Bug 1940280 - Part 5: Update Makefiles to make everything r=nalexander,browser-installer-reviewers

Note that this builds the test_stub.exe exectuable into
$(topobjdir)/dist/bin

Differential Revision: https://phabricator.services.mozilla.com/D233407
This commit is contained in:
Chris DuPuis
2025-02-21 16:17:24 +00:00
parent a1303fe432
commit 27d7ebc75e
4 changed files with 53 additions and 4 deletions

View File

@@ -10,7 +10,19 @@ ifdef MAKENSISU
# uninstaller is included with the application for mar file generation.
libs::
$(MAKE) -C installer/windows uninstaller
ifdef ENABLE_TESTS
$(MAKE) -C installer/windows install_deps
endif #ENABLE_TESTS
ifdef MOZ_MAINTENANCE_SERVICE
$(MAKE) -C installer/windows maintenanceservice_installer
endif
endif
ifdef ENABLE_TESTS
tools::
# test_stub.exe is used for testing installer functionality.
$(MAKE) -C installer/windows/nsis test_stub_installer
endif #ENABLE_TESTS
endif #MAKENSISU

View File

@@ -22,7 +22,10 @@ INSTALLER_FILES = \
nsis/installer.nsi \
nsis/uninstaller.nsi \
nsis/stub.nsi \
nsis/stub.nsh \
nsis/stub_shared_defs.nsh \
nsis/shared.nsh \
nsis/test_stub.nsi \
stub.tag \
$(NULL)
@@ -55,9 +58,7 @@ else
PPL_LOCALE_ARGS=$(call EXPAND_LOCALE_SRCDIR,browser/locales)/installer
endif
$(CONFIG_DIR)/setup.exe::
$(RM) -r $(CONFIG_DIR)
$(MKDIR) $(CONFIG_DIR)
install_deps:
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/,$(BRANDING_FILES)) $(CONFIG_DIR)
$(call py_action,preprocessor defines.nsi,-Fsubstitution $(DEFINES) $(ACDEFINES) \
@@ -73,6 +74,12 @@ $(CONFIG_DIR)/setup.exe::
$(PYTHON3) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
--convert-utf8-utf16le \
$(srcdir)/nsis/extensionsLocale.nsh $(CONFIG_DIR)/extensionsLocale.nsh
$(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/,$(CUSTOM_UI)) $(CONFIG_DIR)
$(CONFIG_DIR)/setup.exe::
$(RM) -r $(CONFIG_DIR)
$(MKDIR) $(CONFIG_DIR)
$(MAKE) install_deps
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk

View File

@@ -0,0 +1,29 @@
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
include $(topsrcdir)/config/config.mk
VPATH = @srcdir@
CONFIG_DIR = $(topobjdir)/browser/installer/windows/instgen
BIN_UTIL_DIR = $(topobjdir)/dist/bin
TEST_STUB_INSTALLER_DEPS := \
test_stub.nsi \
stub.nsh \
stub_shared_defs.nsh \
$(topsrcdir)/toolkit/mozapps/installer/windows/nsis/common.nsh \
shared.nsh \
defines.nsi.in \
$(NULL)
test_stub_installer:
ifdef ENABLE_TESTS
$(MAKE) $(BIN_UTIL_DIR)/test_stub_installer.exe
else
@echo Skipping build of test_stub_installer.exe since tests are not enabled
endif # ENABLE_TESTS
$(BIN_UTIL_DIR)/test_stub_installer.exe: $(TEST_STUB_INSTALLER_DEPS)
$(MAKE) -C .. install_deps
cd $(CONFIG_DIR) && $(MAKENSISU) -nocd -- $(CONFIG_DIR)/test_stub.nsi
cp $(CONFIG_DIR)/test_stub_installer.exe $(BIN_UTIL_DIR)/test_stub_installer.exe

View File

@@ -47,6 +47,7 @@ TEST_HARNESS_BINS = [
"screenshot",
"screentopng",
"ssltunnel",
"test_stub_installer",
"xpcshell",
"plugin-container",
]