From d1693c27c0d9658b655c158a9652f87683719325 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 7 Jan 2017 13:28:40 +0000 Subject: fix windows installer generation the windows installer package generation was not correctly parameterised which resulted in fetching resources from incorrect locations. Additionally the clean target was not removing generated installer output. --- frontends/windows/Makefile | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'frontends/windows/Makefile') diff --git a/frontends/windows/Makefile b/frontends/windows/Makefile index 41c8b8c6d..1b93e4cc7 100644 --- a/frontends/windows/Makefile +++ b/frontends/windows/Makefile @@ -3,10 +3,14 @@ # # This file is part of NetSurf + +VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c) +VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c) + + LDFLAGS += -L${GCCSDK_INSTALL_ENV}/lib CFLAGS += -I${GCCSDK_INSTALL_ENV}/include/ - $(eval $(call pkg_config_find_and_add,libcares,Cares)) $(eval $(call pkg_config_find_and_add,zlib,ZLib)) @@ -68,10 +72,25 @@ install-windows: package-windows: netsurf-installer.exe WIN_RES_OBJ := installer.nsi NetSurf.ico netsurf.png welcome.html default.css -WIN_RES_INS_OBJ := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(WIN_RES_OBJ)) $(OBJROOT)/messages +WIN_RES_INS_OBJ := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(WIN_RES_OBJ)) $(OBJROOT)/messages-en + +# deal with making installer generation verbose +ifeq ($(Q),) +NSIS_VERBOSE := 4 +else +NSIS_VERBOSE := 0 +endif -$(OBJROOT)/messages: resources/FatMessages - $(Q)$(SPLIT_MESSAGES) -l en -p win -f messages resources/FatMessages > $@ +# installer messages generation +$(OBJROOT)/messages-en: resources/FatMessages + $(VQ)echo "MSGSPLIT: Language: en Filter: win" + $(Q)$(SPLIT_MESSAGES) -l en -p win -f messages -o $@ $< netsurf-installer.exe: $(EXETARGET) $(WIN_RES_INS_OBJ) - makensis -V4 -NOCD $(FRONTEND_RESOURCES_DIR)/installer.nsi + $(VQ)echo "MAKENSIS: $@" + $(Q)makensis -V$(NSIS_VERBOSE) -NOCD -DOBJROOT=$(OBJROOT) -DRESDIR=$(FRONTEND_RESOURCES_DIR) -DVERSIONMAJOR=$(VERSION_MAJ) -DVERSIONMINOR=$(VERSION_MIN) -DOUTFNAME=$@ $(FRONTEND_RESOURCES_DIR)/installer.nsi + +clean-installer: + $(VQ)echo " CLEAN: netsurf-installer.exe" + $(Q)$(RM) netsurf-installer.exe +CLEANS += clean-installer -- cgit v1.2.3