2 :: Writes version numbers from B
&I into version.h
for use by version.rc.
6 :: Set default values
for environment variables
if not set by B
&I
7 IF "%OBJROOT%"=="" SET OBJROOT
=.
8 IF "%RC_PROJECTSOURCEVERSION%"=="" SET RC_PROJECTSOURCEVERSION
=0.0
9 IF "%RC_PROJECTBUILDVERSION%"=="" SET RC_PROJECTBUILDVERSION
=0
11 :: Get version numbers from environment variables
14 FOR /F
"tokens=1* eol= delims=." %%i IN
("%RC_PROJECTSOURCEVERSION%") DO (
16 IF NOT "%%j"=="" SET patch=%%j
18 SET build
=%RC_PROJECTBUILDVERSION%
20 ECHO version
%major% .
%minor% .
%patch% .
%build%
23 ECHO // This file is automatically generated by version.bat.
> "%OBJROOT%\version.h"
24 ECHO // DO NOT EDIT
>> "%OBJROOT%\version.h"
25 ECHO #define major
%major% >> "%OBJROOT%\version.h"
26 ECHO #define minor
%minor% >> "%OBJROOT%\version.h"
27 ECHO #define
patch %patch% >> "%OBJROOT%\version.h"
28 ECHO #define build
%build% >> "%OBJROOT%\version.h"
29 ECHO #define string
"%major%,%minor%,%patch%,%build%" >> "%OBJROOT%\version.h"