win-pvdrivers

changeset 1081:04fc4aca982c

Update version numbering to <major>.<minor>.<hg revision>[.<build number>]
author James Harper <james.harper@bendigoit.com.au>
date Mon Dec 09 13:35:19 2013 +1100 (2013-12-09)
parents e86ea7c3d8a4
children 8744ec2a3049
files common.inc common/include/gplpv_version.h makedist.bat
line diff
     1.1 --- a/common.inc	Mon Dec 09 13:34:19 2013 +1100
     1.2 +++ b/common.inc	Mon Dec 09 13:35:19 2013 +1100
     1.3 @@ -1,3 +1,12 @@
     1.4 +!IFDEF VERSION_MAJOR
     1.5 +C_DEFINES=$(C_DEFINES) -DVERSION_MAJOR=$(VERSION_MAJOR)
     1.6 +!ENDIF
     1.7 +!IFDEF VERSION_MINOR
     1.8 +C_DEFINES=$(C_DEFINES) -DVERSION_MINOR=$(VERSION_MINOR)
     1.9 +!ENDIF
    1.10 +!IFDEF REVISION
    1.11 +C_DEFINES=$(C_DEFINES) -DREVISION=$(REVISION)
    1.12 +!ENDIF
    1.13  !IFDEF BUILD_NUMBER
    1.14  C_DEFINES=$(C_DEFINES) -DBUILD_NUMBER=$(BUILD_NUMBER)
    1.15  !ENDIF
     2.1 --- a/common/include/gplpv_version.h	Mon Dec 09 13:34:19 2013 +1100
     2.2 +++ b/common/include/gplpv_version.h	Mon Dec 09 13:35:19 2013 +1100
     2.3 @@ -4,9 +4,14 @@
     2.4  #define EXPAND(x) STRINGIFY(x)
     2.5  #define STRINGIFY(x) #x
     2.6  
     2.7 -#ifdef BUILD_NUMBER
     2.8 -  #define VER_FILEVERSION             0,10,0,BUILD_NUMBER
     2.9 -  #define VER_FILEVERSION_STR         "GPLPV 0.10.0." EXPAND(BUILD_NUMBER)
    2.10 +#ifdef VERSION_MAJOR
    2.11 +  #ifdef BUILD_NUMBER
    2.12 +    #define VER_FILEVERSION             VERSION_MAJOR,VERSION_MINOR,REVISION,BUILD_NUMBER
    2.13 +    #define VER_FILEVERSION_STR         "GPLPV " EXPAND(VERSION_MAJOR) "." EXPAND(VERSION_MINOR) "." EXPAND(REVISION) "." EXPAND(BUILD_NUMBER)
    2.14 +  #else
    2.15 +    #define VER_FILEVERSION             VERSION_MAJOR,VERSION_MINOR,REVISION,0
    2.16 +    #define VER_FILEVERSION_STR         "GPLPV " EXPAND(VERSION_MAJOR) "." EXPAND(VERSION_MINOR) "." EXPAND(REVISION)
    2.17 +  #endif
    2.18  #else
    2.19    #define VER_FILEVERSION             0,0,0,0
    2.20    #define VER_FILEVERSION_STR         "GPLPV Unversioned"
     3.1 --- a/makedist.bat	Mon Dec 09 13:34:19 2013 +1100
     3.2 +++ b/makedist.bat	Mon Dec 09 13:35:19 2013 +1100
     3.3 @@ -2,11 +2,20 @@
     3.4  IF NOT EXIST set_ddk_path.bat ECHO >set_ddk_path.bat SET DDK_PATH=C:\WinDDK\7600.16385.0
     3.5  IF NOT EXIST set_ddk_path_2k.bat ECHO >set_ddk_path_2k.bat SET DDK_PATH_2K=C:\WinDDK\6001.18002
     3.6  
     3.7 -SET VERSION=0.11.0
     3.8 -SET BUILD_NUMBER=0
     3.9 +SET BUILD_NUMBER=1
    3.10 +SET VERSION_MAJOR=1
    3.11 +SET VERSION_MINOR=0
    3.12 +for /f %%i in ('hg identify --num -r .') do set REVISION=%%i
    3.13 +
    3.14 +hg status | findstr "^M" && GOTO TEST_BUILD
    3.15 +SET GPLPV_VERSION=%VERSION_MAJOR%.%VERSION_MINOR%.%REVISION%
    3.16 +GOTO DONE_VERSION
    3.17 +
    3.18 +:TEST_BUILD
    3.19  IF EXIST build_number.bat CALL build_number.bat
    3.20 +SET GPLPV_VERSION=%VERSION_MAJOR%.%VERSION_MINOR%.%REVISION%.%BUILD_NUMBER%
    3.21  
    3.22 -SET GPLPV_VERSION=%VERSION%.%BUILD_NUMBER%
    3.23 +:DONE_VERSION
    3.24  
    3.25  SET /A NEW_BUILD_NUMBER=%BUILD_NUMBER%+1
    3.26  ECHO >build_number.bat SET BUILD_NUMBER=%NEW_BUILD_NUMBER%