Archive: Auto Increment Version Number on Compile Time


Auto Increment Version Number on Compile Time
Hi,

in my script i define a Version Number (W.X.Y.Z) like this:

!define VERSION "1.0.0.0"

Is it possible to increment the Z Value each time compiling automatically? So that after every compile time the Z Value inside my script is auto incrementing like in this example?

1. compile time 1.0.0.0
2. compile time 1.0.0.1
3. compile time 1.0.0.2
4. compile time 1.0.0.3 etc.

thx


!define verfile "ver.txt" 
!include /NonFatal "${verfile}"
!ifndef ver_rev
!define ver_rev 0 ;if we have no previous number
!else
!delfile "${verfile}"
!endif
!define /math ver_revNext ${ver_rev} + 1
!appendfile "${verfile}" "!define ver_rev ${ver_revNext}"
!define ver 1.2.3.${ver_rev}

thx very much ... you are my hero 8)