summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rwxr-xr-xpackaging/windows/mingw-make.sh2
-rw-r--r--packaging/windows/subsurface.nsi.in (renamed from packaging/windows/subsurface.nsi)4
3 files changed, 15 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 980da391a..660c2ff8a 100644
--- a/Makefile
+++ b/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 \
diff --git a/packaging/windows/mingw-make.sh b/packaging/windows/mingw-make.sh
index ccd418c6f..7416d1d59 100755
--- a/packaging/windows/mingw-make.sh
+++ b/packaging/windows/mingw-make.sh
@@ -12,4 +12,4 @@ make CC=i686-w64-mingw32-gcc \
PKG_CONFIG_PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/ \
CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw/ \
XSLTCONFIG=/usr/i686-w64-mingw32/sys-root/mingw/bin/xslt-config \
- XML2CONFIG=/usr/i686-w64-mingw32/sys-root/mingw/bin/xml2-config NAME=subsurface.exe install-cross-windows
+ XML2CONFIG=/usr/i686-w64-mingw32/sys-root/mingw/bin/xml2-config NAME=subsurface.exe install-cross-windows $@
diff --git a/packaging/windows/subsurface.nsi b/packaging/windows/subsurface.nsi.in
index 0dcf18939..5fdad4fff 100644
--- a/packaging/windows/subsurface.nsi
+++ b/packaging/windows/subsurface.nsi.in
@@ -18,10 +18,10 @@
# General
# Program version
- !define SUBSURFACE_VERSION "2.1"
+ !define SUBSURFACE_VERSION "VERSIONTOKEN"
# VIProductVersion requires version in x.x.x.x format
- !define SUBSURFACE_VIPRODUCTVERSION "2.1.0.0"
+ !define SUBSURFACE_VIPRODUCTVERSION "PRODVTOKEN"
# Installer name and filename
Name "Subsurface"