Archive: get build year not ${__date__} at buildtime


get build year not ${__date__} at buildtime
Is it possible to get build year not ${__date__} at buildtime?

I know I could alter the NSIS source but I want to avoid this path, I like to only use the official CVS sources.

Basicly in my script I want to have someting like this

VIAddVersionKey LegalCopyright "© 2004-${cBuildYear} ${CopyrightInstanceName}"

I know sadly ${__year__} does not exists ...
;!define cBuildYear ${__year__} ;would be great

and strcpy is not an option outside sections

Can I do something with !define /date NOW %YYYY ?
and undef it again since i also need later in the script
!define /date NOW "%H:%M:%S %d %b, %YYYY"

On the fly altering the outputed EXE is also not really a strategy to follow.
I know I could insert ****BUILDYEAR**** and look for this in the code with e.g. a perl script and replace with the real yeartext

ANY hint would be appriciated


!define /date cBuildYear %Y
VIAddVersionKey LegalCopyright "© 2004-${cBuildYear} ${CopyrightInstanceName}"

!define /date Date "%H:%M:%S %d %b, %Y"

-Stu


Your the king, Afrow UK. It worked exactly like I intended, Thanks!

I misunderstood how "/date" should be used... I'm a little wiser also now ;)

BTW
I always have to grin if I see your avatar.