From 6c24a7636cfb5c6609061e8f4bb696ad8f1607d1 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 17 Nov 2008 14:43:38 +0100 Subject: [PATCH] Version now propagated to yaz-version.h + NSI installer. --- configure.ac | 10 +++++++--- include/yaz/yaz-version.h.in | 2 +- win/version.nsi.in | 2 ++ win/yaz.nsi | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 win/version.nsi.in diff --git a/configure.ac b/configure.ac index c282836..b8b1e37 100644 --- a/configure.ac +++ b/configure.ac @@ -387,10 +387,13 @@ AC_SUBST([YAZ_SRC_ROOT]) AC_SUBST([YAZ_BUILD_ROOT]) YAZ_SRC_ROOT=`cd ${srcdir}; pwd` YAZ_BUILD_ROOT=`pwd` - -dnl ------ windows version files -WIN_FILEVERSION=`echo $PACKAGE_VERSION|tr . ,`.1 +dnl +dnl ------ versioning +dnl +WIN_FILEVERSION=`echo $PACKAGE_VERSION | awk 'BEGIN { FS = "."; } { m = $4; printf "%d,%d,%d,%d", $1, $2, $3 == "" ? "0" : $3, $4 == "" ? "1" : $4;}'` AC_SUBST([WIN_FILEVERSION]) +YAZ_VERSION_HEX=`echo $PACKAGE_VERSION | awk 'BEGIN { FS = "."; } { printf "%x", ($1 * 256 + $2) * 256 + $3;}'` +AC_SUBST([YAZ_VERSION_HEX]) dnl dnl ------ Makefiles dnl @@ -413,6 +416,7 @@ etc/Makefile yaz-config yaz.pc Doxyfile +win/version.nsi include/yaz/yaz-version.h ],[ sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz-config > util/yaz-config && chmod +x yaz-config util/yaz-config diff --git a/include/yaz/yaz-version.h.in b/include/yaz/yaz-version.h.in index 93d495b..a56cc0a 100644 --- a/include/yaz/yaz-version.h.in +++ b/include/yaz/yaz-version.h.in @@ -33,7 +33,7 @@ #include #define YAZ_VERSION "@VERSION@" -#define YAZ_VERSIONL 0x030026 +#define YAZ_VERSIONL 0x@YAZ_VERSION_HEX@ #define YAZ_FILEVERSION @WIN_FILEVERSION@ diff --git a/win/version.nsi.in b/win/version.nsi.in new file mode 100644 index 0000000..5fa481b --- /dev/null +++ b/win/version.nsi.in @@ -0,0 +1,2 @@ +!define VERSION "@PACKAGE_VERSION@" + diff --git a/win/yaz.nsi b/win/yaz.nsi index 25b41f6..e67b81a 100644 --- a/win/yaz.nsi +++ b/win/yaz.nsi @@ -1,7 +1,7 @@ ; This file is part of the YAZ toolkit. ; Copyright (C) 1995-2008 Index Data -!define VERSION "3.0.38" +!include version.nsi ; Microsoft runtime CRT ; Uncomment exactly ONE section of the three below -- 1.7.10.4