Skip to content
⌘ NSIS Forum Archive

adding build number or time stamp to outfile

6 posts

mancini#

adding build number or time stamp to outfile

Normally it is usefull if some kind of unique string can be added to name of the installer like a build date or number

i tried
OutFile "installer${__TIME__}.exe"
but it contains a space and i would really like to keep track of build numbers intead

i am now investingating making a batch script that would create a file with a number , incrementing it every time it is runned , then running makensis , and reading from the nsi script the number file then appending the number to outfile

any other sugestions ?
would the developers think they can implement something in the lines of this ?
kichik#
There already is such a thing. Use:
!define /date NOW "%d %b, %Y"
OutFile "installer${NOW}.exe"
mancini#
ok , i assumed the date format can not be configured , thanks

however as for the build incrementing counter , what do you think ?
kichik#
I don't think I'll add something that reads from another file and increments. However, I might add math operations to !define. You can use !system to do it for now (write to temporary file and then include it).
mancini#
can the time format be defined like the date too ?

yea i did not mean including those operations , math functionality would be great 🙂
kichik#
/date works with both time and date. See !define in the documentation for more information.