Windows Installer - now extracts Oolite Version number from oolite-version.xcconfig (thanks Ahruman), taking into account X.Y and X.Y.Z version numbers.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1867 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Michael Werle 2008-11-17 19:04:27 +00:00
parent 0011b8ca9a
commit a68999c901
2 changed files with 19 additions and 8 deletions

View File

@ -1,6 +1,12 @@
VERSION=1.73.0
SVNREVISION=`svn info | grep Revision | cut -d ' ' -f 2`
BUILDTIME=`date \"+%Y.%m.%d %H.%M\"`
# Build version string, taking into account that 'VER_REV' may not be set
VERSION := $(shell cat src/Cocoa/oolite-version.xcconfig | cut -d '=' -f 2)
VER_MAJ := $(strip $(shell echo "${VERSION}" | cut -d '.' -f 1))
VER_MIN := $(strip $(shell echo "${VERSION}" | cut -d '.' -f 2))
VER_REV := $(strip $(shell echo "${VERSION}" | cut -d '.' -f 3))
VER_REV := $(if ${VER_REV},${VER_REV},0)
SVNREVISION := $(shell svn info | grep Revision | cut -d ' ' -f 2)
VER := $(shell echo "${VER_MAJ}.${VER_MIN}.${VER_REV}.${SVNREVISION}")
BUILDTIME := $(shell date "+%Y.%m.%d %H:%M")
LIBJS_SRC_DIR=deps/Cross-platform-deps/SpiderMonkey/js/src
@ -73,8 +79,11 @@ NSISVERSIONS=installers/win32/OoliteVersions.nsh
${NSISVERSIONS}:
@echo "; Version Definitions for Oolite" > $@
@echo "; NOTE - This file is auto-generated by the Makefile, any manual edits will be overwritten" >> $@
@echo "!define VERSION ${VERSION}" >> $@
@echo "!define VER_MAJ ${VER_MAJ}" >> $@
@echo "!define VER_MIN ${VER_MIN}" >> $@
@echo "!define VER_REV ${VER_REV}" >> $@
@echo "!define SVNREV ${SVNREVISION}" >> $@
@echo "!define VERSION ${VER}" >> $@
@echo "!define BUILDTIME \"${BUILDTIME}\"" >> $@
.PHONY: pkg-win

View File

@ -3,13 +3,16 @@
!include /NONFATAL "OoliteVersions.nsh"
!ifndef SVNREV
!warning "No SVN Revision supplied"
!define SVNREV 0
!endif
!ifndef VER
!ifndef VERSION
!warning "No Version information supplied"
!define VERSION 0.0.0.0
!endif
; Version number must be of format X.X.X.X.
; We use M.m.R.S: M-major, m-minor, R-revision, S-subversion
!define VER 1.73.0.${SVNREV}
!endif
!define VER ${VERSION}
!ifndef DST
!define DST ..\..\oolite.app
!endif
@ -20,7 +23,6 @@
!ifndef SNAPSHOT
!define EXTVER ""
!else
!define SVNREVSTR ".r${SVNREV}"
!define EXTVER "-dev"
!endif