mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Try to automate the version number used in the windows installer
This adds a Makefile target to create the .nsi file from a template and to hopefully create the right strings to magically get the correct version strings in the Windows installer Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
87798b328e
commit
002fe45dfd
3 changed files with 15 additions and 3 deletions
12
Makefile
12
Makefile
|
|
@ -27,6 +27,7 @@ XSLTFILES = xslt/*.xslt
|
|||
|
||||
UNAME := $(shell $(CC) -dumpmachine 2>&1 | grep -E -o "linux|darwin|win")
|
||||
VERSION_STRING := $(shell git describe --tags --abbrev=12 || echo "v$(VERSION)")
|
||||
PRODVERSION_STRING := $(shell git describe --tags --abbrev=12 | sed 's/v\([0-9]*\)\.\([0-9]*\)-\([0-9]*\)-.*/\1.\2.\3.0/' || echo "$(VERSION).0.0")
|
||||
|
||||
# find libdivecomputer
|
||||
# First deal with the cross compile environment and with Mac.
|
||||
|
|
@ -125,6 +126,10 @@ else
|
|||
OSSUPPORT_CFLAGS = $(GTK2CFLAGS)
|
||||
WINDOWSSTAGING = ./packaging/windows
|
||||
WINMSGDIRS=$(addprefix share/locale/,$(shell ls po/*.po | sed -e 's/po\/\(..\)_.*/\1\/LC_MESSAGES/'))
|
||||
NSIINPUTFILE = $(WINDOWSSTAGING)/subsurface.nsi.in
|
||||
NSIFILE = $(WINDOWSSTAGING)/subsurface.nsi
|
||||
MAKENSIS = makensis
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(LIBXSLT)),)
|
||||
|
|
@ -209,6 +214,13 @@ install-cross-windows: $(NAME)
|
|||
$(INSTALL) $$LOC/subsurface.mo $(WINDOWSSTAGING)/$$LOC/subsurface.mo; \
|
||||
done
|
||||
|
||||
create-windows-installer: $(NAME) $(NSIFILE) install-cross-windows
|
||||
$(MAKENSIS) $(NSIFILE)
|
||||
|
||||
$(NSIFILE): $(NSIINPUTFILE)
|
||||
$(shell cat $(NSIINPUTFILE) | sed -e 's/VERSIONTOKEN/$(VERSION_STRING)/;s/PRODVTOKEN/$(PRODVERSION_STRING)/' > $(NSIFILE))
|
||||
|
||||
|
||||
update-po-files:
|
||||
xgettext -o po/subsurface-new.pot -s -k_ -kN_ --keyword=C_:1c,2 --add-comments="++GETTEXT" *.c
|
||||
for i in po/*.po; do \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue