${__TIMESTAMP__} is not always predefined
Some of my scripts use the ${__TIMESTAMP__} predefine to record the date and time of the last modification to the script. I have found that in some cases the compiler gives an "unknown variable/constant" warning for this predefine.
This warning seems to be generated if the script file is not in the current directory. Here is my test script:
Name "Test"
OutFile test.exe
ShowInstDetails show
RequestExecutionLevel "user"
Page instfiles
Section default
DetailPrint "Filename : ${__FILE__}"
DetailPrint "Timestamp: ${__TIMESTAMP__}"
SectionEnd
The command-line "makensis.exe test.nsi" works properly but if I put the script in a subdirectory and use the command-linemakensis.exe subdir\test.nsi
then the compiler issues this warning:
unknown variable/constant "{__TIMESTAMP__}" detected, ignoring (subdir\test.nsi:13)
and, of course, the test program displays:
Filename : test.nsi
Timestamp: ${__TIMESTAMP__}
Completed