forked from CobaltFusion/DebugViewPP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateBuildNr.cmd
More file actions
26 lines (23 loc) · 857 Bytes
/
Copy pathUpdateBuildNr.cmd
File metadata and controls
26 lines (23 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@echo off
echo UpdateBuildNr.cmd updating %1
echo UpdateBuildNr.cmd updating %2
set file=%1
set xmlfile=%2
for /f "tokens=3,4,5,* delims=, " %%i in (%file%) do (
set major=%%i
set minor=%%j
set inc=%%k
set /a buildnr=%%l+1
goto break
)
:break
echo #define VERSION %major%,%minor%,%inc%,%buildnr% > %file%
echo #define VERSION_STR "%major%.%minor%.%inc%.%buildnr%" >> %file%
echo ^<?xml version="1.0" encoding="utf-8"?^> > %xmlfile%
echo ^<Include^> >> %xmlfile%
echo ^<?define ProductVersion.Major="%major%" ?^> >> %xmlfile%
echo ^<?define ProductVersion.Minor="%minor%" ?^> >> %xmlfile%
echo ^<?define ProductVersion.Revision="%inc%" ?^> >> %xmlfile%
echo ^<?define ProductVersion.Build="%buildnr%" ?^> >> %xmlfile%
echo ^<?define ProductVersion="%major%.%minor%.%inc%.%buildnr%" ?^> >> %xmlfile%
echo ^</Include^> >> %xmlfile%